balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
969 stars 116 forks source link

2.36.0+rev1 seems to break MDNS support #1531

Closed hedss closed 5 years ago

hedss commented 5 years ago

Trying to use a BoB with .local domain returns this in os-config:

May 24 14:27:35 05ad2b2 systemd[1]: Started OS configuration update service.
May 24 14:27:35 05ad2b2 os-config[3528]: Fetching service configuration from https://api.new.katapult.local/os/v1/config...
May 24 14:27:35 05ad2b2 os-config[3528]: sending message via: UDP(127.0.0.2:53)
May 24 14:27:35 05ad2b2 os-config[3528]: sending message via: UDP(127.0.0.2:53)
May 24 14:27:35 05ad2b2 os-config[3528]: https://api.new.katapult.local/os/v1/config: an error occurred trying to connect: no record found for name: api.new.katapult.local type: AAAA class: IN
May 24 14:27:36 05ad2b2 os-config[3528]: sending message via: UDP(127.0.0.2:53)
May 24 14:27:36 05ad2b2 os-config[3528]: sending message via: UDP(127.0.0.2:53)
May 24 14:27:37 05ad2b2 os-config[3528]: sending message via: UDP(127.0.0.2:53)
May 24 14:27:37 05ad2b2 os-config[3528]: sending message via: UDP(127.0.0.2:53)

and this from the Supervisor:

May 24 14:20:27 05ad2b2 resin-supervisor[2593]: Error reporting initial configuration, will retry { Error: getaddrinfo ENOTFOUND api.new.katapult.local api.new.katapult.local:443
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:   cause:
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:    { Error: getaddrinfo ENOTFOUND api.new.katapult.local api.new.katapult.local:443
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:      errno: 'ENOTFOUND',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:      code: 'ENOTFOUND',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:      syscall: 'getaddrinfo',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:      hostname: 'api.new.katapult.local',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:      host: 'api.new.katapult.local',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:      port: 443 },
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:   isOperational: true,
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:   errno: 'ENOTFOUND',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:   code: 'ENOTFOUND',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:   syscall: 'getaddrinfo',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:   hostname: 'api.new.katapult.local',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:   host: 'api.new.katapult.local',
May 24 14:20:27 05ad2b2 resin-supervisor[2593]:   port: 443 }

It should be noted that ping api.new.katapult.local correctly resolves the address, and that /etc/nsswitch.conf does include a reference to mdns4_minimal. So DNS resolution is working, but for some reason neither os-config or the Supervisor are able to use it (device will registry with API, will download app, but obviously won't connect to the VPN as there's no VPN config as os-config can't resolve the address).

zrzka commented 5 years ago

@agherzan I just flashed Fin & RPi3 with 2.36.0+rev2 and both devices area experiencing this issue. Is there anything I can help with? Like logs, ...? Or you can use my devices ...

... I'll keep them running. Both are in a state where I flashed them & boot them. Nothing else. Both are connected via ethernet (no WiFi).

agherzan commented 5 years ago

os-config fix: https://github.com/balena-os/os-config/pull/23 related fix in busybox: https://github.com/balena-os/meta-balena/pull/1534

agherzan commented 5 years ago

https://github.com/balena-os/meta-balena/pull/1537 along with the ones mentioned above should fix this issue.