C
C#2y ago
morry329#

❔ Address already in use after a kill process

My program keeps getting me this error
Unhandled exception. System.Net.Sockets.SocketException (48): Address already in use
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at System.Net.Sockets.TcpListener.Start()
at EinfacherWebserver.Program.Requests.Main(String[] args) in /Users/Program.cs:line 61
Unhandled exception. System.Net.Sockets.SocketException (48): Address already in use
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start(Int32 backlog)
at System.Net.Sockets.TcpListener.Start()
at EinfacherWebserver.Program.Requests.Main(String[] args) in /Users/Program.cs:line 61
I tried sudo kill -9 $(sudo lsof -t -i:3306)` but the error is still persistent. My full code here: https://pastebin.com/gXTwAu6S Is there workaround other than restarting a computer?
Pastebin
Big Databank Server - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
9 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
morry329#
morry329#OP2y ago
I triedlsof -i:5001to see if another app uses that port, but it does not show anything There is another code file that reads a SQL table on port 3306, would that be the "culprit"?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
morry329#
morry329#OP2y ago
I just restarted my computer, that doesn't work either Maybe using completely another port is the solution then
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
morry329#
morry329#OP2y ago
Ahhh I see Is there a similar command for MacOS (I'm on Monterey)
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
morry329#
morry329#OP2y ago
I see
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server