我在Centos盒子上安装了JBOSS AS 7.1。
运行命令时
./standalone.sh -Djboss.bind.address=192.168.1.26 -Djboss.bind.address.management=192.168.1.26
我得到以下输出:
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/share/jboss-as-7.1.1.Final
JAVA: /usr/java/jdk1.7.0_45/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml
=========================================================================
16:51:54,714 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
16:51:55,128 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
16:51:55,211 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
16:51:56,816 INFO [org.xnio] XNIO Version 3.0.3.GA
16:51:56,829 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
16:51:56,859 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
16:51:56,890 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
16:51:56,950 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
16:51:56,974 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
16:51:56,996 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
16:51:57,085 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
16:51:57,092 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
16:51:57,094 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
16:51:57,186 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
16:51:57,206 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final
16:51:57,252 INFO [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
16:51:57,357 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
16:51:57,498 INFO [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service
16:51:57,885 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA
16:51:58,034 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]
16:51:58,165 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-2) Starting Coyote HTTP/1.1 on http--192.168.1.26-8080
16:51:59,000 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) JBAS015012: Started FileSystemDeploymentService for directory /usr/share/jboss-as-7.1.1.Final/standalone/deployments
16:51:59,127 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /192.168.1.26:9999
16:51:59,154 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /192.168.1.26:4447
16:51:59,277 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
16:51:59,370 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://192.168.1.26:9991
16:51:59,371 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 5160ms - Started 133 of 208 services (74 services are passive or on-demand)
然后它似乎挂了。
虽然这是在控制台中进行的,但我可以访问我的java应用程序IPADDRESS:8080/application
我可以访问admin concole。
当我回到Centos控制台时,我必须按 Ctrl + C 才能离开,这样我就可以做其他事情了。
一旦我这样做,我就再也无法前往IPADDRESS:8080/
或IPADDRESS:8080/application
。
我认为这不正常,但是我没有在日志中看到任何错误,过去几天我一直在搜索谷歌,但找不到答案。
如果有人能够了解正在发生的事情或我必须做些什么来保持JBoss运行它会很棒。
答案 0 :(得分:1)
如果您已经在控制台中启动它,请先使用ctrl + z暂停该过程,然后键入bg以显示该过程,然后它将保持运行,同时控制台会话仍然有效 -
[Server:server-two] 21:14:08,067 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) started in 13601ms - Started 147 of 209 services (61 services are passive or on-demand)
^Z
[1]+ Stopped ./domain.sh
#:~/JBoss/jboss-eap-6.2/bin$ bg
[1]+ ./domain.sh &
#:~/JBoss/jboss-eap-6.2/bin$
如上所述将其作为服务运行对于正确的环境来说是正确的做法,但是你也可以使用nohup启动脚本,即使控制台会话关闭它也会保持运行 -
nohup ./standalone.sh -Djboss.bind.address=192.168.1.26 -Djboss.bind.address.management=192.168.1.26 &
答案 1 :(得分:0)
这听起来很正常。服务器已启动并正在运行。
然而,按 Ctrl + C 只会杀死进程,因此它确实无法访问。
您想要实现的目标是:“如何将JBoss作为服务运行?”
尝试其中一种方法:
如果您只想进行快速测试运行,只需将&
附加到您的命令即可将JBoss发送到后台。