3 Replies Latest reply on Jul 7, 2003 12:33 PM by Kevin

    Clustering

    Manav Newbie

      Hi There,

      I am deploying my application in a cluster and farm it. It seems to be clustering and farming. But when i try to connect a stand alone application to HAJNDI by specifying multiple IP Address -

      // Get a naming context
      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
      p.put("java.naming.rmi.security.manager", "yes");
      p.put(Context.PROVIDER_URL,"localhost:1100,192.168.10.99:1100");//HA-JNDI port

      it throws an error.

      [java] [WARN,NamingContext] Failed to connect to 192.168.10.99:1100
      [java] javax.naming.CommunicationException: Failed to connect to server 1
      .168.10.99:1100. Root exception is
      [java] javax.naming.ServiceUnavailableException: Failed to connect to ser
      r 192.168.10.99:1100. Root exception is
      [java] java.net.ConnectException: Connection refused: connect
      [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
      [java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295
      [java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.j
      a:161)
      [java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
      [java] at java.net.Socket.connect(Socket.java:425)
      [java] at java.net.Socket.connect(Socket.java:375)
      [java] at java.net.Socket.(Socket.java:290)
      [java] at java.net.Socket.(Socket.java:198)
      [java] at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSoc
      tFactory.java:69)
      [java] at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSoc
      tFactory.java:62)
      [java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.ja
      :179)
      [java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.jav
      1092)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:
      0)
      [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:
      3)
      [java] at javax.naming.InitialContext.lookup(InitialContext.java:347)

      Any suggestions please why this is happenning.

      Cheers
      Manav

        • 1. Re: Clustering
          Kevin Newbie

          Try port 1099, not 1100, see if that works, report back if it does or not. Someone else had this problem and didn't reply if it worked. We use port 1099, the JNDI port.

          • 2. Re: Clustering
            Sacha Labourey Master

            you are right in specifying port 1100. If it doesn't work, make really sure HA-JNDI is started (and not simply JNDI) and make sure there is no firewall activated on the server that prevents your client from using this port.

            cheers,
            sacha

            • 3. Re: Clustering
              Kevin Newbie

              My bad. I did not realize the fat client should use port 1100. Maybe that is why we see some odd behavior with 1099. I take it I need the hajndi-client.jar file in my fat clients classpath? I also am going to assume that it somehow magically uses the classes in it? We don't have any code using the classes in there, so I am not quite sure how it is working for us now without that .jar file in our classpath, AND how, when it is in the classpath, the smart proxy will use it as opposed to what ever it is doing now?