It sounds like the program is binding to a specific IP address or network interface. Run netstat -tnlp | grep :1099 and you will probably see that it is listening on a non-loopback interface.
If you can instruct the application to listen on 0.0.0.0 (the IPv4 wildcard address) then it will be accessible from any network interface on the machine.
I am guessing that your JBoss instance was started with the option --host=x (or -b x) where x is the IP address (not 127.0.0.1, not 0.0.0.0 and not localhost). This means JNDI will only listen on x.
You can determine if this is the case by inspecting the system properties in JMXConsole. Find the MBean jboss:name=SystemProperties,type=Service. Find the operation called showAll and invoke it. The system properties will be displayed. Look for the value of jboss.bind.address and you may find that it says x instead of 0.0.0.0 which it sounds is what you really want.
Having said that, you may have a specific override for the binding address on the naming (jndi) service. The --host= or -b options set the property jboss.bind.address which becomes the default binding address for nearly all the network services, but it is possible to configure individual services to specific bind addresses that are different from jboss.bind.address. Take a look at the jboss:service=Naming MBean in JMXConsole , and look for the BindAddress attribute. That address indicates the interfaces where you can connect to. (If it's 0.0.0.0, then it's all your interfaces.
# ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
...
如果您没有看到 UP LOOPBACK RUNNING,而只看到 LOOPBACK,请使用 ifconfig lo up 启动环回接口,然后重试。
Are you sure the loopback interface is up?
# ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
...
If you don't see UP LOOPBACK RUNNING, but instead only LOOPBACK, start the loopback interface with ifconfig lo up and try again.
发布评论
评论(3)
听起来该程序绑定到特定的 IP 地址或网络接口。运行 netstat -tnlp | grep :1099 你可能会看到它正在监听非环回接口。
如果您可以指示应用程序侦听
0.0.0.0
(IPv4 通配符地址),则可以从计算机上的任何网络接口访问它。It sounds like the program is binding to a specific IP address or network interface. Run
netstat -tnlp | grep :1099
and you will probably see that it is listening on a non-loopback interface.If you can instruct the application to listen on
0.0.0.0
(the IPv4 wildcard address) then it will be accessible from any network interface on the machine.我猜测您的 JBoss 实例是使用选项 --host=x (或 -b x)启动的,其中 x 是 IP 地址(不是 127.0.0.1,不是 0.0.0.0,也不是 localhost)。这意味着 JNDI 将仅侦听 x。
您可以通过检查 JMXConsole 中的系统属性来确定是否属于这种情况。找到 MBean jboss:name=SystemProperties,type=Service。找到名为 showAll 的操作并调用它。将显示系统属性。查找 jboss.bind.address 的值,您可能会发现它显示的是 x 而不是 0.0.0.0,这听起来正是您真正想要的。
话虽如此,您可能对命名 (jndi) 服务上的绑定地址有特定的覆盖。 --host= 或 -b 选项设置属性 jboss.bind.address,该属性将成为默认绑定几乎所有网络服务的地址,但是可以将各个服务配置到与jboss.bind.address不同的特定绑定地址。查看 JMXConsole 中的 jboss:service=Naming MBean,并查找 BindAddress 属性。该地址指示您可以连接到的接口。 (如果是 0.0.0.0,那么它就是您的所有接口。
希望有所帮助。
I am guessing that your JBoss instance was started with the option --host=x (or -b x) where x is the IP address (not 127.0.0.1, not 0.0.0.0 and not localhost). This means JNDI will only listen on x.
You can determine if this is the case by inspecting the system properties in JMXConsole. Find the MBean jboss:name=SystemProperties,type=Service. Find the operation called showAll and invoke it. The system properties will be displayed. Look for the value of jboss.bind.address and you may find that it says x instead of 0.0.0.0 which it sounds is what you really want.
Having said that, you may have a specific override for the binding address on the naming (jndi) service. The --host= or -b options set the property jboss.bind.address which becomes the default binding address for nearly all the network services, but it is possible to configure individual services to specific bind addresses that are different from jboss.bind.address. Take a look at the jboss:service=Naming MBean in JMXConsole , and look for the BindAddress attribute. That address indicates the interfaces where you can connect to. (If it's 0.0.0.0, then it's all your interfaces.
Hope that helps.
您确定环回接口已启动吗?
如果您没有看到
UP LOOPBACK RUNNING
,而只看到LOOPBACK
,请使用ifconfig lo up
启动环回接口,然后重试。Are you sure the loopback interface is up?
If you don't see
UP LOOPBACK RUNNING
, but instead onlyLOOPBACK
, start the loopback interface withifconfig lo up
and try again.