3 Replies Latest reply on Jul 17, 2003 12:43 PM by adrian.brock

    JMSAppender Problems

    tgjones47

      I am trying to use the JMSAppender to send log output to a central machine. I am using the JMSSink program from log4j to get the information from the particulat topic the appender is sending to. It works fine if I do everything on one machine or localhost however if I try to set up the appender to use a different provider url (i.e. different mcahine) it throws a socket time out error.

      When testing the JMSSink program to read from a topic on a different machine I get this error

      16:24:07,876 ERROR [OILClientIL] Cannot connect to the ConnectionReceiver/Server
      java.net.ConnectException: Connection refused
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      at java.net.Socket.connect(Socket.java:426)
      at java.net.Socket.connect(Socket.java:376)
      at java.net.Socket.(Socket.java:291)
      at java.net.Socket.(Socket.java:147)
      at org.jboss.mq.il.oil.OILClientIL.createConnection(OILClientIL.java:175)
      at org.jboss.mq.il.oil.OILClientIL.checkSocket(OILClientIL.java:156)
      at org.jboss.mq.il.oil.OILClientIL.pong(OILClientIL.java:112)
      at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:860)
      at org.jboss.mq.server.JMSServerInterceptorSupport.ping(JMSServerInterceptorSupport.java:308)
      at org.jboss.mq.server.TracingInterceptor.ping(TracingInterceptor.java:645)
      at org.jboss.mq.server.JMSServerInvoker.ping(JMSServerInvoker.java:310)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:324)
      at java.lang.Thread.run(Thread.java:536)
      16:24:07,895 WARN [OILServerILService] Client request resulted in a server exception:
      org.jboss.mq.SpyJMSException: Could not pong; - nested throwable: (java.rmi.RemoteException: Cannot connect to the ConnectionReceiver/Server)
      at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:864)
      at org.jboss.mq.server.JMSServerInterceptorSupport.ping(JMSServerInterceptorSupport.java:308)
      at org.jboss.mq.server.TracingInterceptor.ping(TracingInterceptor.java:645)
      at org.jboss.mq.server.JMSServerInvoker.ping(JMSServerInvoker.java:310)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:324)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: java.rmi.RemoteException: Cannot connect to the ConnectionReceiver/Server
      at org.jboss.mq.il.oil.OILClientIL.createConnection(OILClientIL.java:183)
      at org.jboss.mq.il.oil.OILClientIL.checkSocket(OILClientIL.java:156)
      at org.jboss.mq.il.oil.OILClientIL.pong(OILClientIL.java:112)
      at org.jboss.mq.server.JMSDestinationManager.ping(JMSDestinationManager.java:860)
      ... 5 more

      This is my JMSAppender code in log4j.xml










        • 1. Re: JMSAppender Problems

          The server cannot connect back to the client
          check you host config or a firewall.
          Also, try UIL2

          Regards,
          Adrian

          • 2. Re: JMSAppender Problems
            tgjones47

            ok thanks this works fine for the JMSSink client connecting to the remote machine. However when I try to use the JMSAppender to send messages to a different machine the UIL_ADDRESS_KEY always specfies the local machine. First off it throws an error specifying that there is no such property as ProviderURL. If I replace the log4j.jar shipped with jboss with the most recent one log4j-1.2.8.jar this error does not get thrown but the provider url still never seems to be recognized. So basically it is always trying to send messages to the local machine no matter what.

            • 3. Re: JMSAppender Problems

              As I said above, check your host config.

              Regards,
              Adrian