You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by vivekg <ma...@gmail.com> on 2013/03/22 08:53:02 UTC

Tomcat ActivemMQ Reconnect issue.

Hi, 


We are using using Log4J (JMSAppender) + ActiveMQ for consolidating logs
from different server instances.

ActiveMQ listens on port 61616 for incoming log descriptions from various
clients. Logs from two instances are put into ActiveMQ queue . I have added
JMS appender to log4j properties files of client components. 

Everything is working fine. The only problem is if ActiveMQ server goes
down, the client disconnects and even if ActiveMQ  server comes up again
within some time, the client never connects again and sends any further
logs. (*getting javax.jms.IllegalStateException: The Session is closed*).

Is there any way where log4j.appender property can be set on jms appenders
where whenever the server is up again, it reconnects and starts sending
messages again without doing a restart to client and establish connection
again. 

I tried *failover Transport* . But found that my Tomcat server is not
starting , whenever i use "failover" word in my log4j.properties.

Please help..

Thanks & Regards, 
Vivek



--
View this message in context: http://activemq.2283324.n4.nabble.com/Tomcat-ActivemMQ-Reconnect-issue-tp4665043.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re:Re: Re:Tomcat ActivemMQ Reconnect issue.

Posted by SuoNayi <su...@163.com>.
If the server cann't be started, there must be some error/exception log to indicate what' wrong.
You may post the detailed log for further investigation.




At 2013-03-25 17:47:42,vivekg <ma...@gmail.com> wrote:
>Hi SuoNayi, 
>
>Thanks for the reply. I have tried the options given in the link also , the
>fail over configuration given by you (og4j.appender.jms.ProviderURL=
>failover:(tcp://YOUR_BROKER_IP:6161) ). Bur didnt help.
>
>Actually, if i use the word "failover" in my log4j.propertis , then my
>application server doesn't start.
>
>Regads,
>Vivek
>
>
>
>--
>View this message in context: http://activemq.2283324.n4.nabble.com/Tomcat-ActivemMQ-Reconnect-issue-tp4665043p4665092.html
>Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re: Re:Tomcat ActivemMQ Reconnect issue.

Posted by vivekg <ma...@gmail.com>.
Hi SuoNayi, 

Thanks for the reply. I have tried the options given in the link also , the
fail over configuration given by you (og4j.appender.jms.ProviderURL=
failover:(tcp://YOUR_BROKER_IP:6161) ). Bur didnt help.

Actually, if i use the word "failover" in my log4j.propertis , then my
application server doesn't start.

Regads,
Vivek



--
View this message in context: http://activemq.2283324.n4.nabble.com/Tomcat-ActivemMQ-Reconnect-issue-tp4665043p4665092.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Re:Tomcat ActivemMQ Reconnect issue.

Posted by SuoNayi <su...@163.com>.
Hi, do you follow the steps listed by this page?
http://activemq.apache.org/how-do-i-use-log4j-jms-appender-with-activemq.html
Did your try log4j.appender.jms.ProviderURL= failover:(tcp://YOUR_BROKER_IP:6161)



At 2013-03-24 10:11:22,vivekg <ma...@gmail.com> wrote:
>Hi, 
>
>
>We are using using Log4J (JMSAppender) + ActiveMQ for consolidating logs
>from different server instances.
>
>ActiveMQ listens on port 61616 for incoming log descriptions from various
>clients. Logs from two instances are put into ActiveMQ queue . I have added
>JMS appender to log4j properties files of client components. 
>
>Everything is working fine. The only problem is if ActiveMQ server goes
>down, the client disconnects and even if ActiveMQ  server comes up again
>within some time, the client never connects again and sends any further
>logs. (*getting javax.jms.IllegalStateException: The Session is closed*).
>
>Is there any way where log4j.appender property can be set on jms appenders
>where whenever the server is up again, it reconnects and starts sending
>messages again without doing a restart to client and establish connection
>again. 
>
>I tried *failover Transport* . But found that my Tomcat server is not
>starting , whenever i use "failover" word in my log4j.properties.
>
>Please help..
>
>Thanks & Regards, 
>Vivek
>
>
>
>--
>View this message in context: http://activemq.2283324.n4.nabble.com/Tomcat-ActivemMQ-Reconnect-issue-tp4665043.html
>Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.