我正在使用Ubuntu16.04,但我相信我的问题适用于许多发行版,如Debian、CentOS和Red。
netstat -l的手册是:
Show only listening sockets. (These are omitted by default.)
netstat -a是:
Show both listening and non-listening sockets. With the --
interfaces option, show interfaces that are not up
netstat -a的输出是否包括nestat -l的输出?在主页上似乎是这样的,但
当我试图在端口8080上运行一个服务(RavenDB)时,它会停止,而Windows日志显示了以下错误:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.HttpListenerException: Failed to listen on prefix 'http://+:8080/' because it conflicts with an existing registration
我的绑定DNS服务器配置为侦听TCP端口53。是否有任何方法将服务器设置为侦听UDP而不是TCP?netstat命令的输出是:
root@ns1:/# netstat -lntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.163.172:53 0.0.0.0:* LISTEN
tcp
netstat -ntp
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 8216172 0 127.0.0.1:9503 127.0.0.1:47654 ESTABLISHED 34390/python
tcp 0 4189632 127.0.0.1:47686 127.
我们的一个远程桌面会话主机服务器每隔几天就开始拒绝连接,经过调查,它似乎耗尽了可用的临时端口。
这是由事件ID 4231标识的,其错误文本为:
A request to allocate an ephemeral port number from the global TCP port space has failed due to all such ports being in use
在运行netstat -anob时,我没有看到什么不寻常的地方。然后,我尝试运行"Log-EphemeralPortsStats.ps1“,我可以在用户博客文章和MS博客文章中看到它。
在运行了一段时
当我试图在犀牛服务器中部署我的应用程序时,我总是会遇到以下异常
javax.sip.SipException: error starting stack
at com.opencloud.ob.ocsipra.fY.a(2.3.1.15:69)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
我知道netstat、ncat、tcpdump和其他一些显示所有连接的工具,但是如果我想要看到与特定服务器建立的特定连接,我应该使用什么工具?
例如:我从一个简单的web客户端连接到www.google.com port 80;我需要一个命令,它只显示我与"www.google.com port 80"的连接。
我在IIS中定义的所有FTP站点都绑定到192.16.9.3:21 & 192.16.9.3:990,但是当我执行netstat时,我得到了以下内容:
C:\>netstat -a -n -o
Active Connections
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:21 0.0.0.0:0 LISTENING 1168
TCP 0.0.0.0:990
我正在尝试确定哪个应用程序正在使用某个端口并获取netstat -tlnp | grep <port> for Linux。
此命令返回以下输出:
(Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:<port> 0.0.0.0:* LISTEN 3591/java
我只需要在结果中获得进程名和PID,即java3591。
做这件事
运行朱庇特笔记本时,我会收到以下错误:
(base) C:\Users\ramne>jupyter notebook
[I 01:19:00.648 NotebookApp] The port 8888 is already in use, trying another port.
当我在netstat -ano中找到Str "8888“时,我会得到以下信息:
C:\Users\ramne>netstat -ano | findStr "8888"
TCP 127.0.0.1:8888 0.0.0.0:0 LI