netstat showing foreign ports as kubernetes:port. What does this mean?

That happens because of the way netstat renders output. It has nothing to do with actual Kubernetes. I have Docker Desktop for Windows and it adds this to the hosts file: # Added by Docker Desktop 192.168.43.196 host.docker.internal 192.168.43.196 gateway.docker.internal # To allow the same kube context to work on the host and the container: … Read more

Use of Recv-Q and Send-Q

From my man page: Recv-Q Established: The count of bytes not copied by the user program connected to this socket. Listening: Since Kernel 2.6.18 this column contains the current syn backlog. Send-Q Established: The count of bytes not acknowledged by the remote host. Listening: Since Kernel 2.6.18 this column contains the maximum size of the … Read more

Docker and netstat: netstat is not showing ports, exposed by docker containers

It’s never too late to answer a question. Using netstat -tln, not netstat -at. It’s very simple to answer, if you notify the –numeric option for netstat. By using this option, netstat will print address with numbers instead of meaningful string. Then you can grep them as you mentioned. Following shows how it works. [root@A01-R26-I52-155-3002023 … Read more

How do I find which application is using up my port? [closed]

How about netstat? http://support.microsoft.com/kb/907980 The command is netstat -anob. (Make sure you run command as admin) I get: C:\Windows\system32>netstat -anob Active Connections Proto Local Address Foreign Address State PID TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4 Can not obtain ownership information TCP 0.0.0.0:135 0.0.0.0:0 LISTENING 692 RpcSs [svchost.exe] TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 7540 [Skype.exe] TCP 0.0.0.0:445 0.0.0.0:0 … Read more

Docker: any way to list open sockets inside a running docker container?

You can use the nsenter command to run a command on your host inside the network namespace of the Docker container. Just get the PID of your Docker container: docker inspect -f ‘{{.State.Pid}}’ container_name_or_id For example, on my system: $ docker inspect -f ‘{{.State.Pid}}’ c70b53d98466 15652 And once you have the PID, use that as … Read more

How to check if a network port is open?

You can using the socket module to simply check if a port is open or not. It would look something like this. import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = sock.connect_ex((‘127.0.0.1’,80)) if result == 0: print “Port is open” else: print “Port is not open” sock.close()

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)