2

我已经在亚马逊 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 并尝试访问它...

任何帮助将不胜感激!

4

2 回答 2

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。

于 2013-06-14T23:12:35.387 回答
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/

窗户(腻子):

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

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

  1. 源端口:9992
  2. 目的地:localhost:9990 然后通过 SSH 连接进行连接

然后通过浏览器连接到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

于 2014-09-11T11:41:35.867 回答