1 Reply Latest reply on Aug 22, 2008 9:00 AM by italost

    distributed logging

    nurlien

      We are trying to create a distributed logging service using Log4J and JMS appender to an ActiveMQ topic. However, we keep getting an error "Wire format negotiation timeout: peer did not send his wire format" and the message never gets delivered to the topic. Is there a bug with the ActiveMQ connection or are we missing something. I have attached the log4j.properties below.

       

      Any help will be greatly appreciated.

       

      Config File

      log4j.rootCategory=, S1

       

      log4j.appender.S1=org.apache.log4j.net.JMSAppender

      log4j.appender.S1.ProviderURL=tcp://localhost:61616

      log4j.appender.S1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory

      log4j.appender.S1.topicBindingName=esb.globalerrtopic

      log4j.appender.S1.topicConnectionFactoryBindingName=ConnectionFactory

       

      Error Message

       

      log4j:ERROR Error while activating options for appender named .

      javax.jms.JMSException: Wire format negotiation timeout: peer did not send his wire format.

              at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)

              at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1206)

              at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1289)

              at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:295)

              at org.apache.activemq.ActiveMQConnection.createTopicSession(ActiveMQConnection.java:998)

              at org.apache.log4j.net.JMSAppender.activateOptions(JMSAppender.java:217)

              at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:257)

              at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:133)

              at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:97)

              at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:689)

              at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)

              at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)

              at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)

              at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)

              at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)

              at org.apache.log4j.LogManager.(InitUsingLog4JProperties.java:14)

      Caused by: java.io.IOException: Wire format negotiation timeout: peer did not send his wire format.

              at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:94)

              at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)

              at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:74)

              at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:79)

              at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1195)

        • 1. Re: distributed logging
          italost

          Hi, nurlien.

           

          I have been trying to reproduce your problem. I set log4j.properties as following and I could skip the error you told:

           

          log4j.appender.JMS1=org.apache.log4j.net.JMSAppender

          log4j.appender.JMS1.ProviderURL=tcp://localhost:61616

          log4j.appender.JMS1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory

          log4j.appender.JMS1.TopicBindingName=DEBUG.LOG

          log4j.appender.JMS1.TopicConnectionFactoryBindingName=TopicConnectionFactory

           

           

          The only difference is the value of "TopicConnectionFactoryBindingName"

           

           

          After that I faced the problem to find the topic name DEBUG.LOG. I am still working on that.

           

          Did you find a solution for that?

          Also, could you paste the environment configuration you are using (OS, ActieMQ version and log4j versions)?

           

           

          Regards.

           

          Italo Stefani

          Vetta Technologies