dejanb / stomp-php

Stomp PHP Client
http://stomp.fusesource.org/documentation/php/
93 stars 46 forks source link

Connection not acknowledged #5

Closed tclass closed 3 years ago

tclass commented 12 years ago

Hi, I get an Exception if I try to test my Failover. I can't reproduce this error, it happens only from time to time. Any suggestion??

ActiveMQ Version: 5.6

2012-04-27T08:10:36+00:00 ERR (3): exception 'FuseSource\Stomp\Exception\StompException' with message 'Connection not acknowledged' in C:\SVN\PHP\xxx\lib\Stomp\main\FuseSource\Stomp\Stomp.php:210 Stack trace:

0 C:\SVN\PHP\xxx\lib\Stomp\main\FuseSource\Stomp\Stomp.php(593): FuseSource\Stomp\Stomp->connect('', '')

1 C:\SVN\PHP\xxx\lib\Stomp\main\FuseSource\Stomp\Stomp.php(527): FuseSource\Stomp\Stomp->_reconnect()

2 C:\SVN\PHP\xxx\shell\activemq.php(198): FuseSource\Stomp\Stomp->readFrame()

3 C:\SVN\PHP\xxx\shell\activemq.php(112): ActiveMQ->readQueue(Object(Varien_Object))

4 C:\SVN\PHP\xxx\shell\activemq.php(32): ActiveMQ->start(Object(Varien_Object))

5 C:\SVN\PHP\xxx\shell\activemq.php(225): ActiveMQ->run()

6 {main}

marklr commented 12 years ago

Which PHP version are you running?

axisK commented 11 years ago

I know this is resurrecting something which the original author has probably solved already but this happens to us when the MQ accepts the socket connection just before shutting down and as such can be slightly hard to reproduce. Currently I've resorted to handling this by making the connect method aware of an amount of retries it can go up to and recursively calling itself.