0 Replies Latest reply on Aug 24, 2010 11:16 AM by egiva

    Server behind the NAT firewall (again)

    egiva

      Boss 5.0.1, EJB 3. Server is running on computer which doesn't have remote IP only local

       

      Got exception "Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://10.198.138.148:3873/?]"

       

      Server is launched -Djava.rmi.server.hostname=<remote_ip> -Dremoting.bind_by_host=false

       

      Additionally I found, that I can and need to define property "clientConnectAddress=<remote_ip>" for jboss remoting.

      I added (uncommented line) into remoting-jboss-bens.xml, but it didn't work. Then I found that this connector is for EJB2 but for EJB3 is used ejb3-connectors-jboss-beans.xml . Then I added following lines to EJB3 connector

       

       

      <!-- Remoting Server Configuration -->
        <bean name="ServerConfiguration"
         >
          <property name="invocationHandlers">
            <map keyClass="java.lang.String" valueClass="java.lang.String">
              <entry>
                <key>AOP</key>
                <value>
                  org.jboss.aspects.remoting.AOPRemotingInvocationHandler
                </value>
              </entry>
            </map>
          </property>
          <property name="invokerLocatorParameters">
            <map keyClass="java.lang.String" valueClass="java.lang.String">
              <entry>
                <key>clientConnectAddress</key>
                <value>
                  <remote_ip>
                </value>
              </entry>
            </map>
          </property>
        </bean>
      Still not working...  I have bad feeling that I am adding clientConnectAddress in wrong way, but there are no sample on this.
      Please advice