背景
公司決定用JBoss為應用服務器,JBoss已更名為WildFly
問題
安裝官網的教程進行了安裝,服務器本機可以訪問,客戶端無法進行訪問
解決
方案1: 修改standalone/configuration/standalone.xml
中所有127.0.0.1
的值為0.0.0.0
方案2: 啟動的時候添加 參數 ./standalone.sh -b 10.0.6.129
;參考:http://feng88724.iteye.com/blog/263211
過程
- 安裝jdk http://www.cnblogs.com/blueying/p/3988962.html
- 安裝wildfly http://blog.csdn.net/kylinsoong/article/details/19203981
- 打開防火牆端口 http://www.cnblogs.com/blueying/p/3976548.html
服務器上使用 curl 127.0.0.1:8080
可以查看到服務器啟動了
[root@test4 ~]# curl 127.0.0.1:8080
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright (c) 2011, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
使用客戶端無法訪問。
使用 netstat -apn
查看端口
[root@test4 ~]# netstat -apn
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 2930/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 860/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 937/master
tcp 0 0 127.0.0.1:9990 0.0.0.0:* LISTEN 2930/java
tcp 0 0 192.168.1.14:22 192.168.1.110:60642 ESTABLISHED 3017/sshd
tcp 0 0 192.168.1.14:22 192.168.1.110:60624 ESTABLISHED 2876/sshd
發現端口是開啟的;ssh可以連接,觀察
0 0.0.0.0:22 0.0.0.0:*
192.168.1.14:22 192.168.1.110:60642
0 192.168.1.14:22 192.168.1.110:60624
而8080的只有127.0.0.1:8080
所以才只能本地訪問;故修改了wildfly的配置文件。具體是為什么暫時不知道...