You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sgtech <br...@scientificgames.com> on 2017/07/05 12:11:07 UTC

AMQ service stops on network disconnection

Hi all,

Windows 2012R2 x64
AMQ 5.14.5
JRE 8.U121x64
JTDS 1.3.1
SQL server 2012 

I have configured 2 AMQ servers as master/slave HA connected to a MSSQL
database for lock/message.

When I unplug the network cable from AMQ1, the AMQ1 windows service stops.
fail-over occurs and AMQ2 grab the lock -> ok
However, when AMQ1 network back again, AMQ1 service never come back online
-> ?

Is there any specific configuration to apply to keep the AMQ service running
on network disconnection or AMQ service back online automatically after the
network re-connection ?

Thanks for your help,
Sgtech.




--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-service-stops-on-network-disconnection-tp4728212.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: AMQ service stops on network disconnection

Posted by Tim Bain <tb...@alumni.duke.edu>.
Thanks for explaining what you did.

Tim

On Jul 7, 2017 2:23 AM, "sgtech" <br...@scientificgames.com> wrote:

> At first we only use the default jdbcPersistenceAdapter (without the lease
> lock) -> not surviving a network disconnection
>
> Then we tried to change the wrapper.conf to restart the AMQ service -> not
> working also
> wrapper.filter.trigger.1=Failed to start Apache ActiveMQ
> wrapper.filter.action.1=RESTART
>
> Then we tried the jdbc lease lock following the configuration found on
> google but the majority of these posts share the wrong configuration -> the
> service survived a network disconnection but the master/slave lock flapped
> every 10 sec.
>
> wrong jdbc lease lock: lockAcquireSleepInterval="5000" +
> lockKeepAlivePeriod="10000"
>
> good jdbc lease lock: lockAcquireSleepInterval="10000" +
> lockKeepAlivePeriod="5000"
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/AMQ-service-stops-on-network-disconnection-
> tp4728212p4728310.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: AMQ service stops on network disconnection

Posted by sgtech <br...@scientificgames.com>.
At first we only use the default jdbcPersistenceAdapter (without the lease
lock) -> not surviving a network disconnection

Then we tried to change the wrapper.conf to restart the AMQ service -> not
working also
wrapper.filter.trigger.1=Failed to start Apache ActiveMQ
wrapper.filter.action.1=RESTART

Then we tried the jdbc lease lock following the configuration found on
google but the majority of these posts share the wrong configuration -> the
service survived a network disconnection but the master/slave lock flapped
every 10 sec.

wrong jdbc lease lock: lockAcquireSleepInterval="5000" +
lockKeepAlivePeriod="10000"

good jdbc lease lock: lockAcquireSleepInterval="10000" +
lockKeepAlivePeriod="5000"





--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-service-stops-on-network-disconnection-tp4728212p4728310.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: AMQ service stops on network disconnection

Posted by Tim Bain <tb...@alumni.duke.edu>.
How is this configuration different from the one that wasn't working?

Tim

On Jul 6, 2017 7:57 AM, "sgtech" <br...@scientificgames.com> wrote:

> Hello Tim,
>
> We finally get through this issue using the below AMQ lease database locker
> configuration.
>
> <jdbcPersistenceAdapter dataDirectory="${activemq.data}"
> dataSource="#mssql-ds" lockKeepAlivePeriod="5000">
> <locker>
> <lease-database-locker lockAcquireSleepInterval="10000"/>
> </locker>
> </jdbcPersistenceAdapter>
> </persistenceAdapter>
>
> Now AMQ service survive network disconnection and auto-reconnection from/to
> AMQ & database.
>
> Thank you for your help.
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/AMQ-service-stops-on-network-disconnection-
> tp4728212p4728259.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: AMQ service stops on network disconnection

Posted by sgtech <br...@scientificgames.com>.
Hello Tim,

We finally get through this issue using the below AMQ lease database locker
configuration.

<jdbcPersistenceAdapter dataDirectory="${activemq.data}"
dataSource="#mssql-ds" lockKeepAlivePeriod="5000">
<locker>
<lease-database-locker lockAcquireSleepInterval="10000"/>
</locker>
</jdbcPersistenceAdapter>
</persistenceAdapter>

Now AMQ service survive network disconnection and auto-reconnection from/to
AMQ & database.

Thank you for your help.




--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-service-stops-on-network-disconnection-tp4728212p4728259.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: AMQ service stops on network disconnection

Posted by Tim Bain <tb...@alumni.duke.edu>.
Did you configure the Java Service Wrapper (
http://activemq.apache.org/java-service-wrapper.html)? As I understand it,
that should be restarting any exited broker process after five seconds.

Tim

On Jul 5, 2017 8:38 AM, "sgtech" <br...@scientificgames.com> wrote:

> Hi all,
>
> Windows 2012R2 x64
> AMQ 5.14.5
> JRE 8.U121x64
> JTDS 1.3.1
> SQL server 2012
>
> I have configured 2 AMQ servers as master/slave HA connected to a MSSQL
> database for lock/message.
>
> When I unplug the network cable from AMQ1, the AMQ1 windows service stops.
> fail-over occurs and AMQ2 grab the lock -> ok
> However, when AMQ1 network back again, AMQ1 service never come back online
> -> ?
>
> Is there any specific configuration to apply to keep the AMQ service
> running
> on network disconnection or AMQ service back online automatically after the
> network re-connection ?
>
> Thanks for your help,
> Sgtech.
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/AMQ-service-stops-on-network-disconnection-tp4728212.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>