这是我第一次尝试运行jboss。我已经下载了jboss-as-7.1.1.Final.zip并尝试从root用户运行jboss standalone.sh(所有jboss文件也属于root)。但是,当我尝试打开http://127.0.0.1:8080/或http://0.0.0.0:8080/或http://localhost:8080/时,总是会无法连接。并且netstat -na | grep 8080
始终不返回任何内容。
我还已经在 /root/.bashrc 中配置了下一个变量:
export JAVA_HOME=/jboss/jre1.8.0_171
export PATH=$PATH:$JAVA_HOME/bin
export JBOSS_HOME=/jboss/jboss-as-7.1.1.Final
它们是:
echo $JAVA_HOME; echo $JBOSS_HOME; echo $PATH
/jboss/jre1.8.0_171
/jboss/jboss-as-7.1.1.Final
/sbin:/bin:/usr/sbin:/usr/bin:/jboss/jre1.8.0_171/bin:/jboss/apache-maven-3.6.0/bin
我尝试运行sh standalone.sh
和sh standalone.sh -b 0.0.0.0
,但没有任何改变。
我尝试更改 standalone / configuration / standalone.xml :
<interfaces>
<interface name="management">
<any-address/>
</interface>
<interface name="public">
<any-address/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
但再次...什么都没有改变。
standalone / log / boot.log中的日志:
18:10:36,349 INFO [org.jboss.modules] JBoss Modules version 1.1.5.GA
18:10:36,478 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
18:10:36,523 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
18:10:36,524 DEBUG [org.jboss.as.config] Configured system properties:
[Standalone] =
awt.toolkit = sun.awt.X11.XToolkit
file.encoding = UTF-8
file.encoding.pkg = sun.io
file.separator = /
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.awt.headless = true
java.awt.printerjob = sun.print.PSPrinterJob
java.class.path = /jboss/jboss-as-7.1.1.Final/jboss-modules.jar
java.class.version = 52.0
java.endorsed.dirs = /jboss/jre1.8.0_171/lib/endorsed
java.ext.dirs = /jboss/jre1.8.0_171/lib/ext:/usr/java/packages/lib/ext
java.home = /jboss/jre1.8.0_171
java.io.tmpdir = /tmp
java.library.path = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.net.preferIPv4Stack = true
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.8.0_171-b11
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.8
java.util.logging.manager = org.jboss.logmanager.LogManager
java.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
java.version = 1.8.0_171
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.8
java.vm.vendor = Oracle Corporation
java.vm.version = 25.171-b11
javax.management.builder.initial = org.jboss.as.jmx.PluggableMBeanServerBuilder
javax.xml.datatype.DatatypeFactory = __redirected.__DatatypeFactory
javax.xml.parsers.DocumentBuilderFactory = __redirected.__DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory = __redirected.__SAXParserFactory
javax.xml.stream.XMLEventFactory = __redirected.__XMLEventFactory
javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory
javax.xml.stream.XMLOutputFactory = __redirected.__XMLOutputFactory
javax.xml.transform.TransformerFactory = __redirected.__TransformerFactory
javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema = __redirected.__SchemaFactory
javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom = __redirected.__XPathFactory
jboss.home.dir = /jboss/jboss-as-7.1.1.Final
jboss.host.name = xxxxx
jboss.modules.dir = /jboss/jboss-as-7.1.1.Final/modules
jboss.modules.system.pkgs = org.jboss.byteman
jboss.node.name = xxxxx
jboss.qualified.host.name = xxxxx
jboss.server.base.dir = /jboss/jboss-as-7.1.1.Final/standalone
jboss.server.config.dir = /jboss/jboss-as-7.1.1.Final/standalone/configuration
jboss.server.data.dir = /jboss/jboss-as-7.1.1.Final/standalone/data
jboss.server.default.config = standalone.xml
jboss.server.deploy.dir = /jboss/jboss-as-7.1.1.Final/standalone/data/content
jboss.server.log.dir = /jboss/jboss-as-7.1.1.Final/standalone/log
jboss.server.name = xxxxx
jboss.server.temp.dir = /jboss/jboss-as-7.1.1.Final/standalone/tmp
line.separator =
logging.configuration = file:/jboss/jboss-as-7.1.1.Final/standalone/configuration/logging.properties
module.path = /jboss/jboss-as-7.1.1.Final/modules
org.jboss.boot.log.file = /jboss/jboss-as-7.1.1.Final/standalone/log/boot.log
org.jboss.resolver.warning = true
org.xml.sax.driver = __redirected.__XMLReaderFactory
os.arch = amd64
os.name = Linux
os.version = 3.10.0-862.14.4.el7.x86_64
path.separator = :
sun.arch.data.model = 64
sun.boot.class.path = /jboss/jre1.8.0_171/lib/resources.jar:/jboss/jre1.8.0_171/lib/rt.jar:/jboss/jre1.8.0_171/lib/sunrsasign.jar:/jboss/jre1.8.0_171/lib/jsse.jar:/jboss/jre1.8.0_171/lib/jce.jar:/jboss/jre1.8.0_171/lib/charsets.jar:/jboss/jre1.8.0_171/lib/jfr.jar:/jboss/jre1.8.0_171/classes
sun.boot.library.path = /jboss/jre1.8.0_171/lib/amd64
sun.cpu.endian = little
sun.cpu.isalist =
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = /jboss/jboss-as-7.1.1.Final/jboss-modules.jar -mp /jboss/jboss-as-7.1.1.Final/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/jboss/jboss-as-7.1.1.Final
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = UTF-8
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.os.patch.level = unknown
sun.rmi.dgc.client.gcInterval = 3600000
sun.rmi.dgc.server.gcInterval = 3600000
user.country = US
user.dir = /jboss/jboss-as-7.1.1.Final/bin
user.home = /root
user.language = en
user.name = root
user.timezone = Europe/xxxxx
18:10:36,530 DEBUG [org.jboss.as.config] VM Arguments: -D[Standalone] -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 -Dorg.jboss.boot.log.file=/jboss/jboss-as-7.1.1.Final/standalone/log/boot.log -Dlogging.configuration=file:/jboss/jboss-as-7.1.1.Final/standalone/configuration/logging.properties
我的控制台:
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /jboss/jboss-as-7.1.1.Final
JAVA: /jboss/jre1.8.0_171/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
=========================================================================
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
18:10:36,349 INFO [org.jboss.modules] JBoss Modules version 1.1.5.GA
18:10:36,478 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
18:10:36,523 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
我还能做什么?出于某种原因,任何想法都可以继续搜索。...
答案 0 :(得分:0)
在standalone.xml中尝试此操作(考虑到您的JBoss已启动):
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
<interface name="any">
<any-address/>
</interface>
</interfaces>
答案 1 :(得分:0)
感谢Federico klez Culloca。我试图找到为什么得到starting
而不是started
的原因。并发现:
https://developer.jboss.org/thread/238565
“ AS7.1在JDK8上不起作用。” =>因此,我安装了jdk1.7.0_80,它会有所帮助。我可以在浏览器中打开http://localhost:8080,然后返回netstat -na | grep 8080
:
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN