<!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;">
JBOSS AS 6 M4 Issue: Can't connect remotely to HornetQ. Please help!!
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/omarsiddiqi">Ahmad Siddiqi</a> in <i>Beginner's Corner</i> - <a href="http://community.jboss.org/message/557387#557387">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 installed Jboss AS6 on my local machine and installed it as a windows service. The admin-console comes up fine and I can see everything setup correctly however I can't connect to the Queues via code from a remote computer although it works fine when i use localhost as my url. Following is the error that i'm getting </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Error: javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.217.1:5445 and discovery failed with error: javax.naming.CommunicationException: Receive timed out <a class="jive-link-external-small" href="">Root exception is java.net.SocketTimeoutException: Receive timed out</a>at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1690)at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1761)at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:695)at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)at javax.naming.InitialContext.lookup(InitialContext.java:392)at HelloJms.runExample(HelloJms.java:51)at HelloJms.main(HelloJms.java:29) Caused by: java.net.SocketTimeoutException: Receive timed outat java.net.PlainDatagramSocketImpl.receive0(Native Method)at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)at java.net.DatagramSocket.receive(DatagramSocket.java:725)at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1659)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>After reviewing various blogs I realized that AS6 sets everything up for you by itself. For example it sets up the NettyConnectors and NettyAcceptors by default and uses port 5445 as the default. Even though I attached the hornetq-configuration.xml with the post I want to show a partial view of the hornetq-configuration.xml I have for connectors and acceptors. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My client is extremely simple and all im doing in the client is loading my properties, specifying the url and port and trying to get a queue as follows. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code">
Connection connection = null;
InitialContext initialContext = null;
     
TransportConfiguration config = new TransportConfiguration();
Properties props = new Properties();
// I've tried all sorts of urls here
props.put(Context.PROVIDER_URL, "jnp://192.168.217.1:1099");
props.put(Context.PROVIDER_URL, "jnp://192.168.217.1:5445");
props.put(Context.PROVIDER_URL, "jnp://192.168.217.1:5445");
props.put(Context.PROVIDER_URL, "jnp://ahmads-pc3:5445");
props.put(Context.PROVIDER_URL, "jnp://ahmads-pc3.saccap.int:1099"); // fullname.
props.put(Context.PROVIDER_URL, "jnp://ahmads-pc3.saccap.int:5445"); // fullname.
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES, "java.naming.factory.url.pkgs");
initialContext = new InitialContext(props);
ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("/ConnectionFactory");
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </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/557387#557387">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>