Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vapor: Address already in use (errno: 98) [closed]

I deployed my vapor project to Ubuntu. And made the configuration of supervisor and Nginx.

When I invoke my server. first call is success but When I try second call I get 502 bad gateway error from browser. When I check error log, the error is

"Fatal error: Error raised at top level: bind(descriptor:ptr:bytes:) failed: Address already in use (errno: 98) : file /home/buildnode/jenkins/wo$"

If I kill the port(8080) process. And after, I try to connect again first try is success then get fail again.

What should I do to get rid of this error?

like image 715
sof98789 Avatar asked Nov 14 '18 10:11

sof98789


2 Answers

This might be caused by another process using that port.
I had the same issue and was able to solve it by listing all the processes on port :8080:

$ sudo lsof -i :8080

and then killing all of them one by one by typing:

$ kill {PID of the process}

After that, my app built again properly.


taken from here

like image 144
LinusGeffarth Avatar answered Nov 02 '22 11:11

LinusGeffarth


I had the same issue. This worked for me:

$ kill -9 {PID of the process}

Hope this helps!

like image 36
anniina Avatar answered Nov 02 '22 10:11

anniina