crash error code: 'EADDRINUSE' with different ports
roccocalo
TRIALOP

2 years ago

hi, my project crash every time with this error log:

listen EADDRINUSE: address already in use 0.0.0.0:5713

at Server.setupListenHandle [as _listen2] (node:net:1817:16)

at listenInCluster (node:net:1865:12)

at doListen (node:net:2014:7)

at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

Emitted 'error' event on Server instance at:

at emitErrorNT (node:net:1844:8)

at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {

code: 'EADDRINUSE',

errno: -98,

syscall: 'listen',

address: '0.0.0.0',

port: 5713

}

Node.js v18.18.2

I know that this means that the port is already in use but it's not true i checked that, i even have changed the variable port so railway used another one and the same error occurs. I have no idea of what could be the problem. I set the env variable. I'm using node express with mongo

View Deploy details

ⓘ Deployment information is only viewable by Project members and Railway admins.

Solved

15 Replies

2 years ago

Are you able to share your repo so we could give better advice?


roccocalo
TRIALOP

2 years ago

Are you able to share your repo so we could give better advice?

Yes, thanks. https://github.com/roccocalo/members-only


2 years ago


roccocalo
TRIALOP

2 years ago

here they are

Attachments


2 years ago

You should get rid of this bin/www stuff and just start app.js directly in the start script.


Status changed to Solved Railway about 2 years ago


roccocalo
TRIALOP

2 years ago

You should get rid of this bin/www stuff and just start app.js directly in the start script.

it's not crashing anymore but still "Application failed to respond"


2 years ago

Deploy logs please.


roccocalo
TRIALOP

2 years ago

yes, it just crashed.

Attachments


2 years ago

I assume you have the MONGODB_URI environment variable set correctly?


roccocalo
TRIALOP

2 years ago

i just copy the .env file in the variable section using the raw editor, and it works i can my variable with the correct string


2 years ago

Have you whitelisted all IP addresses in atlas with 0.0.0.0/0?


roccocalo
TRIALOP

2 years ago

no, i don't even know what this means


2 years ago

Go ahead and do that please.


roccocalo
TRIALOP

2 years ago

Go ahead and do that please.

Thank you for you time. It's working perfectly now!


2 years ago

Happy to hear!


Welcome!

Sign in to your Railway account to join the conversation.

Loading...