5 Replies Latest reply on Aug 23, 2010 1:25 AM by Hugh Bragg

    Problem with JNDI

    Cinto qq Newbie



      I am trying out standalone Hornetq on a Linux server, but I am not able to get the JNDI to start up.


      I have tried adding "-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" to run.sh, enabled the JNDI service inside hornetq-beans.xml, but is still unable to start up JNDI service.


      Is there any other ways where we can start JNDI service?






        • 1. Re: Problem with JNDI
          Jeff Mesnil Master

          I don't understand your issue: these properties are to allow remote JMX management and are not related to JNDI at all...


          Do you have a problem with JNDI or JMX?

          What is the error message you got?

          • 2. Re: Problem with JNDI
            Cinto qq Newbie

            Hi Jeff,


            I think I have misunderstood. I thought the settings are meant to startup the JNDI server.


            I was testing my queue, and I got this error:"error in initialize : javax.naming.CommunicationException: Could not obtain connection to any of these urls: dlwb07v:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server server/ipaddress:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server server/ipaddress:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]". When I checked the server using "netstat -a", I found that the ports 1099 and 1098 are not open.


            Could it be that my settings for Hornetq is incorrect?




            • 3. Re: Problem with JNDI
              Clebert Suconic Master

              The JNDI is configured at the hornetq-beans.xml on the standalone:



              look for this on hornetq-beans.xml


                 <bean name="JNDIServer">
                    <property name="namingInfo">
                       <inject bean="Naming"/>
                    <property name="port">1099</property>
                    <property name="bindAddress">localhost</property>
                    <property name="rmiPort">1098</property>
                    <property name="rmiBindAddress">localhost</property>
              • 4. Re: Problem with JNDI
                Cinto qq Newbie

                Hi Clebert,


                Thanks, I have that in my xml file. However i still get the "Failure to connect to server" error.


                Do I need to make other changes to the server?




                • 5. Re: Problem with JNDI
                  Hugh Bragg Newbie

                  If you're connecting remotely, change the JNDI setting Clebert showed you and then change the run.sh file to include new -Djnp.host=localhost -Dhornetq.remoting.netty.host=localhost startup properties.


                  There's an example provided for the clustering setup in the run.sh file