Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Smokeping service fails to start automatically #175

Closed
1 task done
jordandalley opened this issue Apr 26, 2024 · 10 comments · Fixed by #177
Closed
1 task done

[BUG] Smokeping service fails to start automatically #175

jordandalley opened this issue Apr 26, 2024 · 10 comments · Fixed by #177

Comments

@jordandalley
Copy link

jordandalley commented Apr 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm uncertain when this started happening, but I noticed one day that my smokeping instance had not been collecting any metrics. The web service was running, but no new metrics were being collected.

After some troubleshooting, I discovered that the container is no longer starting the smokeping service automatically, and thus, none of the probes are running.

I then discovered that if I run the following, it starts working again: docker exec -it smokeping /run/service/svc-smokeping/run &

That is until the container is updated or restarted,

I have tried a completely new container by deleting the existing container,, and purging any old images, then using 'docker compose up -d smokeping' to recreate it. I've also completely started the smokeping config again, including the database and it still won't auto start.

Expected Behavior

No response

Steps To Reproduce

For me, it's just starting the container.

The following processes fail to start unless I start them manually:

abc 769 0.0 0.5 60632 47808 ? S 19:22 0:00 /usr/bin/perl /usr/sbin/smokeping --config=/etc/smokeping/config --nodaemon
abc 783 0.0 0.4 60680 39380 ? S 19:23 0:00 /usr/sbin/smokeping [FPing]
abc 784 0.0 0.4 60632 39352 ? S 19:23 0:00 /usr/sbin/smokeping [DNS]
abc 785 0.0 0.4 60676 39332 ? S 19:23 0:00 /usr/sbin/smokeping [FPing6]

Environment

OS: Debian 11 (Bullseye)
Installed using APT package management

More info below:

1. Output of uname -mr && docker version

6.1.0-0.deb11.17-amd64 x86_64
Client: Docker Engine - Community
 Version:           26.1.0
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        9714adc
 Built:             Mon Apr 22 17:07:06 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.0
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       c8af8eb
  Built:            Mon Apr 22 17:07:06 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

2. Output of cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

CPU architecture

x86-64

Docker creation

---
services:
  smokeping:
    image: lscr.io/linuxserver/smokeping:latest
    container_name: smokeping
    network_mode: host
    hostname: smokeping
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Pacific/Auckland
    volumes:
      - /home/svcs/docker/smokeping/config:/config
      - /home/svcs/docker/smokeping/data:/data
    restart: unless-stopped

Container logs

[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
AH00557: httpd: apr_sockaddr_info_get() failed for smokeping
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@jordandalley jordandalley changed the title [BUG] Smokepng service fails to start automatically [BUG] Smokeping service fails to start automatically Apr 29, 2024
@jordandalley
Copy link
Author

Update - Running 'docker exec -it smokeping s6-svc -u /run/service/svc-smokeping' brings the service up. Has to be done each time the container is restarted.

@LinuxServer-CI
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@hagaram
Copy link

hagaram commented Jun 25, 2024

Arent you by any chance running apache on different than default port e.g. 8080 in my case. Also I run it with network mode host.

The culprit was /etc/s6-overlay/s6-rc.d/svc-apache/run in my case.

--- /tmp/svc-apache
+++ /etc/s6-overlay/s6-rc.d/svc-apache/run
@@ -2,5 +2,5 @@
 # shellcheck shell=bash
 
 exec \
-    s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 80" \
+    s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 8080" \
         /usr/sbin/apachectl -D FOREGROUND

Until apache is not sucesfuly running , smokeping wont start, because it has apache as dependency

Try to run the container with these additional env vars and see for yourself

  S6_LOGGING: "0"
  S6_VERBOSITY: "5"

When I ran the instance on port 8080 with nginx in front of it listening on port 80 it ran OK, If not, apache never "finished" the startup process thus smokeping startup wasnt triggered.

@Wireheadbe
Copy link

Same issue - running in host mode.

@hagaram
Copy link

hagaram commented Jun 25, 2024

@Wireheadbe
Check the s6-overlay logs by including the additional ENV variables I've posted - it might give you an insigth what services are being started, or if they are started succesfully.
I dont think its an issue with this container itself, as I've resolved it with the steps provided - it was issue with my local setup and changes.

When running in network mode host, even your firewall (if it is in place) might interfere with the notify.

I found out something from container is trying to communicate to port 80, even tough my apache config stated 8080 with tcpdump, then I searched this repo for "80" and found the s6-notifyoncheck and voala.

@thespad
Copy link
Member

thespad commented Jun 25, 2024

FWIW that should be fixed in #177

@jordandalley
Copy link
Author

@thespad Thank you very much! :)

@thespad
Copy link
Member

thespad commented Jun 26, 2024

You can test with lspipepr/smokeping:2.8.2-r3-pkg-5382b62f-dev-0df9a2a3bfceb1d7bfccd2c42658715e4a2eb8fc-pr-177 if you want to see if it resolves the issues.

@jordandalley
Copy link
Author

Perfect! ran that image and those processes come straight up.

@thespad thespad linked a pull request Jun 26, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

5 participants