23,775 questions
3185 votes
40 answers
5.1m views
Find (and kill) processes listening to port 3000 on Mac [closed]
How do I manually find (and kill) process using the terminal that listen to/use my TCP ports? I'm on macOS. Sometimes, after a crash or bug, my Rails app gets locked to port 3000, and I can't find it ...
2207 votes
19 answers
2.0m views
Who is listening on a given TCP port on Mac OS X? [closed]
On Linux, I can use netstat -pntl | grep $PORT or fuser -n tcp $PORT to find out which process (PID) is listening on the specified TCP port. How do I get the same information on Mac OS X?
993 votes
2 answers
1.6m views
What does "connection reset by peer" mean?
What is the meaning of the "connection reset by peer" error on a TCP connection? Is it a fatal error or just a notification or related to the network failure?
876 votes
37 answers
1.8m views
How can I connect to Android with ADB over TCP? [closed]
I am attempting to debug an application on a Motorola Droid, but I am having some difficulty connecting to the device via USB. My development server is a Windows 7 64-bit VM running in Hyper-V, and so ...
478 votes
8 answers
466k views
What is the largest TCP/IP network port number allowable for IPv4?
What is the highest port number one can use?
467 votes
5 answers
419k views
How do multiple clients connect simultaneously to one port, say 80, on a server? [duplicate]
I understand the basics of how ports work. However, what I don't get is how multiple clients can simultaneously connect to say port 80. I know each client has a unique (for their machine) port. Does ...
465 votes
19 answers
1.4m views
How do I debug error ECONNRESET in Node.js?
I'm running an Express.js application using Socket.io for a chat webapp and I get the following error randomly around 5 times during 24h. The node process is wrapped in forever and it restarts itself ...
411 votes
23 answers
247k views
Artificially create a connection timeout error
I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this ...
396 votes
19 answers
689k views
Test if remote TCP port is open from a shell script
I'm looking for a quick and simple method for properly testing if a given TCP port is open on a remote server, from inside a Shell script. I've managed to do it with the telnet command, and it works ...
376 votes
17 answers
431k views
Can two applications listen to the same port?
Can two applications on the same machine bind to the same port and IP address? Taking it a step further, can one app listen to requests coming from a certain IP and the other to another remote IP? I ...
344 votes
24 answers
255k views
When is it appropriate to use UDP instead of TCP? [closed]
Since TCP guarantees packet delivery and thus can be considered "reliable", whereas UDP doesn't guarantee anything and packets can be lost. What would be the advantage of transmitting data using UDP ...
310 votes
4 answers
254k views
What is the theoretical maximum number of open TCP connections that a modern Linux box can have
Assuming infinite performance from hardware, can a Linux box support >65536 open TCP connections? I understand that the number of ephemeral ports (<65536) limits the number of connections from one ...
304 votes
6 answers
268k views
Simulate delayed and dropped packets on Linux
I would like to simulate packet delay and loss for UDP and TCP on Linux to measure the performance of an application. Is there a simple way to do this?
254 votes
20 answers
1.5m views
java.net.ConnectException: Connection refused
I'm trying to implement a TCP connection, everything works fine from the server's side but when I run the client program (from client computer) I get the following error: java.net.ConnectException: ...
242 votes
9 answers
354k views
NGINX to reverse proxy websockets AND enable SSL (wss://)?
I'm so lost and new to building NGINX on my own but I want to be able to enable secure websockets without having an additional layer. I don't want to enable SSL on the websocket server itself but ...