Code Monkey home page Code Monkey logo

Comments (12)

dun avatar dun commented on July 21, 2024

What is the output from:
ls -ld /var/log/munge /var/log/munge/munged.log

What is the user id under which you are trying to start the daemon?

How are you starting the daemon (e.g., via the command-line, via systemd, via sysvinit)? What is the exact command-line you are using?

Based on the error message "/var/log/munge/munged.log" should be owned by UID 0, it appears that you're trying to run munged as root, and munged.log is not owned by root.

It's recommended that you run the daemon as a non-privileged user. Most distributions create a non-privileged munge account under which to run the daemon.

The --force command-line option changes certain errors (such as insecure file/directory permissions for the logfile) into warnings so the daemon will continue to run. This can be seen in the log messages you list at the end that begin with munged: Warning:.

from munge.

djevo1 avatar djevo1 commented on July 21, 2024

The output of the command is
drwx------. 1 munge munge 20 Sep 7 11:55 /var/log/munge -rw-r-----. 1 munge munge 2839 Sep 7 13:24 /var/log/munge/munged.log
I am attempting to start using the commandline systemctl
I am using systemctl start munge
A munge user is created however I am not sure how to use systemd as the munge user as it does not allow login.

from munge.

dun avatar dun commented on July 21, 2024

After the systemctl start munge command, what is the output of systemctl status -l munge?

from munge.

djevo1 avatar djevo1 commented on July 21, 2024

The output is

● munge.service - MUNGE authentication service
   Loaded: loaded (/etc/systemd/system/munge.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2016-09-07 15:58:53 EDT; 17s ago
     Docs: man:munged(8)
  Process: 7603 ExecStart=/usr/sbin/munged --syslog (code=exited, status=1/FAILURE)

Sep 07 15:58:53 dragonsdenN3 systemd[1]: Starting MUNGE authentication service...
Sep 07 15:58:53 dragonsdenN3 systemd[1]: munge.service: control process exited, code=exited status=1
Sep 07 15:58:53 dragonsdenN3 systemd[1]: Failed to start MUNGE authentication service.
Sep 07 15:58:53 dragonsdenN3 systemd[1]: Unit munge.service entered failed state.
Sep 07 15:58:53 dragonsdenN3 systemd[1]: munge.service failed.

from munge.

dun avatar dun commented on July 21, 2024

Do you see anything related to the munged failure in the output of journalctl -xe, or the file /var/log/messages?

What distribution are your running?

What are the contents of the file /etc/systemd/system/munge.service?

Is SELinux enabled? What is the output of sestatus?

from munge.

djevo1 avatar djevo1 commented on July 21, 2024

I am running CentOS 7.

Output of journalctl is

Sep 07 19:10:38 dragonsdenN3 systemd[1]: Starting MUNGE authentication service...
-- Subject: Unit munge.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit munge.service has begun starting up.
Sep 07 19:10:38 dragonsdenN3 munged[9700]: Failed to resolve host "dragonsdenN3"
Sep 07 19:10:38 dragonsdenN3 munged[9700]: Running on "dragonsdenN3" (0.0.0.0)
Sep 07 19:10:38 dragonsdenN3 munged[9700]: Ignoring PRNG seed "/var/lib/munge/munge.seed": Permission denied
Sep 07 19:10:38 dragonsdenN3 munged[9700]: PRNG seed dir is insecure: invalid ownership of "/var/lib/munge"
Sep 07 19:10:38 dragonsdenN3 munged[9698]: munged: Error: PRNG seed dir is insecure: invalid ownership of "/var/lib/munge"
Sep 07 19:10:38 dragonsdenN3 systemd[1]: munge.service: control process exited, code=exited status=1
Sep 07 19:10:38 dragonsdenN3 systemd[1]: Failed to start MUNGE authentication service.
-- Subject: Unit munge.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit munge.service has failed.
-- 
-- The result is failed.
Sep 07 19:10:38 dragonsdenN3 systemd[1]: Unit munge.service entered failed state.
Sep 07 19:10:38 dragonsdenN3 systemd[1]: munge.service failed.

Contents of systemd

[Unit]
Description=MUNGE authentication service
Documentation=man:munged(8)
After=network.target
After=syslog.target
After=time-sync.target

[Service]
Type=forking
ExecStart=/usr/sbin/munged         
PIDFile=/var/run/munge/munged.pid
User=munge
Group=munge
Restart=on-abort

[Install]
WantedBy=multi-user.target

from munge.

dun avatar dun commented on July 21, 2024

The fatal error is:
Error: PRNG seed dir is insecure: invalid ownership of "/var/lib/munge"

What is the output of ls -ld /var/lib/munge? That directory should be owned by the munge user and munge group.

from munge.

djevo1 avatar djevo1 commented on July 21, 2024

The output is
drwx------. 1 990 987 0 May 16 2014 /var/lib/munge

from munge.

dun avatar dun commented on July 21, 2024

That directory needs to be owned by the munge user and munge group:
chown -R munge:munge /var/lib/munge

from munge.

djevo1 avatar djevo1 commented on July 21, 2024

Running that still produces a failed start
Job for munge.service failed because the control process exited with error code. See "systemctl status munge.service" and "journalctl -xe" for details.
Output of journalctl is

30:02 dragonsdenN3 munged[20453]: munged: Error: Found pid 5795 bound to socket "/var/run/munge/munge.socket.2"
Sep 08 09:30:02 dragonsdenN3 systemd[1]: munge.service: control process exited, code=exited status=1
Sep 08 09:30:02 dragonsdenN3 systemd[1]: Failed to start MUNGE authentication service.
-- Subject: Unit munge.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit munge.service has failed.
-- 
-- The result is failed.
Sep 08 09:30:02 dragonsdenN3 systemd[1]: Unit munge.service entered failed state.
Sep 08 09:30:02 dragonsdenN3 systemd[1]: munge.service failed.

from munge.

dun avatar dun commented on July 21, 2024

The fatal error is the line with munged: Error::
munged: Error: Found pid 5795 bound to socket "/var/run/munge/munge.socket.2"

Another running process (pid 5795, presumably another instance of munged) is currently bound to the daemon's communication socket (/var/run/munge/munge.socket.2). Check that pid:
ps lp 5795

Since it appears that munged is already running, check its status:
systemctl status -l munge

If you want to restart the daemon:
systemctl restart munge

Once it's running: try to encode & decode a credential:
munge -n | unmunge

from munge.

djevo1 avatar djevo1 commented on July 21, 2024

systemctl restart munge did nothing, however after rebooting I was able to get munge to start properly by changing the permissions.

from munge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.