<!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">JBoss 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;">
Problem with remote JNP. Can't connect to remote JBoss
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/timeking">Ilya Muromtsev</a> in <i>EJB 3.0</i> - <a href="http://community.jboss.org/message/550299#550299">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>When startup JBoss localy it is works fine: all beans are works well. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I want to separate server and remote client.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>But when I trying to connect to <strong><em>remote</em></strong><em> JBoss</em> by changing<em> <strong>java.naming.provider.url</strong> </em>property </p><p>          from <em>jnp://127.0.0.1:1099</em></p><p>          to <em>jnp://remote-JBoss-IP:1099</em></p><p>in the <strong>jndi.properties</strong> file.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Resulted <em>jndi.properties</em> file is:</p><blockquote class="jive-quote"><p><p>java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory<br/>java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces</p><p>java.naming.provider.url=<em>jnp://remote-JBoss-IP:1099 </em></p></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Then I recieve an exception:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p><div id="_mcePaste">javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: server; nested exception is:</div><div id="_mcePaste">        java.net.UnknownHostException: server]</div><div id="_mcePaste">        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:841)</div><div id="_mcePaste">        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)</div><div id="_mcePaste">        at javax.naming.InitialContext.lookup(InitialContext.java:392)</div><div id="_mcePaste">        at ru.net.wingbull.shop.client.ApplicationMain.createAndShowGUI(ApplicationMain.java:28)</div><div id="_mcePaste">        at ru.net.wingbull.shop.client.ApplicationMain.access$000(ApplicationMain.java:16)</div><div id="_mcePaste">        at ru.net.wingbull.shop.client.ApplicationMain$1.run(ApplicationMain.java:45)</div><div id="_mcePaste">        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)</div><div id="_mcePaste">        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)</div><div id="_mcePaste">Caused by: java.rmi.UnknownHostException: Unknown host: server; nested exception is:</div><div id="_mcePaste">        java.net.UnknownHostException: server</div><div id="_mcePaste">        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:598)</div><div id="_mcePaste">        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)</div><div id="_mcePaste">        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)</div><div id="_mcePaste">        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)</div><div id="_mcePaste">        at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)</div><div id="_mcePaste">        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)</div><div id="_mcePaste">        ... 13 more</div><div id="_mcePaste">Caused by: java.net.UnknownHostException: server</div><div id="_mcePaste">        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)</div><div id="_mcePaste">        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)</div><div id="_mcePaste">        at java.net.Socket.connect(Socket.java:529)</div><div id="_mcePaste">        at java.net.Socket.connect(Socket.java:478)</div><div id="_mcePaste">        at java.net.Socket.<init>(Socket.java:375)</div><div id="_mcePaste">        at java.net.Socket.<init>(Socket.java:189)</div><div id="_mcePaste">        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)</div><div id="_mcePaste">        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)</div><div id="_mcePaste">        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)</div><div id="_mcePaste">        ... 18 more</div><div id="_mcePaste">Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: javax.naming.CommunicationException [Root exception is java.rmi.UnknownHo</div><div id="_mcePaste">stException: Unknown host: server; nested exception is:</div><div id="_mcePaste">        java.net.UnknownHostException: server]</div><div id="_mcePaste">        at ru.net.wingbull.shop.client.ApplicationMain$1.run(ApplicationMain.java:48)</div><div id="_mcePaste">        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)</div><div id="_mcePaste">        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)</div><div id="_mcePaste">        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)</div><div id="_mcePaste">Caused by: javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: server; nested exception is:</div></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>BTW, remote machine localy named as "<strong>server</strong>", and I checked (using <em>tcpview</em> tool) that client application establish connection with remote-JBoss on 1099 but then throwing this exception. How to avoid it? </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Ilya</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/550299#550299">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB 3.0 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>