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

Not working on Pi 4 #32

Closed
meanwhile28 opened this issue Aug 17, 2021 · 12 comments
Closed

Not working on Pi 4 #32

meanwhile28 opened this issue Aug 17, 2021 · 12 comments
Milestone

Comments

@meanwhile28
Copy link

Hi @manios

thx for the docker first of all. I tried to install it on my Pi 4 and seems that some services are not starting.
The Website shows "Unable to get process status" and the log keeps repeating the section for initializing a process.

I checked as described the correct architecture which is armv7

Any idea what is causing this issue ?

@manios
Copy link
Owner

manios commented Aug 18, 2021

Hi @meanwhile28 !

Unfortunately I do not own a Raspberry Pi 4. In order to debug the issue can you please run:

docker logs <your-container-name> > raspberryPi4-nagios.log

and attach the logs to the issue?

Thank you,
Christos

@meanwhile28
Copy link
Author

Hi @manios thx for looking into it.

I can't attache the logs as its growing and growing with the same entries.

Here are the first entries.

Removing Apache HTTPD PID file before starting it ...OK
Removing rsyslogd PID file before starting it ...OK
TZ env variable is not set. Continue.
Started runsvdir, PID is 15
checking permissions for nagios
2021-08-17T15:28:35.706585+00:00 f771085d47c1 - 1684500332 19 : [origin software="rsyslogd" swVersion="8.2012.0" x-pid="21" x-info="https://www.rsyslog.com"] start

And this part is constantly repeating..

2021-08-17T15:28:35.724325+00:00 f771085d47c1 - 0 -146029350 : Nagios 4.4.6 starting... (PID=20)
2021-08-17T15:28:35.724422+00:00 f771085d47c1 : Local time is Wed Mar 16 12:56:32 UTC 2242
2021-08-17T15:28:35.724465+00:00 f771085d47c1 : LOG VERSION: 2.0
2021-08-17T15:28:35.724650+00:00 f771085d47c1 : qh: Socket '/opt/nagios/var/rw/nagios.qh' successfully initialized
2021-08-17T15:28:35.724705+00:00 f771085d47c1 : qh: core query handler registered
2021-08-17T15:28:35.724746+00:00 f771085d47c1 : qh: echo service query handler registered
2021-08-17T15:28:35.724786+00:00 f771085d47c1 : qh: help for the query handler registered
2021-08-17T15:28:35.724857+00:00 f771085d47c1 : wproc: Successfully registered manager as @wproc with query handler
2021-08-17T15:28:35.738259+00:00 f771085d47c1 : wproc: Registry request: name=Core Worker 25;pid=25
2021-08-17T15:28:35.741475+00:00 f771085d47c1 : wproc: Registry request: name=Core Worker 26;pid=26
2021-08-17T15:28:35.744544+00:00 f771085d47c1 : wproc: Registry request: name=Core Worker 29;pid=29
2021-08-17T15:28:35.747892+00:00 f771085d47c1 : wproc: Registry request: name=Core Worker 30;pid=30
2021-08-17T15:28:35.751278+00:00 f771085d47c1 : wproc: Registry request: name=Core Worker 27;pid=27
2021-08-17T15:28:35.754428+00:00 f771085d47c1 : wproc: Registry request: name=Core Worker 28;pid=28
checking permissions for nagios

@alan-roe
Copy link

alan-roe commented Sep 3, 2021

I'm also on a Pi 4 and encountering the same issue. That section isn't repeating exactly as is, the PIDs are increasing. I've attached my log file after allowing it to run for a few seconds. Thanks!

raspberryPi4-nagios.log

@DimmiDonger
Copy link

I'm using Pi 4 too and I can confirm this issue.

@manios
Copy link
Owner

manios commented Oct 11, 2021

Hi @DimmiDonger , @roe-ur-boat , @meanwhile28 !

Can you please run:

docker version in your Raspberry Pi and post the output here?

Example output of mine:

pi@raspberrypi:~ $ docker version
Client: Docker Engine - Community
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46
 Built:             Wed Sep 16 17:07:02 2020
 OS/Arch:           linux/arm
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.13
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       4484c46
  Built:            Wed Sep 16 17:00:52 2020
  OS/Arch:          linux/arm
  Experimental:     true
 containerd:
  Version:          1.3.7
  GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Thanks,
Christos

@DimmiDonger
Copy link

Hi Christos,

my output is

pi@raspberrypi:~ $ docker version
Client: Docker Engine - Community
 Version:           20.10.9
 API version:       1.41
 Go version:        go1.16.8
 Git commit:        c2ea9bc
 Built:             Mon Oct  4 16:06:55 2021
 OS/Arch:           linux/arm
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.9
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.8
  Git commit:       79ea9d3
  Built:            Mon Oct  4 16:04:47 2021
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.4.11
  GitCommit:        5b46e404f6b9f661a205e28d59c982d3634148f8
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
pi@raspberrypi:~ $ 

Regards

@alan-roe
Copy link

Hi Christos!


Client: Docker Engine - Community
 Version:           20.10.8
 API version:       1.41
 Go version:        go1.16.6
 Git commit:        3967b7d
 Built:             Fri Jul 30 19:55:38 2021
 OS/Arch:           linux/arm
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.8
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.6
  Git commit:       75249d8
  Built:            Fri Jul 30 19:53:31 2021
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.4.9
  GitCommit:        e25210fe30a0a703442421b0f60afac609f950a3
 runc:
  Version:          1.0.1
  GitCommit:        v1.0.1-0-g4144b63
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@manios
Copy link
Owner

manios commented Oct 11, 2021

Hi !

The issue is related to Alpine 3.14.0. We started using it as base image since commit b64dd9a (build-5). The change is described in Release Notes forAlpine 3.14.0 > faccessat2 and has affected a lot of images like ours.

There are some workarounds as described here:

  1. Use an updated Docker engine bigger than 20.10.0. @DimmiDonger , @roe-ur-boat use it already so it seems that it does not make any difference.
  2. Download the moby default seccomp profile, make this change
    - "defaultAction": "SCMP_ACT_ERRNO",
    + "defaultAction": "SCMP_ACT_TRACE",
    and use --security-opt=seccomp=default.json to run the container like this:
    docker run -d --name nagios --security-opt=seccomp=default.json manios/nagios
    
    Otherwise, start dockerd with the flag --seccomp-profile=default.json (I have not tested it yet).
  3. Update libseccomp in Raspberry Pi as described here:
    wget http://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb && \
    sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
    In order to find out your libseccomp2 version, run in your Raspberry: sudo apt show libseccomp2

In my case:

The environment I tested it is

  • Raspberry Pi: Raspberry Pi 4 Model B Rev 1.1
  • docker version: 19.03.13
  • libseccomp2: 2.3.3-4

Results

  • Step 2 worked with docker run. However you have to remember to use the --seccomp-profile=default.json when you issue docker run ....
  • Step 3 worked and now I do not need any other configuration to run the image.

Can you please try if this solves your issue and let me know?

Thanks!

@DimmiDonger
Copy link

DimmiDonger commented Oct 11, 2021

Hi Christos,
with step 3 (only this step) looks better:

pi@raspberrypi:~ $ wget http://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb && \
> sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
--2021-10-12 01:07:55--  http://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
Resolving ftp.debian.org (ftp.debian.org)... 2a04:4e42:62::644, 199.232.138.132
Connecting to ftp.debian.org (ftp.debian.org)|2a04:4e42:62::644|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46324 (45K) [application/x-debian-package]
Saving to: 'libseccomp2_2.5.1-1_armhf.deb'

libseccomp2_2.5.1-1_armhf.deb                        100%[=====================================================================================================================>]  45.24K  --.-KB/s    in 0.01s   

2021-10-12 01:07:55 (3.25 MB/s) - 'libseccomp2_2.5.1-1_armhf.deb' saved [46324/46324]

(Reading database ... 57008 files and directories currently installed.)
Preparing to unpack libseccomp2_2.5.1-1_armhf.deb ...
Unpacking libseccomp2:armhf (2.5.1-1) over (2.3.3-4) ...
Setting up libseccomp2:armhf (2.5.1-1) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1) ...
pi@raspberrypi:~ $ docker run manios/nagios
Adding password for user nagiosadmin
Removing Apache HTTPD PID file before starting it ...OK
Removing rsyslogd PID file before starting it ...OK
TZ env variable is not set. Continue.
Started runsvdir, PID is 16
checking permissions for nagios
2021-10-11T23:08:03.841683+00:00 a649a2002b5e : [origin software="rsyslogd" swVersion="8.2012.0" x-pid="22" x-info="https://www.rsyslog.com"] start

2021-10-11T23:08:03.855048+00:00 a649a2002b5e : Nagios 4.4.6 starting... (PID=20)
2021-10-11T23:08:03.855140+00:00 a649a2002b5e : Local time is Mon Oct 11 23:08:03 UTC 2021
2021-10-11T23:08:03.855181+00:00 a649a2002b5e : LOG VERSION: 2.0
2021-10-11T23:08:03.855538+00:00 a649a2002b5e : qh: Socket '/opt/nagios/var/rw/nagios.qh' successfully initialized
2021-10-11T23:08:03.855636+00:00 a649a2002b5e : qh: core query handler registered
2021-10-11T23:08:03.855678+00:00 a649a2002b5e : qh: echo service query handler registered
2021-10-11T23:08:03.855716+00:00 a649a2002b5e : qh: help for the query handler registered
2021-10-11T23:08:03.855793+00:00 a649a2002b5e : wproc: Successfully registered manager as @wproc with query handler
2021-10-11T23:08:03.869521+00:00 a649a2002b5e : wproc: Registry request: name=Core Worker 27;pid=27
2021-10-11T23:08:03.872995+00:00 a649a2002b5e : wproc: Registry request: name=Core Worker 26;pid=26
2021-10-11T23:08:03.876104+00:00 a649a2002b5e : wproc: Registry request: name=Core Worker 29;pid=29
2021-10-11T23:08:03.879610+00:00 a649a2002b5e : wproc: Registry request: name=Core Worker 30;pid=30
2021-10-11T23:08:03.882651+00:00 a649a2002b5e : wproc: Registry request: name=Core Worker 28;pid=28
2021-10-11T23:08:03.887800+00:00 a649a2002b5e : wproc: Registry request: name=Core Worker 31;pid=31
2021-10-11T23:08:04.460355+00:00 a649a2002b5e : Successfully launched command file worker with pid 37
2021-10-11T23:09:55.955980+00:00 a649a2002b5e : SERVICE ALERT: localhost;HTTP;WARNING;SOFT;1;HTTP WARNING: HTTP/1.1 401 Unauthorized - 691 bytes in 0.003 second response time
2021-10-11T23:10:56.000200+00:00 a649a2002b5e : SERVICE ALERT: localhost;HTTP;WARNING;SOFT;2;HTTP WARNING: HTTP/1.1 401 Unauthorized - 691 bytes in 0.002 second response time
2021-10-11T23:11:48.946375+00:00 a649a2002b5e : SERVICE ALERT: localhost;SSH;CRITICAL;SOFT;1;connect to address 127.0.0.1 and port 22: Connection refused

2021-10-11T23:11:56.041103+00:00 a649a2002b5e : SERVICE ALERT: localhost;HTTP;WARNING;SOFT;3;HTTP WARNING: HTTP/1.1 401 Unauthorized - 691 bytes in 0.002 second response time
2021-10-11T23:12:48.984469+00:00 a649a2002b5e : SERVICE ALERT: localhost;SSH;CRITICAL;SOFT;2;connect to address 127.0.0.1 and port 22: Connection refused
2021-10-11T23:12:56.077733+00:00 a649a2002b5e : SERVICE ALERT: localhost;HTTP;WARNING;HARD;4;HTTP WARNING: HTTP/1.1 401 Unauthorized - 691 bytes in 0.002 second response time
2021-10-11T23:13:49.024760+00:00 a649a2002b5e : SERVICE ALERT: localhost;SSH;CRITICAL;SOFT;3;connect to address 127.0.0.1 and port 22: Connection refused
2021-10-11T23:14:49.065875+00:00 a649a2002b5e : SERVICE ALERT: localhost;SSH;CRITICAL;HARD;4;connect to address 127.0.0.1 and port 22: Connection refused

However, when I try to open http://192.168.0.3:8080/ in browser, I get "This site can’t be reached, 192.168.0.3 refused to connect (ERR_CONNECTION_REFUSED).".

Do I miss something?

Regards

@manios
Copy link
Owner

manios commented Oct 12, 2021

Hi @DimmiDonger !

I am glad Step 3 works for you! I suspect that you try to access Nagios web interface

You must specify a port mapping / forwarding to port 8080 when you run the container:

docker run --name nagios -d -p 0.0.0.0:8080:80  manios/nagios:latest

You can read more about that in Container networking / Published ports.

Best regards,
Christos

@DimmiDonger
Copy link

Hi Christos,

it works fine now! Thank you very much!

Best Regards

@manios
Copy link
Owner

manios commented Oct 26, 2021

Hi @DimmiDonger, @roe-ur-boat , @meanwhile28 !

With the release of build-8 we no longer face this issue. I had to roll back to Alpine 3.12. Please pull the latest or build-8 tag:

docker pull manios/nagios:latest
# OR
docker pull manios/nagios:build-8

For more information please check Changelog / Build 8

I am closing the issue. If you find any problem we can re-open it.

Thanks!
Christos

@manios manios closed this as completed Oct 26, 2021
@manios manios added this to the build-8 milestone Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants