用docker启动hadoop时提示50070端口被占用,用netstat和TCPView查看都没有相关程序占用此端口,然后又用python,java,node启动web项目测试都提示端口被占用,日志如下:
Docker:
Error response from daemon: driver failed programming external connectivity on endpoint hadoop (c10dd482fbf8305e0d40ffd0cd93f132691e482d3a1d82613cc671b80b3fdd3a): Error starting userland proxy: listen tcp 0.0.0.0:50075: bind: An attempt was made to access a
socket in a way forbidden by its access permissions.
Error: failed to start containers: hadoop
Java:
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)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150)
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591)
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018)
... 19 more
Python:
OSError: [WinError 10013] 以一种访问权限不允许的方式做了一个访问套接字的尝试。
后经过测试发现50070-50360等很多五位数端口都被占用,均查不到有任何占用程序
1.尝试过一次还原默认防火墙,然后部分端口可用了,我又添加自定义规则允许所有端口连接,设置后反而不行了,然后再恢复默认也不行了;
2. 尝试添加程序允许通过/关闭防火墙都不行