-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Node-red crashes at startup with 2.1.2 addMembership EADDRINUSE #28
Comments
nodejs version? |
@andreypopov 14.16.0 |
I tried with 15.12.0, same behaviour:
|
looks like a conflict, do you have nodes connected with xiaomi ? give me the list |
|
I removed miio and node-mihome which are old dependencies. Error persists. |
Ok so I commented api.js l.6 and it starts : Why you need to init zigbee connection for roborocks?
It started with 2.0.7 a few days ago, my node red crashs a lot of times per day due to node-red-contrib-miio-roborock. Edit: as it's a warning only, maybe this last crash (first using 2.2.2) is due to something else. Server is up and running, I will see in next hours if it keeps crashing due to node-red-contrib-miio-roborock or not. I have an idea about EADDRINUSE, I use two roborocks, maybe can it be related to 2 instances of aqara initiated? |
Maybe the same as in #19 |
I'm having the same issue with 2.1.2 and I can see that the address conflict is with port 9898 which, in my case, is the port used by the Xiaomi Gateway. Perhaps knowing that will help lead to a solution. |
Please, test this version |
Well, yes. I am the guy from #38 and I have the same issue. Downgrading to 2.0.7 solves the issue for me too. I am encountering this error on a fresh clean install of Node-RED. My environment:
As mentioned: It is a fresh clean install - no other modules are installed (except of the Pi specific ones which were installed by default). I did some investigations and found out, that this error does not occur if I am using Ubuntu Server 20.04 LTS (64-bit). So maybe it is related to the underlaying OS. I also doublechecked if any ports (especially 9898) are already in use - but they aren't. The big questions are:
I don't know where to start but maybe this hint with the underlaying OS is enough to help @andreypopov debugging this issue. Please let me know if you need any further information 😜 |
I haven't upgraded my OS (18.04 here) and have the same problem so thinking an OS upgrade isn't the issue. |
I have ubuntu too.( |
Hm, now I was able to update to 2.3.1 😂 The only thing what changed: I noticed multiple IPs for my network interface "eth0" - one static as mentioned above and another dynamic one. The last one exists because of a misconfiguration of netplan. I deleted the property "dhcp4" from the configuration to get my static IP. But the right way is to set it to "false". Otherwise you'll get the unwanted dynamic IP, because the default value from "dhcp4" seems to be "true". I am supposing that Node-RED/miio is not handling multiple IPs the right way. It tries to bind the server port 9898 multiple times. Maybe this leads to the error "EADDRINUSE". @mobamoba: Can you please share your output for "ip address show" to doublecheck my assumption? |
Sure: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 |
This is really interesting. Your network configuration seems to be OK. The only difference to mine is that you are using WIFI only. The root cause in my case is definitely the configuration of netplan and the unwanted dynamic IP via "dhcp4". If I toggle "dhcp4" to "true" and I have both, a static and a dynamic IP, I can reproduce the error. If "dhcp4" is "false" (static IP only), everything is fine and is working as expected. In your case @mobamoba something different is consuming the port 9898. Maybe it is another module, another instance of Node-RED, another process or Node-Red/miio has trouble with your network configuration in some way. But I have no clue to be honest - sounds like you need a debugging session with Andrey... |
I use a different Xiaomi node to control my Xiaomi Gateway and all my Aqara sensors. The problem, for me, is that the later versions of this app included something that forced the use of 9898 which is impossible in my system and is actually unnecessary as I'm using 2.0.7 - which doesn't have the 9898 conflict - and it controls my Roborock perfectly. I think the solution lies in removing whatever got added that is now using 9898 and remove that. What exactly is in this node that's using 9898 now and that wasn't using it in 2.0.7? |
Just fyi. This Issue here is still in the newest version. I did uncomment the line that you mentioned and it fixed the issue for me. @andreypopov what does this line do? In my testing (a few months now) it seems to work just fine without this line. |
I'm pretty sure the issue is here in node mihome: https://github.com/maxinminax/node-mihome/blob/master/lib/protocol-aqara.js If port 9898 is in use, as it is in my case, this node fails and prevents node-red from loading. I don't know about the multicast stuff. |
I just had this happen today without any changes in NR or pallet, etc. after a restart of the container. Firstly, my error looked like this (log from portainer - might not be as detailed, but it was enough):
As @mobamoba pointed out, the Now, I see that in this line it is specifically looking for So - I know that was a lot of information - but I hope my digging into this might help shed light on what is really causing the issue. I'll going to submit this as an issue to that repo - maybe it will help them fix this! Cheers! |
** Describe issue **
Just updating from node-red-contrib-miio-roborock 2.0.7 to 2.1.2, node-red crashes at startup, even with a fresh system restart
** Screens / Logs **
** Hardware / Software **
Debian Buster
Node-red 1.2.9
Downgrading to 2.0.7, node-red starts fine.
The text was updated successfully, but these errors were encountered: