Code Monkey home page Code Monkey logo

Comments (9)

dun avatar dun commented on August 22, 2024

The /run/munge directory contains the Unix domain socket and the pid file -- both of which are created by the running daemon. And the /run/munge directory is (typically) created by systemd when munge.service is started and removed by systemd when it is stopped.

Is munged running? How did you start it? What OS and distribution are you running?

from munge.

kevinrsun05 avatar kevinrsun05 commented on August 22, 2024

I'm on Linux.

NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

I couldn't start the daemon, so I thought it had to do with /run/munge not showing up. When I run:
sudo systemctl start munge.service
I get:

Job for munge.service failed because the control process exited with error code.
See "systemctl status munge.service" and "journalctl -xe" for details.

This is the output for journalctl _UID=$(id -u munge):
Jun 24 13:29:48 schrodinger-cmc-linuxd munged[453678]: munged: Error: Failed to check socket dir "/usr/local/var/run/munge": cannot canonicalize "/usr/local/var/run/munge": No such file or directory

from munge.

dun avatar dun commented on August 22, 2024

That looks like munge was compiled with the default configure options that place everything under /usr/local. That munged binary is built with a runstatedir of /usr/local/var/run. You can check that by examining the config.log. I suspect you'll see something like:

$ grep ^runstatedir config.log
runstatedir='${localstatedir}/run'

The easiest solution would be to install munge from the package manager.
$ sudo apt install munge

Or you could manually create the run directory it's looking for (but that assumes the client is going to look for it in the same place):
$ sudo mkdir -p /usr/local/var/run/munge && sudo chown munge:munge /usr/local/var/run/munge

Or you could re-run configure with the appropriate options and recompile.

from munge.

kevinrsun05 avatar kevinrsun05 commented on August 22, 2024

I ran
$ sudo apt install munge but I'm got this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  munge
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/89.4 kB of archives.
After this operation, 333 kB of additional disk space will be used.
Selecting previously unselected package munge.
(Reading database ... 222648 files and directories currently installed.)
Preparing to unpack .../munge_0.5.13-2build1_amd64.deb ...
Unpacking munge (0.5.13-2build1) ...
Setting up munge (0.5.13-2build1) ...
Generating a pseudo-random key using /dev/urandom completed.
Please refer to /usr/share/doc/munge/README.Debian for instructions to generate more secure key.
Job for munge.service failed because the control process exited with error code.
See "systemctl status munge.service" and "journalctl -xe" for details.
invoke-rc.d: initscript munge, action "start" failed.
● munge.service - MUNGE authentication service
     Loaded: loaded (/usr/local/lib/systemd/system/munge.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2024-06-24 14:15:13 EDT; 5ms ago
       Docs: man:munged(8)
    Process: 482991 ExecStart=/usr/local/sbin/munged $OPTIONS (code=exited, status=1/FAILURE)

Jun 24 14:15:13 schrodinger-cmc-linuxd systemd[1]: Starting MUNGE authentication service...
Jun 24 14:15:13 schrodinger-cmc-linuxd munged[482996]: munged: Error: Failed to check logfile "/usr/local/var/log/munge/munged.log": Permission denied
Jun 24 14:15:13 schrodinger-cmc-linuxd systemd[1]: munge.service: Control process exited, code=exited, status=1/FAILURE
Jun 24 14:15:13 schrodinger-cmc-linuxd systemd[1]: munge.service: Failed with result 'exit-code'.
Jun 24 14:15:13 schrodinger-cmc-linuxd systemd[1]: Failed to start MUNGE authentication service.
dpkg: error processing package munge (--configure):
 installed munge package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.23) ...
Errors were encountered while processing:
 munge
E: Sub-process /usr/bin/dpkg returned an error code (1)

so I changed the permissions using sudo chown -R and created a key. I ran sudo systemctl start munge.service, and I'm getting the same error as before: munged: Error: Failed to check socket dir "/usr/local/var/run/munge": cannot canonicalize "/usr/local/var/run/munge": No such file or directory

from munge.

dun avatar dun commented on August 22, 2024

It looks like your previous /usr/local installation is causing problems. systemd is using the /usr/local/lib/systemd/system/munge.service you previously installed. Remove the old installation in /usr/local.

from munge.

kevinrsun05 avatar kevinrsun05 commented on August 22, 2024

How should I do that? I tried doing sudo apt-get remove munge and sudo apt-get purge munge already, but clearly they didn't do it completely?

from munge.

dun avatar dun commented on August 22, 2024

This is why the package manager is preferred over doing a make install. Undoing a make install is more tedious. apt-get cannot remove something installed via make install.

If you haven't re-run configure since the make install, then running make uninstall should work. But I don't recommend running make uninstall as root if you're not exactly sure what's about to be removed.

It looks like a default configure install for 0.5.15 creates these files on Ubuntu 20.04:

/usr/local/bin/munge
/usr/local/bin/remunge
/usr/local/bin/unmunge
/usr/local/etc/default/munge
/usr/local/etc/logrotate.d/munge
/usr/local/include/munge.h
/usr/local/lib/libmunge.a
/usr/local/lib/libmunge.la
/usr/local/lib/libmunge.so
/usr/local/lib/libmunge.so.2
/usr/local/lib/libmunge.so.2.0.0
/usr/local/lib/pkgconfig/munge.pc
/usr/local/lib/systemd/system/munge.service
/usr/local/sbin/munged
/usr/local/sbin/mungekey
/usr/local/share/man/man1/munge.1
/usr/local/share/man/man1/remunge.1
/usr/local/share/man/man1/unmunge.1
/usr/local/share/man/man3/munge.3
/usr/local/share/man/man3/munge_ctx.3
/usr/local/share/man/man3/munge_ctx_copy.3
/usr/local/share/man/man3/munge_ctx_create.3
/usr/local/share/man/man3/munge_ctx_destroy.3
/usr/local/share/man/man3/munge_ctx_get.3
/usr/local/share/man/man3/munge_ctx_set.3
/usr/local/share/man/man3/munge_ctx_strerror.3
/usr/local/share/man/man3/munge_decode.3
/usr/local/share/man/man3/munge_encode.3
/usr/local/share/man/man3/munge_enum.3
/usr/local/share/man/man3/munge_enum_int_to_str.3
/usr/local/share/man/man3/munge_enum_is_valid.3
/usr/local/share/man/man3/munge_enum_str_to_int.3
/usr/local/share/man/man3/munge_strerror.3
/usr/local/share/man/man7/munge.7
/usr/local/share/man/man8/munged.8
/usr/local/share/man/man8/mungekey.8

You can probably find most/all of these with find /usr/local -name "*munge*". If that find command output looks ok, you could run find /usr/local -name "*munge*" -exec rm {} \;.

from munge.

kevinrsun05 avatar kevinrsun05 commented on August 22, 2024

I don't have permissions to remove these files, because I'm not the root? Is there a work around this?

**Edit: Nevermind, it works now. I'm not sure what fixed it, but I just ran
sudo apt-get update
sudo apt-get install munge
today and it works.

Thank you so much for your time and help!

from munge.

dun avatar dun commented on August 22, 2024

Re: not having permissions... Prepend the command with sudo to run it with root privileges.

Glad to hear you got it working!

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.