R
Railway10mo ago
samim

Docker build Failed

Docker build Failed for app deployment
No description
71 Replies
Percy
Percy10mo ago
Project ID: 5dc852b8-a45d-4fa3-b1e2-f8adb79c85b4
samim
samimOP10mo ago
5dc852b8-a45d-4fa3-b1e2-f8adb79c85b4
Brody
Brody10mo ago
has this app successfully built before?
samim
samimOP10mo ago
it was running ok for last couple of months is there any new incident recently? I think that affects the running application
Brody
Brody10mo ago
no incidents reported right now, can i get your build logs please https://bookmarklets.up.railway.app/log-downloader/
samim
samimOP10mo ago
Brody
Brody10mo ago
node 14 is no longer supported please update to node 16 or 18
samim
samimOP10mo ago
There is no active development for this project for last couple of months and running perfectly ok, I found the app crashed after logging the account
Brody
Brody10mo ago
what kind of app?
samim
samimOP10mo ago
it's a strapi app
Brody
Brody10mo ago
gotcha, yeah you would need to use node 16 or 18
samim
samimOP10mo ago
No description
samim
samimOP10mo ago
node engine set up for the range
Brody
Brody10mo ago
just set that to 16
samim
samimOP10mo ago
ok let's try.will give an update still failed
Brody
Brody10mo ago
build logs again please
samim
samimOP10mo ago
I have another instance running for another client, that one is running fine
samim
samimOP10mo ago
Brody
Brody10mo ago
now its trying to install node 18, please set your engines.node to 16
samim
samimOP10mo ago
failed i think it's not node engine issue rather railway infrastructure issue
Brody
Brody10mo ago
build logs please railway is not experiencing any infrastructure issues right now, i have seen these errors before
samim
samimOP10mo ago
Brody
Brody10mo ago
try adding a nixpacks.toml to your project with this in it
[phases.setup]
nixpkgsArchive = '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847'
[phases.setup]
nixpkgsArchive = '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847'
samim
samimOP10mo ago
In root directory?
Brody
Brody10mo ago
if thats where strapi deploys from, yes
samim
samimOP10mo ago
samim
samimOP10mo ago
failed
Brody
Brody10mo ago
do you have a date of when the last build was successful?
samim
samimOP10mo ago
it was running successfuly, suddenly it crashed
Brody
Brody10mo ago
im sorry but that doesnt quite answer my question
samim
samimOP10mo ago
No description
samim
samimOP10mo ago
May be last build was 1 month back
Brody
Brody10mo ago
what is that commit dated
samim
samimOP10mo ago
recently it crashed without any intervention
samim
samimOP10mo ago
No description
samim
samimOP10mo ago
may be this one almost 7 months ago Commits on Jul 18, 2023
Brody
Brody10mo ago
thats a lot longer than 1 month back
samim
samimOP10mo ago
yes those were real dev changes, But I have n't found any commit history in between 2024-02-02 03:58:49.359] debug: ⛔️ Server wasn't able to start properly. [2024-02-02 03:58:49.360] error: connect ECONNREFUSED 34.127.40.22:7018 Error: connect ECONNREFUSED 34.127.40.22:7018
Brody
Brody10mo ago
you got it to build?
samim
samimOP10mo ago
when I tried restart the crashed one, it show me the message, I think App could not be connected properly to the expose IP no For new build it's failed on build stage by docker
Brody
Brody10mo ago
we need to get a new build working, so give me a few minutes i have updated this, please update your local file
samim
samimOP10mo ago
could you elaborate? what do you mean by updating your local file?
Brody
Brody10mo ago
update your projects nixpacks.toml file with this
[phases.setup]
nixpkgsArchive = '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847'
[phases.setup]
nixpkgsArchive = '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847'
samim
samimOP10mo ago
failed again
Brody
Brody10mo ago
for future referance, if it fails please go ahead and send me the logs
samim
samimOP10mo ago
Brody
Brody10mo ago
interesting, okay last ditch effort. delete your nixpacks.toml file. add a railway.json to your project with this in it
{
"build": { "nixpacksVersion": "1.10.1" }
}
{
"build": { "nixpacksVersion": "1.10.1" }
}
samim
samimOP10mo ago
Brody
Brody10mo ago
did you update some packages?
samim
samimOP10mo ago
no please inform to your seniors, I will try later.Thanks
Brody
Brody10mo ago
i assure you this isnt an issue with railway
samim
samimOP10mo ago
And I am 100% sure, it's railway issue
Brody
Brody10mo ago
im sorry but its not this is a 7 month old project, things break it seems like the build wants node 18 again, so set engines.node to 18
samim
samimOP10mo ago
I will try thanks npm WARN config production Use --omit=dev instead.
[email protected] start strapi start
[2024-02-02 08:48:59.997] debug: ⛔️ Server wasn't able to start properly. [2024-02-02 08:48:59.999] error: connect ECONNREFUSED 34.127.40.22:7018 Error: connect ECONNREFUSED 34.127.40.22:7018 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) npm WARN config production Use --omit=dev instead.
[email protected] start strapi start
[2024-02-02 08:49:04.292] debug: ⛔️ Server wasn't able to start properly. [2024-02-02 08:49:04.294] error: connect ECONNREFUSED 34.127.40.22:7018 Error: connect ECONNREFUSED 34.127.40.22:7018 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) npm WARN config production Use --omit=dev instead.
[email protected] start strapi start
[2024-02-02 08:49:08.514] debug: ⛔️ Server wasn't able to start properly. [2024-02-02 08:49:08.516] error: connect ECONNREFUSED 34.127.40.22:7018 Error: connect ECONNREFUSED 34.127.40.22:7018 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) npm WARN config production Use --omit=dev instead.
[email protected] start strapi start
[2024-02-02 08:49:12.750] debug: ⛔️ Server wasn't able to start properly. [2024-02-02 08:49:12.752] error: connect ECONNREFUSED 34.127.40.22:7018 build successful but couldn't able to connect remote IP
Brody
Brody10mo ago
send your database.js file please
samim
samimOP10mo ago
const { parse } = require("pg-connection-string"); module.exports = ({ env }) => { const { host, port, database, user, password } = parse(env("DATABASE_URL")); return { connection: { client: "postgres", connection: { host, port, database, user, password, }, debug: false, }, }; };
Brody
Brody10mo ago
send the file please
samim
samimOP10mo ago
samim
samimOP10mo ago
error: connect ECONNREFUSED 34.127.40.22:7018 connection refused, what might be the reason? DATABASE_URL=postgresql://postgres:[email protected]:7018/railway env variable
Brody
Brody10mo ago
you are still trying to connect to the legacy database, please send a screenshot of your railway project
samim
samimOP10mo ago
got it , it seems structure is changed, 2 varibale availble now , one is DATABASE_PRIVATE_URL, and another one is DATABSE_URL which one I should connect
samim
samimOP10mo ago
No description
Brody
Brody10mo ago
on the strapi service set DATABASE_URL to ${{Postgres.DATABASE_PRIVATE_URL}}
samim
samimOP10mo ago
Thanks for your time
Brody
Brody10mo ago
back online?
samim
samimOP10mo ago
yes
Brody
Brody10mo ago
awsome
samim
samimOP10mo ago
it's all package related inconsistency and node version
Brody
Brody10mo ago
yep, no railway issues here
samim
samimOP10mo ago
I forgot the recent changes of database update issue , that why it shows me the error of IP related connection refused issue anyway thanks for your time
Brody
Brody10mo ago
yeah thats the shut down database
Want results from more Discord servers?
Add your server