Comments (2)
Hi there!
Thanks for reporting!
Regarding clustering I recommend to read https://vernemq.com/docs/clustering.html. Especially the sections about node names and firewalls.
This could be due to multiple problems, but restarting the service is definitely not needed for joining a cluster. You're making a mistake there. What is vmq-admin cluster status
telling you? Have you checked the /var/log/vernemq/console.log
?
Regarding your second problem, are you sure that it isn't the keepalive canceling the connections?
We've encountered two different issues that may cause problems during cluster setup
Problem 1: Change of node names
It is important that all of your VerneMQ nodes have a unique node name set in vernemq.conf
before trying to cluster. Once the node is part of the cluster you should not change it's nodename, otherwise you will run into a problem where your cluster is not ready to serve requests anymore (unless you're explicitly telling it to do so.. but that's another topic). Changing node names once a node was part of a cluster is currently a bad idea, don't do it.
Two options exist:
- 1st Option (Good):
- Shutdown the faulty node
- Login to other machine and execute
vmq-admin cluster leave node=<<faultynode>>
- Change the node name in vernemq.conf
- Startup the node
- Make the node part of the cluster using
vmq-admin cluster join discovery-node=<<othernode>>
- 2nd Option (Bad):
- Shutdown every cluster node and delete the
/var/lib/vernemq/meta/peer_service/cluster_state
file - Set proper node names in the
vernemq.conf
on every machine - Restart all nodes
- go on with joining the cluster using
vmq-admin cluster join discovery-node=<<othernode>>
- Shutdown every cluster node and delete the
Also a single running node is running in a cluster, namely a single node cluster. Everything said here also applies if you want to change e.g. the name of such a single node. In this case however only the 2nd option currently works. This case is ugly and needs to be improved!
Problem 2: Wrong Listener Setup
We've seen a case, especially when run in a virtualized environment, that binding to the 0.0.0.0
interface is a bad idea, as this interface is somehow shared across multiple instances. However, this is currently the default for the vmq
listener used for the cluster communication. You may want to try to set the listener.vmq.clustering
to a specific interface.
Please let me know if this helps!
from vernemq.
Hi,
Sorry, so late give feedback to you.
I follow your suggestion. Now, all clustering running and awesome.
My problem is wrong listener cluster.
Thanks for helping me.
from vernemq.
Related Issues (20)
- [bug]: 100% cpu usage 96 cpus HOT 1
- [Bug]: pthread destroy cv: Device or resource busy HOT 11
- [Bug]: MongoDB Auth not compatible with version 6 HOT 7
- Unbalanced number of queues on nodes HOT 1
- [Bug]: Question on max_message_rate HOT 6
- VerneMQ vmq_bridge feature HOT 10
- extra info for packet_exceeds_max_size HOT 3
- [Bug]: Unexpected behaviour of vmq-admin session disconnect --cleanup (bug or feature?) HOT 4
- Environment variables for erlang configuration HOT 3
- Multiple connections using same client_id and username HOT 9
- Changes in mysql.lua file to not match client_id from myql HOT 3
- Using username in a TLS context is inappropriate HOT 3
- Need help with ECONNRESET using mqtt.js and VerneMQ HOT 5
- Add api Key using environment variables HOT 10
- [Bug]: Caching for auth_on_xxx_m5 hooks is not working HOT 8
- max_request_line_length config has no effect for HTTP sessions
- [Question]: Does VerneMQ support RocksDB in 1.13.0? HOT 12
- [Bug]: Issues with the correct CPU quota detection on k8s v1.26 HOT 12
- [Bug]: Outgoing QoS upgrades not affecting storage of offline messages HOT 5
- [Bug]: vmq_http_pub plugins apis not restricted by api key and bounded to default http listener HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vernemq.