Docker Error even though bot still running
materwelondhruv
PROOP

2 years ago

I have a very simple DockerFile that's starting my application. I also have set a start script (npm run start:prod). However, when it starts it shows logs with a lot of spaces and some other stuff that doesn't make sense:

  • The bars in Observability are also colored black instead of red and blue.

  • Errors in the console aren't showing fully (only the first line) and if I click Show More, it shows the second line and not the first of the error. Other lines are still missing. (not shown in image)

  • The container also "dies" but the bot still works.

I'm new to Docker so I honestly don't understand why whatever is happening is happening (or the existing DockerFile either really…) <:cryAqua:847179451162951692>. Please help

Project ID: 04769ebe-fd27-4d50-8fb1-05354c76d1c5

Here's my very basic DockerFile

FROM node:20.12.2

WORKDIR /usr/src/app

COPY package.json ./

RUN npm install --omit=dev

COPY . .

RUN npm run build

CMD [ "npm", "run", "start:prod" ]

and some package.json scripts

"build": "NODE_ENV=production tsc -p .",
"start:prod": "NODE_ENV=production node dist/index.js",

40 Replies

2 years ago

check your service settings, if you're on the v2 runtime please switch to the legacy runtime, the v2 runtime seems to have some issues with logs


materwelondhruv
PROOP

2 years ago

kind of fixed stuff? I'm still so lost… It's also spamming logs for some reason. container still stopped but the bot still works

1249739862765207600
1249739863109009400


2 years ago

where you running any replicas?


materwelondhruv
PROOP

2 years ago

nope. Just the main from github, deployed once.


materwelondhruv
PROOP

2 years ago

1249740593844719600


materwelondhruv
PROOP

2 years ago

it says it's removing it but doesnt remove it.


materwelondhruv
PROOP

2 years ago

even more

1249740671670157300


materwelondhruv
PROOP

2 years ago

oh. it did remove it finally.


materwelondhruv
PROOP

2 years ago

What are the docker errors though


materwelondhruv
PROOP

2 years ago

nope. it didnt remove it


materwelondhruv
PROOP

2 years ago

went active again


2 years ago

docker errors?


materwelondhruv
PROOP

2 years ago

1249740884862566400


materwelondhruv
PROOP

2 years ago

the first image here. container event died


materwelondhruv
PROOP

2 years ago

wait what. it changed from Stopping Container to container event died

1249741092157395000


2 years ago

well railway does run everything in containers after all


materwelondhruv
PROOP

2 years ago

yeah. but what are those errors after the container runs successfully? What is the spam of removing events without actually removing the deployment?


materwelondhruv
PROOP

2 years ago

I simply can't remove this one deployment at all. I remove it and it just doesnt go away

1249744155207270400


materwelondhruv
PROOP

2 years ago

it logs that it removed it, but doesnt actually do it


2 years ago

I have no clue, I would need to ask a team member


materwelondhruv
PROOP

2 years ago


materwelondhruv
PROOP

2 years ago

i appreciate the help


2 years ago

!t


2 years ago

This thread has been escalated to the Railway team.

Status changed to Awaiting Railway Response brody almost 2 years ago


2 years ago

I can't provide an ETA on their reply unfortunately since there is no set time frame for support on the hobby plan


materwelondhruv
PROOP

2 years ago

aha. someone else is also facing the same problem
https://discord.com/channels/713503345364697088/1249523974967132243


materwelondhruv
PROOP

2 years ago

no worries. I am going to try deleting the service all together and creating a new one


materwelondhruv
PROOP

2 years ago

MAYBE that works.


2 years ago

I would appreciate if you could leave that service alone if possible?


materwelondhruv
PROOP

2 years ago

oo


2 years ago

I understand that may not be possible given neither of us know when railway would be available to assist


materwelondhruv
PROOP

2 years ago

I have asked the project owner to wait a bit. They do need their bot. Will see


2 years ago

did you say that the bot was online?


materwelondhruv
PROOP

2 years ago

Yep.


2 years ago

i just found a deployment that i cant remove


materwelondhruv
PROOP

2 years ago

so there's a problem with Railway it seems


materwelondhruv
PROOP

2 years ago

the project owner managed to delete the service (finally. he had been trying for a while but wasn't able to)


materwelondhruv
PROOP

2 years ago

I will try to deploy again


2 years ago

yep


materwelondhruv
PROOP

2 years ago

removed the service and redid everything. Started with Legacy instead of V2 this time. Everything works great, no errors whatsoever.


2 years ago

legacy will be deprecated soon so it would be best to switch to v2


Loading...