On Wed, Oct 31, 2018 at 5:36 AM Peter Robinson <pbrobinson(a)gmail.com> wrote:
On Tue, Oct 30, 2018 at 10:47 PM Troy Dawson <tdawson(a)redhat.com> wrote:
>
> Seems I'm not crazy. There was an issue filed earlier [1.1] fixing
> that when the ping failes, it doesn't crash. But, it only fixes the
> crash and hang, not the ping itself.
> I'll file an issue.
> Sorry for the noise.
No issues, if the strange IP is 224.0.0.251 that's multicast and I
would hazard a guess that it's seeing if the address is in use on the
network by another mDNS service at which point I suspect it'll try
others until until it gets a free address.
Looking at the default firewalld ruled on my laptop I have the following rule:
# iptables -L -n |grep 224
ACCEPT udp -- 0.0.0.0/0 224.0.0.251 udp
dpt:5353 ctstate NEW,UNTRACKED
Which is allowing it to receive requests, I wonder if we need to set
some outbound rule for mDNS/dns-sd/avahi/bonjour to allow it to
broadcast the service.
Welcome to the joyous world of multicast, does it work if you just do
a "systemctl stop firewalld"? We'll need to track these ports for
container too.
Peter
Yes, that's how I tracked it down.
I turned off selinux first, didn't help, then turned off firewalld,
and that got things working.
I then turned it back on, as well as it's debug mode so I could see
what was failing. Once I knew the port and IP address it was trying
to get, it was a simple grep to find the real problem.
If this is considered OK, and how we determine we have a network
address, then I'm fine with that. We just need to add that one
firewall setting in the instructions.
Troy
> > [1.1] -
https://github.com/mozilla-iot/gateway/issues/1401
> > On Tue, Oct 30, 2018 at 2:41 PM Troy Dawson <tdawson(a)redhat.com> wrote:
> > >
> > > Hi,
> > > I really like the interface for Mozilla's Gateway [1], but I was
> > > having problems with the firewall, and now I'm wondering if I'm
the
> > > only person seeing this strange ping that it does.
> > >
> > > I've gotten the same result off a fresh install of both F28 and F29,
> > > on an x86_64 machine.
> > > I've found that it really like's nodejs 8, so for F28 I use the
> > > standard nodejs, and on F29 I use the nodejs8 module. If I use the
> > > nodejs 10 in F29, I still get the same strange ping, but I also get
> > > other errors as well.
> > >
> > > Anyway, I follow all the steps in the README [1], including opening
> > > the firewall., but when I do the "npm start", everything runs,
but
> > > then I get the following
> > > ...
> > > 2018-10-30 14:24:15.349 Service Discovery: changing profile - local
> > > domain is now: f29-iot
> > > 2018-10-30 14:24:15.354 Service Discovery: state changed to: true
> > > 2018-10-30 14:24:15.858 Unhandled Rejection
> > > 2018-10-30 14:24:15.859 Error: Timed out getting default route
> > > at Timeout._onTimeout
> > >
(/home/quake/gateway/gateway-0.6.0/node_modules/dnssd/lib/Advertisement.js:278:21)
> > > at ontimeout (timers.js:498:11)
> > > at tryOnTimeout (timers.js:323:5)
> > > at Timer.listOnTimeout (timers.js:290:5)
> > > 2018-10-30 14:24:25.187 Checking for add-on updates...
> > > ...
> > > Everything from "Unhandled Rejection" to the end of the trace,
isn't
> > > supposed to be there. And then nothing works.
> > > After much code tracing, turning selinux off and on, and finally
> > > looking at the firewall, I found the following solution.
> > > firewall-cmd --zone=public --add-port=5353/udp --permanent
> > > BUT ... this shouldn't be happening.
> > > Turns out that pinging this port (and a strange ip address) is
> > > default behavior in the nodejs module dnssd if nothing else is set.
> > > To me it looks like it *is* getting set in src/mdns-server.js, but
> > > it's acting like it's not.
> > >
> > > Anyway, in short (to late), can someone try to install gateway on
> > > their fedora machine and let me know if they are seeing the same
> > > thing.
> > >
> > > Troy
> > > [1] -
https://github.com/mozilla-iot/gateway