-
1. Re: Server behind the NAT firewall (again)
ron_sigal Aug 25, 2010 9:08 AM (in response to egiva)Hi Ejidijus,
I don't see anything wrong with your configuration.
* What do you mean by "Server is running on computer which doesn't have remote IP only local"?
* Is 10.198.138.148 the value you associated with "clientConnectAddress" or your localhost address?
-Ron
-
2. Re: Server behind the NAT firewall (again)
egiva Aug 25, 2010 10:31 AM (in response to ron_sigal)"Server is running on computer which doesn't have remote IP only local"
jboss server is running on computer which has only network configuraiton and it is only local IP. This computer is accessed via router which makes makes NAT'ing to this local IP
Is 10.198.138.148 the value you associated with "clientConnectAddress" or your localhost address?
it is local ip
After debuging a while I found solution by entering serverBindAddress via URL parameter. I don't know it it is right configuration, but with this I got progress on issue:
<value-factory bean="ServiceBindingManager"
method="getStringBinding">
<parameter>
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
</parameter>
<parameter>
<null />
</parameter>
<parameter>socket://remote_IP:${port}/?clientConnectAddress=remote_IP&serverBindAddress=${jboss.bind.address}</parameter>
<parameter>
<null />
</parameter>
<parameter>3873</parameter>
</value-factory> -
3. Re: Server behind the NAT firewall (again)
egiva Aug 26, 2010 4:15 AM (in response to egiva)Just information for other. My server was behind NAT router and it accepted connections from outside and from localhost. I have configured
ejb3-connectors-jboss-beans.xml file following and it works:
socket://multihome:${port}/?homes=${jboss.bind.address}&connecthomes=localhost!<remote_IP>
-
4. Re: Server behind the NAT firewall (again)
natsuko Oct 18, 2011 4:39 AM (in response to egiva)I have a similar problem, and I am using JBoss AS6. I believe the way of configuring ejb3-connectors-jboss-beans.xml is the right way for AS6 ?
[ Is that the only place to configure? ]
And I finally found some syntax explanation in JBoss Remoting Guide (version 2.5.4.SP2), in section 5.4.1.2. Multihome servers.
This is my scenario:
We have a physical Server A (internal IP: 192.168.2.187) within LAN, which connects to outside world via a modem/router. We use Dynamic DNS service for outside to connect to our Server A. So we have a web page that can be accessed this way: http://xyz.dyndns-server.com:8080/myweb/
For this Dyn DNS to work, the modem/router has to have forwarding address (xyz.dyndns-server.com => 192.168.2.187, with corresponding ports). We open up ports 8080 and 1099.
This is the line that I have in ejb3-connectors-jboss-beans.xml :
<parameter>socket://multihome:${port}/?homes=${jboss.bind.address}&connecthomes=192.168.2.187!xyz.dyndns-server.com</parameter>
The problem is that, though my web application (html, jsp, servlet) is working fine, my Swing client somehow could not access the EJB3 (remote stateful session bean). My Swing client, running in any other workstation/PC within the LAN, can access my EJB3 bean in Server A just fine. I started the JBoss AS 6 with -b 0.0.0.0 option.
My Swing client uses the following for JNDI connection:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://xyz.dyndns-server.com:1099
Can anyone help me out? What could be the root cause? Do I miss anything here? Thanks a lot.
~Tew
-
5. Re: Server behind the NAT firewall (again)
ron_sigal Nov 21, 2011 6:46 PM (in response to natsuko)Hi Tew,
Are you saying that your Swing client is having a problem accessing JDNI on the server, i.e., it is unable to download the EJB3 client proxy? If that is the problem, then I can tell you that the JNDI implementation does not use Remoting, so the multihome trick will not work for JNDI.
The JDNI implementation is part of the Application Server code base, so, if I have interpreted your problem correctly, I suggest that you post the question to the "JNDI and Naming" forum here: http://community.jboss.org/en/jbossas/jndi.
-Ron
-
6. Re: Server behind the NAT firewall (again)
johnburgess Jun 27, 2012 7:14 AM (in response to natsuko)You'll need to open ports 1098 (???more jndi of some sort) and 3873 (the actuall ejb3 bean) as well