Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
1136 Discussions

cluster stop working BUG caused by cluster_manager !!Double master!!

zhong__dboy
Beginner
202 Views

### summary:

cluster_manager stop working and whole cluster stopped service.

### environment:

CentOS7.6
mcu server: 4.3.x

### steps:

1. two cluster_managers: A for master, B for slave

2. network flash,B became master,

3. network recover, A & B both master, B life_time is shorter, so B process exit.

4. rabbitmq queue "owt-cluster" deleted. so A can not received any message from queue "owt-cluster", all other service lost connection with cluster_manager

### reason:

amqp_client.js:157

```

handler.close = function() { request_q && request_q.destroy(); request_q = undefined; exc && exc.destroy(true); exc = undefined; };

```

the handler.close will called if cluster_manager process exited by calling "process.exit(1);"
and request_q.destroy() will delete the queue even if the other cluster_manager still connected on it.

### manually reproduce:

start master cluster_manager A.

modify slave cluster_manager B file: clusterManager.js at last lines for simulate

```

exports.run = function (topicChannel, clusterName, id, spec) { var manager = new ClusterManager(clusterName, id, spec); runAsCandidate(topicChannel, manager); //just using runAsMaster(topicChannel, manager); instead };

```

start cluster_manager B.

cluster_manager B detected "Double master" and exit.

cluster_manager A stopped service.

 

### suggestion:
request_q.destroy(); using option: request_q.destroy({ifUnused : true});

0 Kudos
0 Replies
Reply