Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Avahi - daemon already running #29

Closed
gorbunovav opened this issue Dec 4, 2019 · 8 comments · Fixed by #30
Closed

Avahi - daemon already running #29

gorbunovav opened this issue Dec 4, 2019 · 8 comments · Fixed by #30

Comments

@gorbunovav
Copy link

My container logs are spammed with the following message:

Daemon already running on PID X

The PID inside the container corresponds to the avahi daemon.
It has started after the upgrade from 0.9.2 version of the image (most likely after #28).

I am running the container with "network_mode: host" on Raspberry PI, which already has the avahi daemon running on the host.

Environment:

Raspberry Pi 4
Raspbian 10
Docker version 19.03.5, build 633a0ea
Image: mozillaiot/gateway:0.10.0-arm

docker-compose.yml:

version: "3"

services:
  webthings-gateway:
    container_name: webthings-gateway
    image: mozillaiot/gateway:arm
    restart: unless-stopped
    network_mode: host
    ports:
      - "8080:8080"
      - "4443:4443"
    volumes:
      - ./data:/home/node/.mozilla-iot
@mrstegeman
Copy link
Contributor

I knew this was going to cause some issues...

Would an environment variable help? That way, you could disable avahi selectively.

@mrstegeman
Copy link
Contributor

@white-gecko do you have a better solution for this?

@gorbunovav
Copy link
Author

@mrstegeman as far as I understand the avahi daemon is required for the webthing-arduino add-on only, right?

In that case, I am ok with the environment variable solution, since I am not going to use it in the nearest feature 🤔

@mrstegeman
Copy link
Contributor

It's used for a couple things:

  • Publishing the hostname to the network, so that from a browser, you can navigate to http://gateway.local
  • Doing .local DNS lookups, which are primarily (but not only) used by native web things (e.g. using the webthing-* libraries).

Neither of these are absolutely necessary, but are definitely conveniences.

@white-gecko
Copy link
Contributor

Ah yes, I can see the same message in my logs as well. But I think the avahi daemons seam not to further interfere as it seems to me.

@white-gecko
Copy link
Contributor

But sure I think an environment variable could control whether the daemon should be running. But this would not solve the issue to prevent the log messages.

@mrstegeman
Copy link
Contributor

I think the issue here is that avahi is running on the host as well, and the Docker container is using host networking, so the two are somehow interfering.

@snorp
Copy link
Contributor

snorp commented Jan 3, 2020

I have this log message too, and my host (CoreOS) isn't running avahi.

snorp added a commit to snorp/gateway-docker that referenced this issue Jan 3, 2020
WebThings Gateway (Old) automation moved this from Inbox to Done Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

4 participants