opened
cmotelet
username_0
With the new version 1.17.0 and `mdns` enabled, the server fails at startup if the default gateway is not defined.
If you add a wrong default gateway with IP on same subnet, server-node start and services can be resolved on the other nodes on the subnet.
If you add a default gateway to 127.0.0.1, server-node start but services cannot be resolved on the other nodes on the subnet.
```
•Advertise… [14:22:39:709] Trying to find the default route (navmot3._http._tcp.local.)
•NetworkIn… [14:22:39:711] INADDR_ANY (IPv4) -> 224.0.0.251:5353

    -->  QUERY
        └─┬ Questions [1]
          └── navmot3.local. ANY QM


•NetworkIn… [14:22:39:726] INADDR_ANY had an error: Error: send ENETUNREACH 224.0.0.251:5353
    Error: send ENETUNREACH 224.0.0.251:5353
        at SendWrap.afterSend [as oncomplete] (dgram.js:499:11)
•NetworkIn… [14:22:39:727] Shutting down INADDR_ANY...
•NetworkIn… [14:22:39:730] Done.
•Advertise… [14:22:39:731] Error on "navmot3._http._tcp.local.", shutting down. Got:
    Error: send ENETUNREACH 224.0.0.251:5353
•Advertise… [14:22:39:733] Stopping advertisement "navmot3._http._tcp.local."...
•NetworkIn… [14:22:39:735] Shutting down INADDR_ANY...
•NetworkIn… [14:22:39:736] Done.
•Advertise… [14:22:39:737] Stopped.
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: send ENETUNREACH 224.0.0.251:5353
    at SendWrap.afterSend [as oncomplete] (dgram.js:499:11)
```
Server in version 1.17.0 fails at startup if the default gateway is not defined
issue
created
tkurki
username_1
I have a poc fix for this, stay tuned.
comment
created
tkurki
username_1
https://github.com/DeMille/dnssd.js/pull/13
comment
created
tkurki
username_1
@username_0 @raffmont can you please check if the linked PR fixes this issue for you. 

Please note that you must re-install dnssd from my Github repo, as shown in package.json. Just running `npm install` will do it, but verify that you have the change in https://github.com/username_1/dnssd.js/commit/44b1347e728e2445f07c5f1aa97e00d2a89be0be.
comment
created
cmotelet
username_0
@username_1  it works fine.
comment
created
tkurki
username_1
@sbender9 I think the fix is considerably better than the current release - what do you think of merging & releasing?
comment
closed
tkurki
username_1
issue
created
Sandynister
username_2
Hi,

I'm not familiar with npm and maybe I'm too stupid.  Can you please give me a hint on how to update the dnssd lib with your fix?

I'm trying to install it with npm and I'm also trying to manually change the networkinterface.js files. But the signal-k server still doesn't start without a gateway....

Yours sincerely
Björn
comment
created
cmotelet
username_0
@username_2 
The fix is not published in server version 1.17.0.
It will be integrated in the next version. 
To get it, you must temporarily install signalk-server-node with git.
https://github.com/SignalK/signalk-server-node/blob/v1.17.0/README.md#develop-install-from-git

Or more simply but not tested, change in `package.json` the line "dnssd'': "^0.4.1'',  by "dnssd.js'': "username_1/dnssd.js#44b1347e728e2445f07c5f1aa97e00d2a89be0be'',  and execute `npm install` in the server folder.
comment