R
Railway9mo ago
samim

Docker build Failed

Docker build Failed for app deployment
No description
71 Replies
Percy
Percy9mo ago
Project ID: 5dc852b8-a45d-4fa3-b1e2-f8adb79c85b4
samim
samim9mo ago
5dc852b8-a45d-4fa3-b1e2-f8adb79c85b4
Brody
Brody9mo ago
has this app successfully built before?
samim
samim9mo ago
it was running ok for last couple of months is there any new incident recently? I think that affects the running application
Brody
Brody9mo ago
no incidents reported right now, can i get your build logs please https://bookmarklets.up.railway.app/log-downloader/
Brody
Brody9mo ago
node 14 is no longer supported please update to node 16 or 18
samim
samim9mo 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
Brody9mo ago
what kind of app?
samim
samim9mo ago
it's a strapi app
Brody
Brody9mo ago
gotcha, yeah you would need to use node 16 or 18
samim
samim9mo ago
No description
samim
samim9mo ago
node engine set up for the range
Brody
Brody9mo ago
just set that to 16
samim
samim9mo ago
ok let's try.will give an update still failed
Brody
Brody9mo ago
build logs again please
samim
samim9mo ago
I have another instance running for another client, that one is running fine
Brody
Brody9mo ago
now its trying to install node 18, please set your engines.node to 16
samim
samim9mo ago
failed i think it's not node engine issue rather railway infrastructure issue
Brody
Brody9mo ago
build logs please railway is not experiencing any infrastructure issues right now, i have seen these errors before
Brody
Brody9mo ago
try adding a nixpacks.toml to your project with this in it
[phases.setup]
nixpkgsArchive = '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847'
[phases.setup]
nixpkgsArchive = '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847'
samim
samim9mo ago
In root directory?
Brody
Brody9mo ago
if thats where strapi deploys from, yes
samim
samim9mo ago
failed
Brody
Brody9mo ago
do you have a date of when the last build was successful?
samim
samim9mo ago
it was running successfuly, suddenly it crashed
Brody
Brody9mo ago
im sorry but that doesnt quite answer my question
samim
samim9mo ago
No description
samim
samim9mo ago
May be last build was 1 month back
Brody
Brody9mo ago
what is that commit dated
samim
samim9mo ago
recently it crashed without any intervention
samim
samim9mo ago
No description
samim
samim9mo ago
may be this one almost 7 months ago Commits on Jul 18, 2023
Brody
Brody9mo ago
thats a lot longer than 1 month back
samim
samim9mo 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
Brody9mo ago
you got it to build?
samim
samim9mo 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
Brody9mo 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
samim9mo ago
could you elaborate? what do you mean by updating your local file?
Brody
Brody9mo ago
update your projects nixpacks.toml file with this
[phases.setup]
nixpkgsArchive = '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847'
[phases.setup]
nixpkgsArchive = '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847'
samim
samim9mo ago
failed again
Brody
Brody9mo ago
for future referance, if it fails please go ahead and send me the logs
Brody
Brody9mo 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" }
}
Brody
Brody9mo ago
did you update some packages?
samim
samim9mo ago
no please inform to your seniors, I will try later.Thanks
Brody
Brody9mo ago
i assure you this isnt an issue with railway
samim
samim9mo ago
And I am 100% sure, it's railway issue
Brody
Brody9mo 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
samim9mo 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
Brody9mo ago
send your database.js file please
samim
samim9mo 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
Brody9mo ago
send the file please
samim
samim9mo 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
Brody9mo ago
you are still trying to connect to the legacy database, please send a screenshot of your railway project
samim
samim9mo 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
samim9mo ago
No description
Brody
Brody9mo ago
on the strapi service set DATABASE_URL to ${{Postgres.DATABASE_PRIVATE_URL}}
samim
samim9mo ago
Thanks for your time
Brody
Brody9mo ago
back online?
samim
samim9mo ago
yes
Brody
Brody9mo ago
awsome
samim
samim9mo ago
it's all package related inconsistency and node version
Brody
Brody9mo ago
yep, no railway issues here
samim
samim9mo 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
Brody9mo ago
yeah thats the shut down database
Want results from more Discord servers?
Add your server