New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vernemq cluster #186
Comments
Hi! This is the intended behavior. From the 'online' node perspective a network partition occurred, as it doesn't know the reason why the second node disappeared. If it is a correct shutdown you should always use the If it is indeed a network partition or a node failure, or you want to simulate one of the two we recommend to have a look at our section on Netsplits here. https://vernemq.com/docs/clustering/netsplits.html What it essentially means, that during such a 'faulty' situation with We are aware of the situation that Hope this helps. |
So, in a 2-node cluster, with both trade_consistency = on I should be able to connect to first node if second one goes down ? I'm only getting Connection Refused: broker unavailable. |
Thanks @vladbabii |
2 Raspberry PI, each with vernemq started, both in the same cluster. I've then installed vernemq in an openvz container running ubuntu using packages and using the same configuration it seems to run fine with both nodes up and with only one up (accepting new connections and data). Now i'm wondering if it's a recent issue or if it's a bug because of the environment. |
OK, that is interesting. |
Head of config on both of them Since they joined the cluster and i can publish on first node and subscribe on second and it works fine.
|
I'll try to find out in the afternoon if we can reproduce this on our Raspberry-Cluster. |
Can i help with anything ? Maybe recompiling vernemq from head? |
Environment is: vernemq version returns a new line (no text) |
One more thing: have you restarted the nodes after the config changes to their vernemq.conf? |
Hi @vladbabii ,I tested this scenario with old release,It was working fine(accepting new connections also) if we use 'allow_multiple_sessions = on'. Hi @dergraf , Thank you for your response, I am looking for a way such that if one node in the cluster goes down then other nodes should not have any effect.Based on the vernemq implementation,the only dependency with the down node is offline message store.If I move the offline message store to external database which is available for all the nodes in the cluster then I think,It would solve this down node dependency in cluster. Could you please let me know your comments on this. Thank you in advance.. |
Thank you for taking the time @jshahs
Tried multiple times with reboots between. Do you have a guide on how to compile vernemq on PI ? Maybe i did something wrong since it's the first time i did something with erlang. |
Here is a way to compile on Raspberry 2. What did you actually do on the Raspi3? is this 32bit or 64bit We just decided to build a Raspi profile to make this easier (something we wanted to do for a while) -> @larshesel Note: no need to rm the generated configs before restart. Depending on previous state, you might want to delete the data folders though. |
Followed steps from to compile on both 2 and 3 |
I think its 32bit since it fails at |
@ioolkos - there does not seem to be a vernemq branch in leveldb - https://github.com/erlio/eleveldb/branches/all?utf8=%E2%9C%93&query=vernemq |
Hi @vladbabii - we've just pushed some changes to the master branch which should make it easier to build on raspberry pi as it should be able to build out of the box. All you have to do is to check out the latest master and do Any feedback is appreciated. |
Hi! I followed the steps described by @larshesel in the previous comment. I guess it worked fine, it compiled and I got the new
I am working on 2 raspberry pi 3, got the same error from both. Any clue what this error is related with? Thank you in advance for your help! |
I'll try compiling it now and see if it works. |
I did this:
checked it started with
also with
it seems to start |
to configure it, modify vernemq/_build/rpi32/rel/vernemq/etc/vernemq.conf I modified port to 11883 and trade consistency and anonymous to on Individual nodes work just fine. |
Also clustering works
|
Also on the page at https://vernemq.com/docs/clustering/netsplits.html there's a typo (it should be _sessions not _session) Tested clustering and it works fine also.
|
Also works with Erlang/OTP 17 [erts-6.2] [source] [smp:4:4] [async-threads:10] [kernel-poll:false] If you do first apt-get upgrade && apt-get install erlang libssl-dev |
Ok, Thank you very much @vladbabii for all the information. Now it is much better, but still cannot start it because: vernemq failed to start within 15 seconds, Will keep working on it tomorrow and will report here my results/solutions. |
If you update stuff you need to recompile. |
Also make sure ports are not used already |
Installing erlang 18 on pi
|
Hi @vladbabii, So, now vernemq is working, meaning I get a pong back when I ping it! I will keep working on it. Want to send messages to the broker now Then, is the vmq_mzbench tool supported/working on the Pi? couldn't make it as well |
I would not worry about the missing documentation if you don't need it. As far as i know (and i'm not very good with erlang) missing docs should not implede vernemq usage in any way... |
Ehm...I don't really know much about erlang either. I am looking for a working mqtt broker for raspberry (different from mosquitto)...and I was looking for the benchmark tool. |
@frantill great to see you're making progress! |
I see... I have still a long way to go:) |
Hi @ioolkos, I am now in the situation you suggested, mzbench on the mac, vernemq on the raspberry pi. |
@frantill apologies I couldn't get earlier on this. |
@ioolkos thanks, laptop_IP: 192.168.1.220 running only change in vernemq.config is telnet 127.0.0.1 1883 says:
|
You need to start the listener in vernemq.conf with the actual external IP, not 127.0.0.1, if you want to reach it from anywhere other than localhost itself. |
I did change the listener IP address before when I was trying to run the lead test scenario...but had no success. will try again, thank you |
Hi, my problems come from installing/executing vmc_mzbench. sudo ./rebar compile
Any known advice for this situation? thank you |
Can you try latest master of mzbench - it may be ready for erl19 - if that doesn't work then you'd probably need to use erl18 for compiling and using mzbench. |
Update: As I said earlier, vernemq on my raspberry seems to accept connections only for 4-5 seconds, then it closes them. laptop --> rpi: on rpi itself: It also happens starting a scenario with 100/1000/n clients, I run In verne.config Is there any parameter that can trigger this behaviour? or some configuration I am missing? |
OK, thanks. For telnet it's clear that the server closes the connection, as you don't send a proper CONNACK request. Now let's find out why VerneMQ closes the mzbench connections . As your listener config looks OK, I think it might be the way you set up the connections. Can you show me the part of your script where you set up the connections? |
@ioolkos, thanks, I started from a simple case and I have been able to run some simple scenario on the RPi! Thank you for helping. |
Hi, I am implementing vernemq cluster with docker & kubernetes. for that I created a vernemq image and written yaml file for deployment. I deployed that yaml file then I have one vernemq cluster. If I want to create a vernemq cluster I will create a oone more image in that image I will tell to next brokers in my cluster go & join the vernemq1. I created a cluster with respective to the 1st broker. Issue: Now I want to scale up the cluster with respective to vernemq1. But dude to some reason my 1st vernemq-broker get deleted then how can add vernemq-brokers to the same cluster? |
Hi @python225 thanks for your report! |
Hi,
We are running cluster with two vernemq nodes with the below configurations
trade_consistency=on
allow_multiple_sessions=off
All the clients connect with clear_session = false
Question : When one vernemq node in the cluster is down then the other node is not accepting the connections.Could you please let me know the reason?(Is it due to offline message store on the down node)
The text was updated successfully, but these errors were encountered: