[jira] [Commented] (AMQ-8266) ActiveMQ broker has two master when nfs server restart

2021-05-14 Thread chenxianpao (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-8266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17344357#comment-17344357
 ] 

chenxianpao commented on AMQ-8266:
--

Hello [~jbonofre]

I use nfs4.1 protocol,  it is the lease locker.

I have tried the sync mount option, the same problem.

> ActiveMQ broker has two master when nfs server restart
> --
>
> Key: AMQ-8266
> URL: https://issues.apache.org/jira/browse/AMQ-8266
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: AMQP
>Affects Versions: 5.16.1
> Environment: activeMQ version:5.16.1   
> linux OS version:CentOS7  kernel: 3.10.0-1160.21.1.el7.x86_64
> deploy: three server node, one master two slave.
>Reporter: chenxianpao
>Priority: Major
>
> we use nfs-ganesha(ceph) to provide shared file system, enable active and 
> standby nfs-ganesha to provide services through vip.
> when we restart active nfs-ganesha server, vip migrate to the standby 
> nfs-ganesha, one of activemq will become master, but the original master will 
> not become a slave, so there will be two master activemq, a cluster will be 
> divided into two.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (AMQ-8266) ActiveMQ broker has two master when nfs server restart

2021-05-14 Thread chenxianpao (Jira)


[ 
https://issues.apache.org/jira/browse/AMQ-8266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17344353#comment-17344353
 ] 

chenxianpao commented on AMQ-8266:
--

[~jbonofre]

Hello!

I use nfs4.1 protocol,  it is the lease locker.

I have tried the sync mount option, the same problem.

I have found that the locked flag actually already is false in the original 
node, because the timestamp of lock file has changed,  but it didn't throw an 
exception. Anothoer node can obtain file lock normally.

I don't know Java very well, should the original node throw an exception when 
it detects that the lock file timestamp has changed?
{code:java}
//代码占位符
try {
lockFile.lock();
if (warned) {
// ensure lockHolder has released; wait for one keepAlive iteration
try {
TimeUnit.MILLISECONDS.sleep(lockable != null ? 
lockable.getLockKeepAlivePeriod() : 0l);
} catch (InterruptedException e1) {
}
}
locked = keepAlive();
break;
} catch (IOException e) {
if (!warned)
{
LOG.info("Database "
 + lockFileName
 + " is locked by another server. This broker is now in 
slave mode waiting a lock to be acquired");
warned = true;
}
...
}{code}

> ActiveMQ broker has two master when nfs server restart
> --
>
> Key: AMQ-8266
> URL: https://issues.apache.org/jira/browse/AMQ-8266
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: AMQP
>Affects Versions: 5.16.1
> Environment: activeMQ version:5.16.1   
> linux OS version:CentOS7  kernel: 3.10.0-1160.21.1.el7.x86_64
> deploy: three server node, one master two slave.
>Reporter: chenxianpao
>Priority: Major
>
> we use nfs-ganesha(ceph) to provide shared file system, enable active and 
> standby nfs-ganesha to provide services through vip.
> when we restart active nfs-ganesha server, vip migrate to the standby 
> nfs-ganesha, one of activemq will become master, but the original master will 
> not become a slave, so there will be two master activemq, a cluster will be 
> divided into two.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (AMQ-8266) ActiveMQ broker has two master when nfs server restart

2021-05-13 Thread Jira


[ 
https://issues.apache.org/jira/browse/AMQ-8266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17344331#comment-17344331
 ] 

Jean-Baptiste Onofré commented on AMQ-8266:
---

Did you try to use a lease locker ?

Did you check that your NFS mount has the sync option ?

> ActiveMQ broker has two master when nfs server restart
> --
>
> Key: AMQ-8266
> URL: https://issues.apache.org/jira/browse/AMQ-8266
> Project: ActiveMQ
>  Issue Type: Bug
>  Components: AMQP
>Affects Versions: 5.16.1
> Environment: activeMQ version:5.16.1   
> linux OS version:CentOS7  kernel: 3.10.0-1160.21.1.el7.x86_64
> deploy: three server node, one master two slave.
>Reporter: chenxianpao
>Priority: Major
>
> we use nfs-ganesha(ceph) to provide shared file system, enable active and 
> standby nfs-ganesha to provide services through vip.
> when we restart active nfs-ganesha server, vip migrate to the standby 
> nfs-ganesha, one of activemq will become master, but the original master will 
> not become a slave, so there will be two master activemq, a cluster will be 
> divided into two.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)