2 Replies Latest reply on Mar 19, 2004 2:45 PM by bghcm

    explicit /etc/hosts reference required on linux JMS clients?

    bghcm Newbie

      Hello all -

      I have both linux and windows JbossMQ clients. The windows clients work perfectly, the linux clients work perfectly *IF the hostname of the client machine is explicitly referenced in /etc/hosts*. If I remove the hostname from /etc/hosts, the client is unable to connect and throws:

      java.lang.Exception: org.jboss.mq.SpyJMSException: Cannot start a the client IL service; - nested throwable: (java.net.UnknownHostException: longhorns: longhorns)

      For example, the client hostname is "longhorns" and its IP address is The client works perfectly if /etc/hosts contains: localhost longhorns

      However, if I remove the line " longhorns" then the UnknownHostException is thrown on the client when the client tries to open a new subscription.

      This is a problem for systems that are DHCP clients because the IP cannot be put in /etc/hosts. It is potentially a problem with NAT, too.

      I must be doing something wrong because I'm sure JBossMQ isn't intended to require this. Also, my windows machines are DHCP and do not reference their own IP address in their hosts files, and the client works well from these.

      Any ideas appreciated-

      jboss 3.2.3
      java 1.4.2_04
      client - linux rh 9 kernel 2.4.39 and winXP SP1
      server - linux rh 9 kernel 2.4.20