Port 8080 is already in use

ronanpdh
TRIAL

a year ago

trying to launch a really basic express server on railway and after it builds it runs for a short period and then crashes, I keep getting a 'Port 8080 is already in use' error message, however I'm not specifying a port in my express application. As the docs suggest, I created a port variable and let railway inject a port number. I've tried specifying a port as well and run into the same issue. Not sure if i'm doing something really daft or not but tried multiple times and get the same issue. Full log below Server
running on port 8080

Port 8080 is already in use

container event container died

npm WARN config production Use --omit=dev instead.

1 Replies

ronanpdh
TRIAL

a year ago

bf1ac4d2-f351-4d01-ad53-52c11a51dda9


a year ago

port 8080 would be the port railway injects, so its good that its attempting to listen on that.

someone opened a thread about this exact same issue the other day and it turned out they where calling app.listen twice, have a look through your code to see if you see yourself doing anything like that too


ronanpdh
TRIAL

a year ago

Thanks for the quick response! I’ve checked and definitely only calling app.listen once


a year ago

are you able to share your code?


guudewie
TRIAL

a year ago

Same issue here. Any solutions found?


a year ago

please open a new thread and share your code


Port 8080 is already in use - Railway Help Station