WildFly started with errors: java.net.BindException: Address already in use

后端 未结 5 670
独厮守ぢ
独厮守ぢ 2020-12-15 08:21

When I start WildFly in Eclipse, I get this error:

22:03:42,430 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start servic         


        
相关标签:
5条回答
  • 2020-12-15 08:48

    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

    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 80 could be apache/IIS or any other web server running in your PC.

    Normally WildFly (and JBOSS) use 8080 by 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:

    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".

    If your JBOSS/WildFly is running in port 80 you 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.

    Good luck ;)

    0 讨论(0)
  • 2020-12-15 08:52

    Check if you have service called NVIDIA Network Service running at your computer.

    Coincidentally this NVIDIA Service is running at the port 9990, used for the Admin console of Wildfly.

    In my case, it was only stop this Service and restart the Wildfly server.

    0 讨论(0)
  • 2020-12-15 08:56

    Just checking my (default) port in a browser via http://localhost:8080 it 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.

    0 讨论(0)
  • 2020-12-15 09:08

    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'.

    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.

    0 讨论(0)
  • 2020-12-15 09:10

    This port already used by NVIDIA or another process. Another way to resolve this problem is to changing default admin port.

    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

    it will increase default port value from 9990 to 9991

    0 讨论(0)
提交回复
热议问题