2013-07-31 99 views
10

我正在學習使用Jboss,因此我試圖安裝它。 我將它下載並解壓到C :. 我已經創建了環境變量,並沒有問題。在Windows 7 64bit上啓動JBoss 7.1.1時出錯

當我啓動standalone.bat我有這個Java異常: 我必須做什麼來解決它?

16:14:04,199 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem 
16:14:04,204 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem 
16:14:04,209 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension 
16:14:04,215 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem 
16:14:04,226 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem 
16:14:04,222 INFO [org.jboss.as.security] (MSC service thread 1-5) JBAS013100: Current PicketBox version=4.0.7.Final 
16:14:04,246 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem. 
16:14:04,270 INFO [org.jboss.as.connector] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final) 
16:14:04,332 INFO [org.jboss.as.naming] (MSC service thread 1-16) JBAS011802: Starting Naming Service 
16:14:04,337 INFO [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default] 
16:14:04,373 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 
16:14:04,446 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-11) JBoss Web Services - Stack CXF Server 4.0.2.GA 
16:14:04,665 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-15) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss-as-7.1.1.Final\standalone\deployments 
16:14:04,715 INFO [org.jboss.as.remoting] (MSC service thread 1-11) JBAS017100: Listening on /127.0.0.1:4447 
16:14:04,727 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080 
16:14:04,767 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-12) MSC00001: Failed to start service jboss.remoting.server.management: org.jboss.msc.service.StartException in service jboss.remoting.server.management: JBAS017112: Address already in use: bind /127.0.0.1:9999 
    at org.jboss.as.remoting.AbstractStreamServerService.start(AbstractStreamServerService.java:109) [jboss-as-remoting-7.1.1.Final.jar:7.1.1.Final] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] 
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25] 
    at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] 
Caused by: java.net.BindException: Address already in use: bind 
    at sun.nio.ch.Net.bind0(Native Method) [rt.jar:1.7.0_25] 
    at sun.nio.ch.Net.bind(Net.java:444) [rt.jar:1.7.0_25] 
    at sun.nio.ch.Net.bind(Net.java:436) [rt.jar:1.7.0_25] 
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214) [rt.jar:1.7.0_25] 
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) [rt.jar:1.7.0_25] 
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67) [rt.jar:1.7.0_25] 
    at org.xnio.nio.NioXnioWorker.createTcpServer(NioXnioWorker.java:287) 
    at org.xnio.XnioWorker.createStreamServer(XnioWorker.java:135) [xnio-api-3.0.3.GA.jar:3.0.3.GA] 
    at org.jboss.remoting3.remote.RemoteConnectionProvider$ProviderInterface.createServer(RemoteConnectionProvider.java:209) [jboss-remoting-3.2.3.GA.jar:3.2.3.GA] 
    at org.jboss.as.remoting.AbstractStreamServerService.start(AbstractStreamServerService.java:101) [jboss-as-remoting-7.1.1.Final.jar:7.1.1.Final] 
    ... 5 more 

16:14:04,902 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS] 
16:14:04,910 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report 
JBAS014777: Services which failed to start:  service jboss.remoting.server.management: org.jboss.msc.service.StartException in service jboss.remoting.server.management: JBAS017112: Address already in use: bind /127.0.0.1:9999 

16:14:04,924 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990 
16:14:04,925 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 1967ms - Started 132 of 208 services (1 services failed or missing dependencies, 74 services are passive or on-demand) 
+1

'造成的:java.net.BindException:地址已在使用:bind' – keyser

+0

你已經有一個在你忘記的背景中運行的實例,或者其他使用該端口的實例嗎? – user1111284

回答

0

去任務管理器並殺死所有的java進程,然後嘗試再次運行。

感謝

0

所以,因爲它是消息說jboss綁定地址已經被另一個進程使用。所以先殺死這個過程。

您可以通過以下步驟波紋管

找出進程進程ID匹配程序

Press CTRL+ALT+DELETE, and then click Task Manager. 
Click the Processes tab. 
If you do not have a PID column, click View, click Select Columns, and then click to select the PID (Process Identifier) check box. 
Click the column header that is labeled "PID" to sort the process by their PIDs. You should be able to easily find the process ID and match it to the program that is listed in Task Manager. 

要獲取有關Netstat.exe實用程序

Click Start, and then click Run. 
In the Open box, type: cmd, and then click OK. 
At a command prompt, type: netstat /?. 
9

去其他信息standalone.xml將分配給管理的端口9999更改爲其他內容。這也適用於在eclipse中運行jboss這個異常。

+0

我們有一個運行在9999上的內部Web服務,它與JBOSS Remoting Management相沖突。從配置角度來看,這個答案非常有用。 – timmi4sa

+0

@arunram - 您的解決方案也適用於我。謝謝! – BustedSanta

0

對於Windows:

standalone.bat

在記事本中

添加最後兩行使用

standalone.conf.bat

打開(如下圖所示,也就是2個「更改端口設置偏移」行)(其中前面3行提供麪包屑放置位置)

rem # Make Byteman classes visible in all module loaders 
rem # This is necessary to inject Byteman rules into AS7 deployments 
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman" 

REM NEW LINE HERE Alter Port Settings Offset 
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.socket.binding.port-offset=1000" 
0

請查找http:// <>:9999/console來檢查JBoss Management控制檯是否在您的實例中運行。如果是這樣,請殺死服務器並重新部署。在像我這樣的大多數情況下,在IDE中配置JBoss服務器(如IntelliJ)時,關閉腳本可能不會被明確調出,因此在開始時啓動的JBoss控制檯將永遠不會被關閉,辦法。希望這可以幫助。

4

1)確保你在命令提示符下輸入「mvn --version」來安裝Maven。

2)轉到命令提示符並鍵入「netstat」。如果你和我一樣,都使用該端口的服務,那麼你可能會看到:

enter image description here

確保您的計算機沒有NVIDIA網絡服務(NvNetworkService.exe)作爲服務運行。要檢查它,請按Ctrl + Alt + Delete並轉到任務管理器。然後在服務選項卡下,尋找NvNetworkService:

enter image description here

enter image description here 已經停止服務後,可以檢查該端口是否被轉到提示符並鍵入「netstat的」再次命令釋放。這一次,你不應該看到任何與你的127.0.0.1:990本地地址相關的外地址。或者,如果你像我一樣,你可能會看到這一點:

enter image description here

下面是另一個類似的例子= https://developer.jboss.org/wiki/WildFly8xjavanetBindExceptionAddressAlreadyInUseOnFreshInstallInWindowsVista78