- 环境说明
- RMI服务器
- JBoss 5.0
- IP:10.0.72.91
- 安装虚拟机
- 防火墙已关
- Window XP
- RMI客户机
- JBoss 5.0
- IP:10.0.72.29
- 安装虚拟机
- RMI服务器
- 方式
- 使用Spring RMI
- 问题 客户端访问时,报connect refused 0.0.0.0
- 问题解决
- 服务器端启动时增加参数 -Djava.rmi.server.hostname=10.0.72.91
- 原因分析
- 在jboss配置文件中,jboss-server.xml 配置中有一项配置 可以使用rmi时,会使用到如下参数。
<!-- The address to use for the host portion of the RMI codebase URL -->
<attribute name="Host">${java.rmi.server.hostname}</attribute>
打完收工!