1 Reply Latest reply on May 10, 2004 1:43 PM by Adrian Brock

    Cannot authenticate user ConnectException Connection refused

    ktm Newbie

      Hi, I'm pretty new to JBoss and have a situation here and i really hope someone could lend a hand.

      I'm running JBoss 3.2.3 on a redhat 9 machine.
      The client is running off a Fedora machine. (the jbossall-client.jar is also 3.2.3)

      The client needs to publish a message to JMS, but it keeps throwing this exception:

      org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.ConnectException: Connection refused)
      at org.jboss.mq.Connection.authenticate(Connection.java:883)
      at org.jboss.mq.Connection.(Connection.java:238)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:49)
      at org.jboss.mq.SpyConnectionFactory.createTopicConnection(SpyConnectionFactory.java:97)

      why? it seems to work if the client and server are running on the same machine.

      properties i'm using are:
      Properties prop = new Properties();
      prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      prop.put(Context.PROVIDER_URL, "jnp://0.0.0.0:1199");
      the 0.0.0.0 above is replaced with a valid IP address, i also tried hostname but neither worked.
      prop.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");


      It seems to be failing on this line:
      TopicConnection tc = tcf.createTopicConnection("user", "password");

      The relevant user has been set up in "conf/jbossmq-state.xml"

      Is there any other info you'd need to be able to help?

      I have checked /etc/hosts and it looks as follows:
      127.0.0.1 localhost.localdomain localhost


      I'd appreciate any help anyone could give.

      Thanks in advance.