WebThingsIO / thing-url-adapter

Proxy adapter for Web Thing API endpoints
Mozilla Public License 2.0
21 stars 18 forks source link

Error: send ENETUNREACH 224.0.0.251:5353 #95

Open flatsiedatsie opened 3 years ago

flatsiedatsie commented 3 years ago

On a fresh gateway with a tunnel I noticed a lot of this in the internal logs:

2020-08-12 20:43:55.852 ERROR  : thing-url-adapter: events.js:174
2020-08-12 20:43:55.855 ERROR  : thing-url-adapter:       throw er; // Unhandled 'error' event
2020-08-12 20:43:55.857 ERROR  : thing-url-adapter:       ^
2020-08-12 20:43:55.859 ERROR  : thing-url-adapter: 
2020-08-12 20:43:55.860 ERROR  : thing-url-adapter: Error: send ENETUNREACH 224.0.0.251:5353
2020-08-12 20:43:55.862 ERROR  : thing-url-adapter:     at SendWrap.afterSend [as oncomplete] (dgram.js:467:11)
2020-08-12 20:43:55.864 ERROR  : thing-url-adapter: Emitted 'error' event at:
2020-08-12 20:43:55.865 ERROR  : thing-url-adapter:     at Browser._onError (/home/pi/.mozilla-iot/addons/thing-url-adapter/node_modules/dnssd/lib/Browser.js:146:8)
2020-08-12 20:43:55.867 ERROR  : thing-url-adapter:     at Object.onceWrapper (events.js:286:20)
2020-08-12 20:43:55.869 ERROR  : thing-url-adapter:     at NetworkInterface.emit (events.js:203:15)
2020-08-12 20:43:55.871 ERROR  : thing-url-adapter:     at NetworkInterface._onError (/home/pi/.mozilla-iot/addons/thing-url-adapter/node_modules/dnssd/lib/NetworkInterface.js:438:8)
2020-08-12 20:43:55.872 ERROR  : thing-url-adapter:     at SendWrap.callback (/home/pi/.mozilla-iot/addons/thing-url-adapter/node_modules/dnssd/lib/NetworkInterface.js:393:50)
2020-08-12 20:43:55.874 ERROR  : thing-url-adapter:     at SendWrap.afterSend [as oncomplete] (dgram.js:472:8)
2020-08-12 20:43:55.878 INFO   : Plugin: thing-url-adapter died, code = 1 restarting after 0
2020-08-12 20:43:57.908 INFO   : thing-url-adapter: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-08-12 20:43:58.812 INFO   : thing-url-adapter: Loading add-on thing-url-adapter from /home/pi/.mozilla-iot/addons/thing-url-adapter
2020-08-12 20:43:59.076 INFO   : thing-url-adapter: Starting mDNS discovery
2020-08-12 20:43:59.216 ERROR  : thing-url-adapter: events.js:174
2020-08-12 20:43:59.217 ERROR  : thing-url-adapter:       throw er; // Unhandled 'error' event
2020-08-12 20:43:59.220 ERROR  : thing-url-adapter:       ^
2020-08-12 20:43:59.222 ERROR  : thing-url-adapter: 
2020-08-12 20:43:59.223 ERROR  : thing-url-adapter: Error: send ENETUNREACH 224.0.0.251:5353
2020-08-12 20:43:59.225 ERROR  : thing-url-adapter:     at SendWrap.afterSend [as oncomplete] (dgram.js:467:11)
2020-08-12 20:43:59.227 ERROR  : thing-url-adapter: Emitted 'error' event at:
2020-08-12 20:43:59.229 ERROR  : thing-url-adapter:     at Browser._onError (/home/pi/.mozilla-iot/addons/thing-url-adapter/node_modules/dnssd/lib/Browser.js:146:8)
2020-08-12 20:43:59.234 ERROR  : thing-url-adapter:     at Object.onceWrapper (events.js:286:20)
2020-08-12 20:43:59.237 ERROR  : thing-url-adapter:     at NetworkInterface.emit (events.js:203:15)
2020-08-12 20:43:59.240 ERROR  : thing-url-adapter:     at NetworkInterface._onError (/home/pi/.mozilla-iot/addons/thing-url-adapter/node_modules/dnssd/lib/NetworkInterface.js:438:8)
2020-08-12 20:43:59.243 ERROR  : thing-url-adapter:     at SendWrap.callback (/home/pi/.mozilla-iot/addons/thing-url-adapter/node_modules/dnssd/lib/NetworkInterface.js:393:50)
2020-08-12 20:43:59.251 ERROR  : thing-url-adapter:     at SendWrap.afterSend [as oncomplete] (dgram.js:472:8)
2020-08-12 20:43:59.255 INFO   : Plugin: thing-url-adapter died, code = 1 restarting after 1000
mrstegeman commented 3 years ago

Was the network connection active? This should only happen if the network is down.

flatsiedatsie commented 3 years ago

If the network was down, then this wasn't on purpose. I had another look at the logs, and found more of the same right after a reboot.

flatsiedatsie commented 3 years ago

what server is this addon trying to reach?

mrstegeman commented 3 years ago

It’s sending mDNS broadcasts, looking for web things on the network.

KrzysztofZurek1973 commented 3 years ago

This issue is still active. After the first error:

2021-03-29 07:55:49.482 ERROR : thing-url-adapter: events.js:174 2021-03-29 07:55:49.483 ERROR : thing-url-adapter: throw er; // Unhandled 'error' event 2021-03-29 07:55:49.483 ERROR : thing-url-adapter: ^ 2021-03-29 07:55:49.484 ERROR : thing-url-adapter: 2021-03-29 07:55:49.485 ERROR : thing-url-adapter: Error: send ENETUNREACH 224.0.0.251:5353 2021-03-29 07:55:49.486 ERROR : thing-url-adapter: at SendWrap.afterSend [as oncomplete] (dgram.js:467:11) 2021-03-29 07:55:49.486 ERROR : thing-url-adapter: Emitted 'error' event at: 2021-03-29 07:55:49.487 ERROR : thing-url-adapter: at Browser._onError (/home/pi/.webthings/addons/thing-url-adapter/node_modules/dnssd/lib/Browser.js:146:8) 2021-03-29 07:55:49.488 ERROR : thing-url-adapter: at Object.onceWrapper (events.js:286:20) 2021-03-29 07:55:49.489 ERROR : thing-url-adapter: at NetworkInterface.emit (events.js:203:15) 2021-03-29 07:55:49.490 ERROR : thing-url-adapter: at NetworkInterface._onError (/home/pi/.webthings/addons/thing-url-adapter/node_modules/dnssd/lib/NetworkInterface.js:438:8) 2021-03-29 07:55:49.491 ERROR : thing-url-adapter: at SendWrap.callback (/home/pi/.webthings/addons/thing-url-adapter/node_modules/dnssd/lib/NetworkInterface.js:393:50) 2021-03-29 07:55:49.491 ERROR : thing-url-adapter: at SendWrap.afterSend [as oncomplete] (dgram.js:472:8) 2021-03-29 07:55:54.425 INFO : Plugin: thing-url-adapter died, code = 1 restarting after 30000

thousands of them come and appear communication problems, e.g. Gateway does not receive data from all nodes for 5 hours.

flatsiedatsie commented 3 years ago

I'm not sure, but it may also influence the working of the Gateway. Once I manually disabled this addon, another addon was able to complete initialisation. Perhaps it was just a coïncidence though.

In this case it seemed related to mDNS discovery.

2021-06-07 20:46:56.482 INFO   : thing-url-adapter: Opening database: /home/pi/.webthings/config/db.sqlite3
2021-06-07 20:46:56.833 INFO   : thing-url-adapter: Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/schema.json because it has no messageType
2021-06-07 20:47:16.871 INFO   : thing-url-adapter: Ignoring https://raw.githubusercontent.com/WebThingsIO/gateway-addon-ipc-schema/master/messages/definitions.json because it has no messageType
2021-06-07 20:48:10.505 INFO   : thing-url-adapter: Loading add-on thing-url-adapter from /home/pi/.webthings/addons/thing-url-adapter
2021-06-07 20:48:13.771 INFO   : thing-url-adapter: Starting mDNS discovery
2021-06-07 20:49:00.162 ERROR  : thing-url-adapter: events.js:174
2021-06-07 20:49:00.182 ERROR  : thing-url-adapter:       throw er; // Unhandled 'error' event
2021-06-07 20:49:00.200 ERROR  : thing-url-adapter:       ^
2021-06-07 20:49:00.218 ERROR  : thing-url-adapter: 
2021-06-07 20:49:00.237 ERROR  : thing-url-adapter: Error: send ENETUNREACH 224.0.0.251:5353
2021-06-07 20:49:00.258 ERROR  : thing-url-adapter:     at SendWrap.afterSend [as oncomplete] (dgram.js:467:11)
2021-06-07 20:49:00.266 ERROR  : thing-url-adapter: Emitted 'error' event at:
2021-06-07 20:49:00.277 ERROR  : thing-url-adapter:     at Browser._onError (/home/pi/.webthings/addons/thing-url-adapter/node_modules/dnssd/lib/Browser.js:146:8)
2021-06-07 20:49:00.289 ERROR  : thing-url-adapter:     at Object.onceWrapper (events.js:286:20)
2021-06-07 20:49:00.298 ERROR  : thing-url-adapter:     at NetworkInterface.emit (events.js:203:15)
2021-06-07 20:49:00.310 ERROR  : thing-url-adapter:     at NetworkInterface._onError (/home/pi/.webthings/addons/thing-url-adapter/node_modules/dnssd/lib/NetworkInterface.js:438:8)
2021-06-07 20:49:00.320 ERROR  : thing-url-adapter:     at SendWrap.callback (/home/pi/.webthings/addons/thing-url-adapter/node_modules/dnssd/lib/NetworkInterface.js:393:50)
2021-06-07 20:49:00.329 ERROR  : thing-url-adapter:     at SendWrap.afterSend [as oncomplete] (dgram.js:472:8)
2021-06-07 20:49:00.390 INFO   : Plugin: thing-url-adapter died, code = 1 restarting after 0