Starting opennms with systemd as non-root fails with access denied for pid

Description

When you do a fresh installation on Debian and try to start the service with systemd it fails with the following error message:

The OpenNMS user can't create the pid file in /var/run/opennms.pid.

Acceptance / Success Criteria

None

Cannot finish until linked issue is finished.

is triggered by

is triggering

Lucidchart Diagrams

Activity

Show:

Benjamin Reed July 7, 2021 at 2:23 PM

Merged to develop

Benjamin Reed July 6, 2021 at 9:47 PM

Ronny Trommer June 28, 2021 at 3:18 PM

I've fixed this problem by

  • Creating a directory in /run/opennms with ownership of opennms:opennms

  • Changed the systemd unit using the new /run/opennms/opennms.pid instead the legacy path to /var/run

  • Changed the PID file in bin/opennms to OPENNMS_PIDFILE="/run/opennms/opennms.pid"

Fixed

Details

Assignee

Reporter

Sprint

Fix versions

Priority

PagerDuty

Created June 28, 2021 at 1:59 PM
Updated August 12, 2022 at 11:43 PM
Resolved July 7, 2021 at 2:23 PM