R
Railway17mo ago
Terry

Strapi won't load on Railway App

I keep getting a message saying WARNING: An error occurred while requesting the API This is a fresh install and not sure what I'm missing. It's working on localhost but not on Railway.
55 Replies
Percy
Percy17mo ago
Project ID: d6360c76-95aa-49e2-90db-62587e583b43
Terry
TerryOP17mo ago
d6360c76-95aa-49e2-90db-62587e583b43
Brody
Brody17mo ago
can you show me a screenshot of your service variables please
Terry
TerryOP17mo ago
Brody
Brody17mo ago
please make sure all database variables are variable references https://docs.railway.app/develop/variables#reference-variables
Terry
TerryOP17mo ago
Yes, I have done that. Not sure what else to do. I'm matching up with the other Strapi on Railway and everything aligned the same
Brody
Brody17mo ago
please show me the screenshot again?
Terry
TerryOP17mo ago
2023-07-12 19:07:08.019 UTC [1] LOG: starting PostgreSQL 13.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit
2023-07-12 19:07:08.019 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-07-12 19:07:08.019 UTC [1] LOG: listening on IPv6 address "::", port 5432
2023-07-12 19:07:08.023 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-07-12 19:07:08.029 UTC [62] LOG: database system was shut down at 2023-07-12 19:07:07 UTC
2023-07-12 19:07:08.034 UTC [1] LOG: database system is ready to accept connections
2023-07-12 19:07:08.036 UTC [68] LOG: TimescaleDB background worker launcher connected to shared catalogs
2023-07-12 19:07:08.454 UTC [72] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 19:07:08.454 UTC [72] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 19:10:09.872 UTC [99] LOG: could not accept SSL connection: No error information
2023-07-12 20:07:07.994 UTC [468] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 20:07:07.994 UTC [468] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 20:07:08.386 UTC [469] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 20:07:08.386 UTC [469] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 21:07:07.634 UTC [836] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 21:07:07.634 UTC [836] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 21:07:08.377 UTC [837] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 21:07:08.377 UTC [837] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 19:07:08.019 UTC [1] LOG: starting PostgreSQL 13.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit
2023-07-12 19:07:08.019 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-07-12 19:07:08.019 UTC [1] LOG: listening on IPv6 address "::", port 5432
2023-07-12 19:07:08.023 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-07-12 19:07:08.029 UTC [62] LOG: database system was shut down at 2023-07-12 19:07:07 UTC
2023-07-12 19:07:08.034 UTC [1] LOG: database system is ready to accept connections
2023-07-12 19:07:08.036 UTC [68] LOG: TimescaleDB background worker launcher connected to shared catalogs
2023-07-12 19:07:08.454 UTC [72] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 19:07:08.454 UTC [72] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 19:10:09.872 UTC [99] LOG: could not accept SSL connection: No error information
2023-07-12 20:07:07.994 UTC [468] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 20:07:07.994 UTC [468] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 20:07:08.386 UTC [469] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 20:07:08.386 UTC [469] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 21:07:07.634 UTC [836] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 21:07:07.634 UTC [836] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 21:07:08.377 UTC [837] LOG: the "timescaledb" extension is not up-to-date
2023-07-12 21:07:08.377 UTC [837] HINT: The most up-to-date version is 2.11.1, the installed version is 2.1.1.
Terry
TerryOP17mo ago
Terry
TerryOP17mo ago
Brody
Brody17mo ago
why are they all shared variables?? i never mentioned anything about shared variables, please undo all of that
Terry
TerryOP17mo ago
Done
Brody
Brody17mo ago
another screenshot please
Terry
TerryOP17mo ago
Brody
Brody17mo ago
please make sure all database variables are variable references https://docs.railway.app/develop/variables#reference-variables
Terry
TerryOP17mo ago
[2023-07-12 21:28:58.340] debug: ⛔️ Server wasn't able to start properly. [2023-07-12 21:28:58.342] error: database "containers-us-west-203.railway.app" does not exist
DATABASE_URL=${{DATABASE_HOST}}
PGDATABASE=${{DATABASE_NAME}}
PGHOST=${{DATABASE_HOST}}
PGPASSWORD=${{DATABASE_PASSWORD}}
PGPORT=${{DATABASE_PORT}}
PGUSER=${{DATABASE_USERNAME}}
DATABASE_URL=${{DATABASE_HOST}}
PGDATABASE=${{DATABASE_NAME}}
PGHOST=${{DATABASE_HOST}}
PGPASSWORD=${{DATABASE_PASSWORD}}
PGPORT=${{DATABASE_PORT}}
PGUSER=${{DATABASE_USERNAME}}
Brody
Brody17mo ago
another screenshot please
Terry
TerryOP17mo ago
Brody
Brody17mo ago
without cropping please
Terry
TerryOP17mo ago
Brody
Brody17mo ago
please make sure all database variables are variable references https://docs.railway.app/develop/variables#reference-variables
Terry
TerryOP17mo ago
What am I missing?
Brody
Brody17mo ago
your database variables are not variable references
Terry
TerryOP17mo ago
so I need to delete all the DATABASE_?
Brody
Brody17mo ago
sure, whatever is easiest for you
Terry
TerryOP17mo ago
Brody
Brody17mo ago
it is highly advisable to use the standardized names
Brody
Brody17mo ago
Terry
TerryOP17mo ago
Okay, so I'll have to change it on Strapi's end?
Brody
Brody17mo ago
one thing at a time please use the standardized variable names for your reference variables
Terry
TerryOP17mo ago
show me an example
Brody
Brody17mo ago
Brody
Brody17mo ago
the drop-down uses these variable names by default, you would have had to change them manually, don't do that please
Terry
TerryOP17mo ago
It still doesn't work. I found my solution
Terry
TerryOP17mo ago
DEV Community
How to create and deploy a Strapi project on Railway
Railway is a cloud platform based on Heroku that makes it easy to deploy you app on the cloud. You...
Brody
Brody17mo ago
a lot of bad practices in that guide all you needed to do was setup your variables correctly in railway and then we would have moved on to utilizing the variables correctly in strapi
Terry
TerryOP17mo ago
The way you're explaining it, I'm not understanding I'm sorry if I sound difficult
Brody
Brody17mo ago
it just seems like you weren't trying
Terry
TerryOP17mo ago
Terry
TerryOP17mo ago
believe me, I am. I'm changing things and reading this over and over
Brody
Brody17mo ago
well you said it works now?
Terry
TerryOP17mo ago
No
Brody
Brody17mo ago
so may we continue?
Terry
TerryOP17mo ago
yes, please
Brody
Brody17mo ago
your railway variables now look good please send your database.js file
Terry
TerryOP17mo ago
Brody
Brody17mo ago
lots of stuff going on there that you don't need, just simply use this instead https://github.com/railwayapp-templates/strapi/blob/main/config/database.js
Terry
TerryOP17mo ago
done waiting for build Okay, the problem was never the variables. The problem was this
Terry
TerryOP17mo ago
Terry
TerryOP17mo ago
I don't know where that came from but that was the problem.
Brody
Brody17mo ago
correction, the variables where a problem, but not the only problem
Terry
TerryOP17mo ago
This is strapi@latest and that was new to me. All the other strapi doesn't have it. It was weird that I was able to connect on localhost but then not on serverside. well, yes the variables was a problem too because I kept changing them LOL ✅
Brody
Brody17mo ago
well finally solved 🥳
Terry
TerryOP17mo ago
Sorry for the headache
Brody
Brody17mo ago
you're forgiven ❤️
Want results from more Discord servers?
Add your server