从外部访问JBoss4.2.X应用

最近搞cxf发布服务,遇到个问题:

在本地通过IP或机器名无法访问制作好的Webservice,只能是localhost。

鉴于以往的经验,检查网络、网卡等,都没问题啊。

是什么问题呢。

在网上搜到这样的解决办法;

1.启动脚本加 -b 0.0.0.0

在Jboss的启动脚本中加入 -b 0.0.0.0,外部就可以访问了。

 2.修改server.xml(JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml)

原内容:
         maxThreads="250" maxHttpHeaderSize="8192"
         emptySessionPath="true" protocol="HTTP/1.1"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" />
->
改后内容:
          maxThreads="250" maxHttpHeaderSize="8192"
         emptySessionPath="true" protocol="HTTP/1.1"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" />
 
参考资料:

Enabling remote access to JBoss 4.2

var dzone_url = 'http://jlorenzen.blogspot.com/2007/10/enabling-remote-access-to-jboss-42.html'

Today I had an issue remotely accessing my JBoss instance running on another machine. Unknowingly, JBoss 4.2 binds specifically to 127.0.0.1 by default (see below for me details). Thankfully they had a simple solution; just append -b 0.0.0.0 to your startup script. to bind to all interfaces. So to start JBoss on linux when I know I want to access it remotely I do:

./jboss/bin/run.sh -b 0.0.0.0

ReadMe.html content on this subject:
"JBossAS now binds its services to localhost (127.0.0.1) *by default*, instead of binding to all available interfaces (0.0.0.0). This was primarily done for security reasons because of concerns of users going to production without having secured their servers properly. To enable remote access by binding JBoss services to a particular interface, simply run jboss with the -b option. To bind to all available interfaces and re-enable the legacy behavior. use -b 0.0.0.0. In any case, be aware you still need to secure you server properly."

 
 
 
 
 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10531/viewspace-496188/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10531/viewspace-496188/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值