Bug 1545840 - Unable to start epmd.service because of its unit file sets LimitNPROC=1
Summary: Unable to start epmd.service because of its unit file sets LimitNPROC=1
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: erlang
Version: 28
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-15 16:38 UTC by mkovacik
Modified: 2018-11-20 14:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-20 14:52:45 UTC
Type: Bug


Attachments (Terms of Use)
journalctl -xe of epmd.service failing to start (810 bytes, text/plain)
2018-02-15 16:38 UTC, mkovacik
no flags Details

Description mkovacik 2018-02-15 16:38:18 UTC
Created attachment 1396646 [details]
journalctl -xe of epmd.service failing to start

Description of problem:

The systemd unit file /usr/lib/systemd/system/epmd.service specifies a limit on the forked processes count, LimitNPROC=1, which prevents the epmd service to start with a specific error (see the attachment). This later on blocks e.g RabbitMQ from starting.

I've cross-checked that replacing the executable of /usr/bin/epmd with /bin/true isn't affected by LimitNPROC=1 and most likely epmd indeed requires some forking to happen. I can't tell for sure as I don't know any Erlang :-/

This can be worked around with the minimal LimitNPROC=7 that worked for me in my Docker deployment. Better yet might be to omit the LimitNPROC altogether.


Version-Release number of selected component (if applicable):
erlang-erts-19.3.6.5-2.fc28.x86_64.rpm

How reproducible:
always

Steps to Reproduce:
1. install erlang-erts
2. sudo systemctl start epmd.service


Actual results:
epmd.service fails starting because it's limited to fork enough subprocesses.


Expected results:
epmd.service starts as expected

Additional info:

The systemd epmd.service unit file:

Unit]
Description=Erlang Port Mapper Daemon
After=network.target
Requires=epmd.socket

[Service]
ExecStart=/usr/bin/epmd -systemd
#ExecStop=/usr/bin/epmd -kill
Type=notify
StandardOutput=journal
StandardError=journal
DeviceAllow=/dev/null rw
PrivateTmp=true
#CapabilityBoundingSet=
NoNewPrivileges=true
Restart=always
LimitNPROC=1
LimitFSIZE=0
User=epmd
Group=epmd

[Install]
Also=epmd.socket
WantedBy=multi-user.target

Comment 1 Fedora End Of Life 2018-02-20 15:34:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Peter Lemenkov 2018-11-20 14:52:45 UTC
Works for me with erlang-20.3.8.9-2.fc29.

Feel free to reopen if the issue still exists on your machine.


Note You need to log in before you can comment on or make changes to this bug.