无法在独立模式下访问jboss eap 6的管理控制台

时间:2013-06-14 21:14:22

标签: amazon-ec2 jboss7.x jboss-eap-6

我已经在亚马逊ec2服务器的微型实例中安装了Jboss eap 6.1。我运行了standalone.sh,这似乎运行良好:

[ec2-user@ip-******** bin]$ ./standalone.sh 
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/ec2-user/jboss-eap-6.1

  JAVA: /usr/lib/jvm/java/bin/java

  JAVA_OPTS:  -server -XX:+UseCompressedOops -Xms64m -Xmx86m -XX:MaxPermSize=64m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

20:58:47,062 INFO  [org.jboss.modules] (main) JBoss Modules version 1.2.0.Final-redhat-1
20:58:47,506 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA-redhat-1
20:58:47,745 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015899: JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) starting
20:58:50,396 INFO  [org.xnio] (MSC service thread 1-2) XNIO Version 3.0.7.GA-redhat-1
20:58:50,426 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.0.7.GA-redhat-1
.......
20:58:52,215 INFO  [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.1.3.Final-redhat-3
20:58:53,245 INFO  [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003001: Coyote HTTP/1.1 initializing on : 127.0.0.1:8080
20:58:53,272 INFO  [org.apache.coyote.http11] (MSC service thread 1-1) JBWEB003000: Coyote HTTP/1.1 starting on: 127.0.0.1:8080
20:58:54,125 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on 127.0.0.1:9999
20:58:54,174 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /home/ec2-user/jboss-eap-6.1/standalone/deployments
20:58:54,174 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
20:58:54,180 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on 127.0.0.1:4447
20:58:54,510 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on 127.0.0.1:9990/management
20:58:54,512 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on 127.0.0.1:9990
20:58:54,512 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8) started in 8410ms - Started 123 of 177 services (53 services are passive or on-demand)

但是,当我尝试访问管理控制台时:myhostname:8080会出现“无法连接”错误。

我确定端口8080和9990都是打开的,因为我已经安装了jboss-as 7.1并且能够通过myhostname访问管理控制台:8080 ...然后我停止了jboss-as 7.1的服务并启动了jboss-eap-6.1并试图访问它......

任何帮助将不胜感激!

2 个答案:

答案 0 :(得分:12)

管理控制台看起来只是在监听127.0.0.1。

20:58:54,512 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on 127.0.0.1:9990

您可以通过编辑standalone.xml或使用-bmanagement 0.0.0.0参数来更改它。您可以将0.0.0.0替换为公共IP。

答案 1 :(得分:3)

我以为我提到一种更安全的连接方式是通过SSH隧道。

的linux / MAC:

1)ssh -N i [PEM FILE PATH] -L 9992:127.0.0.1:9990 [EC2 username]@[EC2address]

2)然后通过浏览器连接到http://localhost:9992/console/

Windows(Putty):

按照以下链接中的步骤操作(就像您设置SSH到您应该已有的EC2一样)。但这一次,您需要按照以下说明添加隧道:

连接 - > SSH - >隧道 - 输入:

  1. 源端口:9992
  2. 目的地:localhost:9990 然后通过SSH连接conncect
  3. 然后通过浏览器连接到http://localhost:9992/console/

    以下是有关设置与EC2的标准SSH连接

    的更多详细信息

    使用Linux / MAC指南通过SSH连接到EC2:

    http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html

    使用Windows(Putty)指南通过SSH连接到EC2:

    http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html