JBoss 无法访问,为什么?

JBoss 无法访问,为什么?

我在笔记本电脑的 20GB 分区上运行 CentOS 6(适用于 32 位架构)。我尝试使用 java 8 安装 JBoss 7.1.1(JAVA_HOME=/usr/java/jdk1.8.0_152)。基本上我按照网上的步骤操作指导但现在当我以管理用户“jboss”的身份启动 Jboss 时,我无法通过 Firefox 访问服务器(“无法连接”)。但我知道服务器正在运行,CPU 以最大速度运行并ps -ef | grep jboss产生大量输出。当我尝试停止服务器时,我得到了

[jboss@centos jboss-as-7.1.1.Final]$ bin/jboss-cli.sh --connect command=:shutdown
org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:22
[...output truncated...]

我怀疑iptables阻塞了流量,所以我为端口 8080 和 9990 设置了规则:

[dolly@centos opt]$ sudo iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
4    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
5    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:631 
6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:631 
7    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           state NEW udp dpt:631 
8    ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         state NEW udp dpt:5353 
9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
10   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:80 
11   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:8080 
12   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:9990 
13   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:8080 /* Jboss AppSrv */ 
14   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
3    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
4    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         
[dolly@centos opt]$ sudo service iptables save 

不能telnet localhost 8080但可以ping localhost。这里是netstat

[dolly@centos jboss-as-7.1.1.Final]$ netstat -napt | grep LISTEN
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      -                   
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      -                   
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      -                   
tcp        0      0 0.0.0.0:58074               0.0.0.0:*                   LISTEN      -                   
tcp        0      0 :::57773                    :::*                        LISTEN      -                   
tcp        0      0 :::111                      :::*                        LISTEN      -                   
tcp        0      0 ::1:631                     :::*                        LISTEN      -                   
[dolly@centos jboss-as-7.1.1.Final]$ 

仍然无法通过浏览器连接到应用服务器。知道可能是什么问题吗?

相关内容