uncaughtException: listen EADDRINUSE: address already in use /tmp/mediasoup-demo.sock

Hi

I deploy mediasoup-demo server on aws ec2.micro server in ubuntu 20.04 OS. Its working perfect in localhost but when I deploy it,I am facing following error when start the server.

https server is running successfully. I tested this same server using a test api.
image

I not get this error before when I deploy the same mediasoup-demo backend on another ec2 instance. This instance was just mediasoup backend but now I integrate it with my other socket service I am facing this issue.

Thank you

I don’t use those services but the port is in active use by the looks, maybe you ran two instances and one fell apart but remained hosted? You could maybe try a reboot and see if it fixes it or run a terminal command to check ports in use, see what’s hosting it.

Sounds like a bad configuration. You’d need to do more snooping around!

Here is my config file:

index.js File

ec2 instance inbound rules:

@nazar-pc or anyother
please look into this

Please don’t mention users in this forum. Anyone could help you, but if you target your question to a specific user then you are asking for free consultancy, and we don’t do that here.

1 Like

ok
actually i am stuck in this point from 4 days and not find any solution yet and also this question not get any attention that’s why i mentioned

@hamadali try
sudo rm -rf /tmp/mediasoup-demo.sock
then restart the nodejs code