Autofs service failed because a configured resource limit was exceeded
Environment
- Red Hat Enterprise Linux 7
- Autofs
Issue
Autofs service fails with error
Job for autofs.service failed because a configured resource limit was exceeded. See "systemctl status autofs.service" and "journalctl -xe" for details.
Resolution
Kill the running autofs service and start the autofs service again.
# ps -elf | grep autofs | grep -v grep | awk '{print $4}' | xargs kill -9
Start the autofs service
# systemctl start autofs
Root Cause
- Autofs binary was executed manually, because of which it failed to create a pid file. The process was already running therefore it was not possible to spawn another process.
- Killing the previous process and restarting the service makes sure that the pid file is created and the service meets it's dependencies therefore starting the autofs service successfully.
Diagnostic Steps
- Check if the autofs service is active
# systemctl is-active autofs
- If it is not active, check if the autofs binary has been executed, check as :-
# ps -aux | grep -i autofs | grep -v grep
-
Check the options by with which the autofs binary was executed
-
If it does not have any options like
--pid-file /run/autofs.pid, it was executed manually, and the service will fail.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments