gpt4 book ai didi

java - JBoss 不会一直运行

转载 作者:太空宇宙 更新时间:2023-11-03 17:22:20 26 4
gpt4 key购买 nike

我已经在我的 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

我可以访问管理控制台。

当我回到 Centos 控制台时,我必须按 Ctrl+C 才能退出,这样我才能做其他事情。

一旦我这样做,我就无法再访问 IPADDRESS:8080/IPADDRESS:8080/application

我认为这不正常,但是我在日志中没有看到任何错误,过去几天我一直在谷歌搜索但找不到答案。

如果有人能阐明正在发生的事情或我必须做些什么来保持 JBoss 运行,那就太好了。

最佳答案

如果您已经在控制台中启动它,已经使用 ctrl + z 首先暂停进程,然后输入 bg 将进程置于后台,然后它将在控制台 session 仍然有效时保持运行 -

[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 启动脚本,此时即使控制台 session 关闭它也会继续运行 -

nohup ./standalone.sh -Djboss.bind.address=192.168.1.26 -Djboss.bind.address.management=192.168.1.26 &

关于java - JBoss 不会一直运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20669339/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com