[Solved] OpenWrt Image Avahi service(s)

I have an image that works for the most part. I am able to get the Avahi services running after installing the image with a little bit of finagling, but I need it to work "out of the box". I have the image builder adding ssh and sftp avahi services as well as the daemon(s) etc. I am adding another service simply by using the "files" folders.

After installation, in order to get it working, I have to uninstall either the ssh or sftp avahi service (through luci or otherwise), and then reinstall it and all of the services work.

The items below are the errors that I get. I am not so concerned with the "WARNING" as that is there even after I get it working.

I have tried various permissions, but have not been able to get it to work. I am doing another build with just the default image builder services to see if that works, and then it has to be something with the file/folder permissions of what I added.

Any suggestions for getting this to work properly within the image?

Errors out of the gate:
Mon Nov 11 19:39:50 2019 daemon.info avahi-daemon[3268]: avahi-daemon 0.6.32 starting up.
Mon Nov 11 19:39:50 2019 daemon.warn avahi-daemon[3268]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Mon Nov 11 19:39:50 2019 daemon.warn avahi-daemon[3268]: Failed to open /etc/resolv.conf: Permission denied
Mon Nov 11 19:39:50 2019 daemon.info avahi-daemon[3268]: No service file found in /etc/avahi/services.
Mon Nov 11 19:39:50 2019 daemon.err avahi-daemon[3268]: Failed to open static hosts file: Permission denied

Have you tried this ^^^ ?

As stated, that warning is present even when Avahi is broadcasting properly, so I don't think that is the problem. I did another build without any of the extra "files" that I had. It works, so I must have some wonky permissions, or some kind of network setup that is causing the problem. I'm going to add back a couple files at a time to see what the culprit is. Clearly something I have done. Thanks for the response.

To confirm, the permissions on my files/etc folder for the image build had "me" as the owner rather than "root". Changed ownership of the files folder (and all lower folders) to "root" and problems are gone. Frustrating when you miss the easy things.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.