eclipse WildFly 开始时出现错误:java.net.BindException: Address already in use
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32017970/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
WildFly started with errors: java.net.BindException: Address already in use
提问by cy221
When I start WildFly in Eclipse, I get this error:
当我在 Eclipse 中启动 WildFly 时,出现此错误:
22:03:42,430 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:269)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
at org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:160)
at org.jboss.as.server.mgmt.UndertowHttpManagementService.start(UndertowHttpManagementService.java:235)
... 5 more
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:437)
at sun.nio.ch.Net.bind(Net.java:429)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at org.xnio.nio.NioXnioWorker.createTcpConnectionServer(NioXnioWorker.java:182)
at org.xnio.XnioWorker.createStreamConnectionServer(XnioWorker.java:243)
at org.jboss.as.domain.http.server.ManagementHttpServer.start(ManagementHttpServer.java:147)
... 6 more
22:03:42,431 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
22:03:42,551 INFO [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBoss Web Services - Stack CXF Server 5.0.0.Final
22:03:43,287 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 61) Mojarra 2.2.11-jbossorg-1 20150505-1501 für Kontext '/JSF Hello World' wird initialisiert.
22:03:43,721 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 61) WFLYUT0021: Registered web context: /JSF Hello World
22:03:43,727 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("core-service" => "management"),
("management-interface" => "http-interface")
]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.serverManagement.controller.management.http" => "org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
Caused by: java.net.BindException: Address already in use: bind"}}
22:03:43,758 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "JSF Hello World.war" (runtime-name : "JSF Hello World.war")
22:03:43,786 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.serverManagement.controller.management.http: org.jboss.msc.service.StartException in service jboss.serverManagement.controller.management.http: WFLYSRV0083: Failed to start the http-interface service
22:03:43,884 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0063: Http management interface is not enabled
22:03:43,884 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0054: Admin console is not enabled
22:03:43,884 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 9.0.1.Final (WildFly Core 1.0.1.Final) started (with errors) in 12675ms - Started 270 of 455 services (2 services failed or missing dependencies, 221 services are lazy, passive or on-demand)
How can I resolve this problem?
我该如何解决这个问题?
There are some connections on port 80. Do I have to check all ip adresses with whois to identify an application on my computer which is already using port 80?
端口 80 上有一些连接。我是否必须使用 whois 检查所有 ip 地址才能识别我计算机上已经使用端口 80 的应用程序?
C:\Users\me7D-User>netstat -aon | findstr "80"
TCP 0.0.0.0:8092 0.0.0.0:0 ABH?REN 4
TCP 127.0.0.1:8080 0.0.0.0:0 ABH?REN 8868
TCP 127.0.0.1:8080 127.0.0.1:59241 HERGESTELLT 8868
TCP 127.0.0.1:59177 127.0.0.1:8080 WARTEND 0
TCP 127.0.0.1:59180 127.0.0.1:59181 HERGESTELLT 8868
TCP 127.0.0.1:59181 127.0.0.1:59180 HERGESTELLT 8868
TCP 127.0.0.1:59230 127.0.0.1:8080 WARTEND 0
TCP 127.0.0.1:59241 127.0.0.1:8080 HERGESTELLT 11024
TCP 192.168.0.100:59166 173.194.113.41:80 WARTEND 0
TCP 192.168.0.100:59249 104.16.102.85:80 HERGESTELLT 8392
TCP 192.168.0.100:59250 216.58.211.42:80 HERGESTELLT 8392
TCP 192.168.0.100:59252 103.31.7.34:80 HERGESTELLT 8392
TCP 192.168.0.100:59253 216.58.211.42:80 WARTEND 0
TCP 192.168.0.100:59254 190.93.247.58:80 HERGESTELLT 8392
TCP 192.168.0.100:59255 190.93.247.58:80 HERGESTELLT 8392
TCP 192.168.0.100:59256 190.93.247.58:80 WARTEND 0
TCP 192.168.0.100:59257 190.93.247.58:80 HERGESTELLT 8392
TCP 192.168.0.100:59258 190.93.247.58:80 HERGESTELLT 8392
TCP 192.168.0.100:59259 190.93.247.58:80 HERGESTELLT 8392
TCP 192.168.0.100:59264 104.16.12.8:80 HERGESTELLT 8392
TCP 192.168.0.100:59265 88.221.92.32:80 HERGESTELLT 8392
TCP 192.168.0.100:59266 88.221.92.176:80 HERGESTELLT 8392
TCP 192.168.0.100:59267 173.194.113.36:80 HERGESTELLT 8392
TCP 192.168.0.100:59268 104.16.12.8:80 WARTEND 0
TCP 192.168.0.100:59269 88.221.92.32:80 WARTEND 0
TCP 192.168.0.100:59270 88.221.92.176:80 WARTEND 0
TCP 192.168.0.100:59271 54.204.10.55:80 HERGESTELLT 8392
TCP 192.168.0.100:59272 54.204.10.55:80 WARTEND 0
TCP 192.168.0.100:59273 95.172.94.34:80 WARTEND 0
TCP 192.168.0.100:63749 216.34.181.97:80 SCHLIESSEN_WARTEN 1680
TCP 192.168.0.100:63812 216.34.181.97:80 SCHLIESSEN_WARTEN 1680
TCP [::]:8092 [::]:0 ABH?REN 4
UDP 127.0.0.1:49880 *:* 3272
UDP [fe80::100:7f:fffe%11]:54045 *:* 49
56
UDP [fe80::5efe:192.168.0.100%15]:54045 *:*
4956
UDP [fe80::5efe:192.168.137.1%14]:54045 *:*
4956
UDP [fe80::a9:d477:68a9:2472%10]:1900 *:*
3364
UDP [fe80::a9:d477:68a9:2472%10]:54045 *:*
4956
UDP [fe80::a9:d477:68a9:2472%10]:56718 *:*
3364
UDP [fe80::3d9d:1f6f:e25:35b%13]:53 *:*
1292
UDP [fe80::3d9d:1f6f:e25:35b%13]:546 *:*
1100
UDP [fe80::3d9d:1f6f:e25:35b%13]:1900 *:*
3364
UDP [fe80::3d9d:1f6f:e25:35b%13]:54045 *:*
4956
UDP [fe80::3d9d:1f6f:e25:35b%13]:56719 *:*
3364
And these are on port 8080.
这些都在端口 8080 上。
C:\Users\me7D-User>netstat -aon | findstr "8080"
TCP 127.0.0.1:8080 0.0.0.0:0 ABH?REN 7500
TCP 127.0.0.1:8080 127.0.0.1:60095 HERGESTELLT 7500
TCP 127.0.0.1:8080 127.0.0.1:60096 HERGESTELLT 7500
TCP 127.0.0.1:60035 127.0.0.1:8080 WARTEND 0
TCP 127.0.0.1:60095 127.0.0.1:8080 HERGESTELLT 11024
TCP 127.0.0.1:60096 127.0.0.1:8080 HERGESTELLT 11024
This error is always present, also if I restart my computer.
此错误始终存在,即使我重新启动计算机也是如此。
回答by Ualter Jr.
Check if you have service called NVIDIA Network Servicerunning at your computer.
检查您的计算机上是否正在运行名为NVIDIA 网络服务的服务。
Coincidentally this NVIDIA Serviceis running at the port 9990, used for the Admin console of Wildfly.
巧合的是,这个NVIDIA 服务运行在端口 9990,用于Wildfly的管理控制台。
In my case, it was only stop this Service and restart the Wildfly server.
就我而言,它只是停止此服务并重新启动 Wildfly 服务器。
回答by Rigre Garciandía
WildFly is trying to use a port in your PC is already in use. Check in your logs for: “Caused by: java.net.BindException: Address already in use: bind”
WildFly 正在尝试使用您 PC 中已在使用的端口。检查您的日志:“引起:java.net.BindException:地址已在使用:绑定”
Check the port WildFly is using and then you can check if this port is being use for any other application, it could be another instance of WildFly but can be any other application too. For example the port 80could be apache/IIS or any other web server running in your PC.
检查 WildFly 正在使用的端口,然后您可以检查此端口是否正在用于任何其他应用程序,它可能是 WildFly 的另一个实例,但也可以是任何其他应用程序。例如,端口80可以是 apache/IIS 或在您的 PC 中运行的任何其他 Web 服务器。
Normally WildFly (and JBOSS) use 8080by default and looks like you have an application listen in this port, also WildFly use few more ports for other protocols and management that the app server needs. Using the command netstat you can check what other app is using those ports, for example (for 8080 port) you can use the command:
通常,WildFly(和 JBOSS)默认使用8080,看起来您有一个应用程序在此端口侦听,WildFly 还使用更多端口用于应用程序服务器需要的其他协议和管理。使用命令 netstat 您可以检查其他应用程序正在使用这些端口,例如(对于 8080 端口)您可以使用以下命令:
netstat -aon | findstr :8080
netstat -aon | findstr :8080
If you want to do a quick test you can pass this parameter to WildFly “-Djboss.socket.binding.port-offset=2000” this will increase all the ports JBOSS/WildFly use by 2000 (or any other value), then for example if your WildFly was running in "localhost:8080/your-context" now will be "localhost:10080/your-context".
如果你想做一个快速测试,你可以将此参数传递给 WildFly “ -Djboss.socket.binding.port-offset=2000” 这将使 JBOSS/WildFly 使用的所有端口增加 2000(或任何其他值),然后为例如,如果您的 WildFly 在“ localhost:8080/your-context”中运行,现在将是“ localhost:10080/your-context”。
If your JBOSS/WildFly is running in port 80you can play with this parameter to test with another port too, for example “-Djboss.socket.binding.port-offset=10000” will bring you also with the port 10080.
如果您的 JBOSS/WildFly 运行在80端口,您也可以使用此参数来测试另一个端口,例如“ -Djboss.socket.binding.port-offset=10000”也会为您带来10080端口。
Good luck ;)
祝你好运 ;)
回答by teacurran
Wildfly is already running when you try to start it. Check your process viewer, it may show up as wildfly it may show up just as 'java'.
当您尝试启动 Wildfly 时,它已经在运行。检查您的进程查看器,它可能显示为wildfly,也可能显示为'java'。
You could be running it as a service, you could be running it from the command line, it is possible that Eclipse started it and isn't aware of it any longer.
您可以将它作为服务运行,也可以从命令行运行它,也可能是 Eclipse 启动了它而不再知道它。
回答by Andreas Dietrich
Just checking my (default) port in a browser via http://localhost:8080it was obvious it was a service/application I installed/tested called Intrexx(which btw. uses the Tomcat application server). After deinstallation everything was fine again.
只是通过http://localhost:8080在浏览器中检查我的(默认)端口,很明显这是我安装/测试的名为Intrexx(顺便说一句,使用 Tomcat 应用程序服务器)的服务/应用程序。卸载后一切正常。
回答by Harun ERGUL
This port already used by NVIDIA or another process. Another way to resolve this problem is to changing default admin port.
此端口已被 NVIDIA 或其他进程使用。解决此问题的另一种方法是更改默认管理端口。
To change the port you have to modify standalone.xml which is resides inside standalone\configuration
folder. Find the port 9990
. Now change the offset from 0 to 1 jboss.socket.binding.port-offset:1
要更改端口,您必须修改位于standalone\configuration
文件夹内的 standalone.xml 。找到端口9990
。现在将偏移量从 0 更改为 1 jboss.socket.binding.port-offset:1
it will increase default port value from 9990
to 9991
它会将默认端口值从9990
增加到9991