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

Container running but with error logs #17

Closed
Dragane opened this issue Nov 2, 2020 · 6 comments
Closed

Container running but with error logs #17

Dragane opened this issue Nov 2, 2020 · 6 comments
Milestone

Comments

@Dragane
Copy link

Dragane commented Nov 2, 2020

Hi, i put this nagios installation to kubernetes cluster of RPis. The container starts successfully and i can get to the web gui. Landing page works, but clicking anything else leads to Internal Server Error. I have a feeling based on error that the image pulled is incorrect architecture.

Apache error log:
[Mon Nov 02 21:07:54.502666 2020] [cgi:error] [pid 28] [client 10.42.1.1:29865] AH01215: (8)Exec format error: exec of '/opt/nagios/sbin/status.cgi' failed: /opt/nagios/sbin/status.cgi, referer: http://192.168.1.80:9999/side.php [Mon Nov 02 21:07:54.504362 2020] [cgi:error] [pid 28] [client 10.42.1.1:29865] End of script output before headers: status.cgi, referer: http://192.168.1.80:9999/side.php

And the container log has this block repeating:

checking permissions for nagios /opt/nagios/bin/nagios: line 1:ELF: not found /opt/nagios/bin/nagios: line 2: @8: not found /opt/nagios/bin/nagios: line 3: @@@@0pppP%P%000▒▒▒▒▒: not found /opt/nagios/bin/nagios: line 4: ▒▒: not found /opt/nagios/bin/nagios: line 5: ▒▒: not found /opt/nagios/bin/nagios: line 6: ▒.▒▒: not found /opt/nagios/bin/nagios: line 7: ▒▒: not found /opt/nagios/bin/nagios: line 8: ▒▒: not found /opt/nagios/bin/nagios: line 9: ▒P▒td▒▒: not found /opt/nagios/bin/nagios: line 10: ▒▒: not found /opt/nagios/bin/nagios: line 11: ▒▒: not found /opt/nagios/bin/nagios: line 12: ▒: not found /opt/nagios/bin/nagios: line 13: ˈF: not found /opt/nagios/bin/nagios: line 14: syntax error: unexpected "("

@manios
Copy link
Owner

manios commented Nov 3, 2020

Hi @Dragane ,

I am afraid that I do not understand. Can you provide more details? Last year on #14 , a mate had permission issues on a Kubernetes deployment because he lacked escalation settings:

...
spec:
      containers:
        ...
        securityContext:
          allowPrivilegeEscalation: true
          ...
...

Best regards,
Christos

@Dragane
Copy link
Author

Dragane commented Nov 3, 2020 via email

@manios
Copy link
Owner

manios commented Nov 3, 2020

Hi @Dragane ,

My image has flavours for both arm-v6 and arm-v7 as you can see by examining its manifest:

$ docker run --rm -it mplatform/mquery manios/nagios
Image: manios/nagios
 * Manifest List: Yes
 * Supported platforms:
   - linux/amd64
   - linux/arm/v7
   - linux/arm/v6

However sometimes, because docker manifest related features are still experimental (after 2+ years of their introduction) it has happened when I tested in Raspberry Pi 1 (arm-v6) and Raspberry Pi 3 (arm-v7) that it does not download the arm image but the amd64 .

Thus I had to define explicitly :

docker pull --platform=linux/arm/v6 manios/nagios
# or
docker pull --platform=linux/arm/v7 manios/nagios

and it worked.

I hope this helps.

Best regards,
Christos

@manios manios added this to the build-2 milestone Dec 11, 2020
@manios manios closed this as completed Dec 24, 2020
@dowoco
Copy link

dowoco commented Jan 6, 2021

I get the following error when trying to obtain the arm7 version of this container. Its like the arm7 version is not available. I have checked the .Server.Experimental feature it set to true.
I only download the amd64 version.

docker run --platform=linux/arm/v7 --rm -it mplatform/mquery manios/nagios Unable to find image 'mplatform/mquery:latest' locally latest: Pulling from mplatform/mquery Digest: sha256:e15189e3d6fbcee8a6ad2ef04c1ec80420ab0fdcf0d70408c0e914af80dfb107 Status: Image is up to date for mplatform/mquery:latest docker: Error response from daemon: image with reference mplatform/mquery was found but does not match the specified platform: wanted linux/arm/v7, actual: linux/amd64. See 'docker run --help'.

@manios
Copy link
Owner

manios commented Jan 6, 2021

Hi @dowoco !

Please have a look again on what you are trying to do. From what you are writting, you try to run the image mplatform/mquery and not Nagios. Furthermore mplatform/mquery latest tag does not have a linux/arm/v7 flavour (check here). That's why you get these errors.

In order to run Nagios you just need to get the example commands from README > Running section. Please check again and let me know if you have issues.

Best regards,
Christos

@dowoco
Copy link

dowoco commented Jan 6, 2021

Its all working now.

I was missing some libraries on my raspberry pi host that were required for the apt command to resolve the repositories. sudo dpkg -i libseccomp2_2.4.3-1+b1_armhf.deb. I think this was mainly for debian based distros. But after installing this and correcting a simple user error, it all fired up.

I was connecting to the wrong port 80, instead of 8080. This bit was simple user error.

After I slept on it, retried this morning and all working now. Just testing for the moment.

Thanks for our quick response.

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

3 participants