<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Timeout Calling EJB from Remote Location
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/teakins">Tim Eakins</a> in <i>EJB 3.0 Development</i> - <a href="http://community.jboss.org/message/535036#535036">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I'm really stuck on this one.&#160; I can successfully run my webstart swing application which makes EJB 3.0 calls to my JBoss 5.1.0 server when I'm on the local network, but not when I'm outside.&#160; In that case, I get timeouts and "Could not obtain connection to any of these urls: pf.servername.org:1099".&#160; Full exception is toward the bottom.&#160; Firewall is off.&#160; All appropriate ports are forwarded.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Even more confusing, I'm able to see the website that I've put the .jnlp and jarfiles on for downloading.&#160; That works fine, jsp debugging output comes through on server.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The logical layout is as follows</p><p><br/>S<span style="font-family: courier new,courier;">erver&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Router&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Outside Domain&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; External Client<br/>192.168.1.7&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 192.168.1.1&#160;&#160;&#160; pf.servername.org&#160;&#160;&#160;&#160;&#160;&#160;&#160; Any.IP&#160; (DOESN'T WORK!!)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">Local<br/>Client<br/>192.168.1.100 (THIS WORKS!&#160; Even when using pf.servername.org for all references!)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>At first I suspected blocked ports, but everything seems to be fine.&#160; My server is as follows.&#160; As mentioned above, I can run with all server references using pf.servername.org and it all works as expected.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>On the server<br/>Running my JBoss application 'pf', everything starts up without warnings or exceptions.&#160; I see the EJBs no problem.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Startup command:<br/><span style="font-family: courier new,courier;">./run.sh -b 192.168.1.7 -c pf</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Ports Forwarded<br/><span style="font-family: courier new,courier;">&#160;&#160;&#160; #&#160;&#160;&#160;&#160; Name&#160;&#160;&#160;&#160;&#160; Start Port&#160;&#160;&#160;&#160; End Port&#160;&#160;&#160;&#160;&#160; Server IP Address<br/>&#160;&#160;&#160; 7&#160;&#160;&#160;&#160; PF&#160;&#160;&#160; 8080&#160;&#160;&#160; 8080&#160;&#160;&#160; 192.168.1.7<br/>&#160;&#160;&#160; 8&#160;&#160;&#160;&#160; HTTPS&#160;&#160;&#160; 443&#160;&#160;&#160; 443&#160;&#160;&#160; 192.168.1.7<br/>&#160;&#160;&#160; 9&#160;&#160;&#160;&#160; RMI&#160;&#160;&#160; 8083&#160;&#160;&#160; 8083&#160;&#160;&#160; 192.168.1.7<br/>&#160;&#160;&#160; 10&#160;&#160;&#160; PFIC&#160;&#160;&#160; 1090&#160;&#160;&#160; 1099&#160;&#160;&#160; 192.168.1.7<br/>&#160;&#160;&#160; 11&#160;&#160;&#160; PFRMIC&#160;&#160;&#160; 4444&#160;&#160;&#160; 4444&#160;&#160;&#160; 192.168.1.7<br/>&#160;&#160;&#160; 12&#160;&#160;&#160; PFEJB&#160;&#160;&#160; 3873&#160;&#160;&#160; 3873&#160;&#160;&#160; 192.168.1.7<br/>&#160;&#160;&#160; 13&#160;&#160;&#160; bisocket&#160;&#160;&#160; 4457&#160;&#160;&#160; 4457&#160;&#160;&#160; 192.168.1.7</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Made sure no firewall</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;"># /etc/init.d/iptables stop<br/>iptables: Flushing firewall rules:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; OK&#160; <br/>iptables: Setting chains to policy ACCEPT: filter&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; OK&#160; <br/>iptables: Unloading modules:&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; OK&#160; </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>hosts is simple, but has reference</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;"># cat /etc/hosts<br/># hostname viper added to /etc/hosts by anaconda<br/>127.0.0.1&#160;&#160; localhost localhost.localdomain localhost4 localhost4.localdomain4 viper<br/>::1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; localhost localhost.localdomain localhost6 localhost6.localdomain6 viper<br/>192.168.1.7 viper</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any of the online port checkers say that 1099 is open.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>On the external client:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>After swing jar has downloaded via webstart and runs, output in console</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">Logger.java:239: Failed to connect to pf.servername.org:1099<br/>javax.naming.CommunicationException:&#160; Failed to connect to server pf.servername.org/68.xxx.45.160:1099 Root exception is<br/>javax.naming.ServiceUnavailableException: Failed to connect to server pf.servername.org/68.xxx.45.160:1099 Root exception is<br/>java.net.ConnectException: Connection timed out: connect<br/>&#160; at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335)<br/>&#160; at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734)<br/>&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693)<br/>&#160; at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)<br/>&#160; at javax.naming.InitialContext.lookup(Unknown Source)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">&#160; ...<br/>&#160; <br/>Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server pf.servername.org/68.xxx.45.160:1099 Root exception is<br/>java.net.ConnectException: Connection timed out: connect<br/>&#160; at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305)<br/>&#160; ... 17 more<br/>&#160; <br/>Caused by: java.net.ConnectException: Connection timed out: connect<br/>&#160; at java.net.PlainSocketImpl.socketConnect(Native Method)<br/>&#160; at java.net.PlainSocketImpl.doConnect(Unknown Source)<br/>&#160; at java.net.PlainSocketImpl.connectTo(Unknown Source)<br/>&#160; at java.net.PlainSocketImpl.connect(Unknown Source)<br/>&#160; at java.net.SocksSocketImpl.connect(Unknown Source)<br/>&#160; at java.netSocket.connect(Unknown Source)</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">&#160; ...</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">?:?: Unable to connect to remote. error=Could not obtain connection to any of these urls: pf.servername.org:1099</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So I'm really confused.&#160; jars download, application comes up, but no EJB calls work.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I should point out that even though my client works locally, I do get these "errors" that don't prohibit functionality.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>PFPersister is an EJB</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: courier new,courier;">Logger.java:228: Couldn't handle invocation directly within org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler@1526e3: Current invocation "public abstract java.lang.Object pfcommon.ejb.library.persist.PFPersisterInterface.queryForObject(java.lang.String,java.util.Map)" is not eligible for direct handling by org.jboss.ejb3.proxy.impl.handler.session.SessionRemoteProxyInvocationHandler@1526e3<br/>Logger.java:228: Received invocation request to method pfcommon.ejb.library.persist.PFPersisterInterfaceRemote: pfcommon.ejb.library.persist.PFPersisterInterface.queryForObject(java.lang.String,java.util.Map); using hash: 4728166201795524950<br/>Logger.java:228: SocketClientInvoker[4276fd, socket://192.168.1.7:3873] connecting<br/>Logger.java:228: SocketClientInvoker[4276fd, socket://192.168.1.7:3873] connected<br/>Logger.java:228: removed SocketClientInvoker[4276fd, socket://192.168.1.7:3873] from registry</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Searching groups for this hasn't yet shown what the problem is here.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I've also tried putting @RemoteBinding entries as well with no luck.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any help, thoughts much appreciated!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks,<br/>Tim</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/535036#535036">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB 3.0 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>