UI brings unexpected error when file permissions are not correct

Description

I was working in the threshold UI and wanted to save the changes. Then the UI brought the unexpected error.

In my case the issue was trivial but not easy to find. I run my OpenNMS in Docker so the UID of the config files has be 10001. If that's not the case OpenNMS then can't write to the file.
But wrong file permissions could also happen in a non Docker setup.

I found this DEBUG log that helped me to solve the problem. It was also not easy to find because I've expected something with ERROR or EXCEPTION.

2020-04-08 14:55:19,257 DEBUG [qtp1910909294-168684] o.o.w.s.s.SecurityAuthenticationEventOnmsEventBuilder: ServletRequestHandledEvent received - url=[/opennms/admin/thresholds/index.htm]; client=[172.29.0.1]; method=[POST]; servlet=[dispatcher]; session=[node01d3gsozwzi9h2xmdy551m0axk23]; user=[mf1045]; time=[4ms]; status=[failed: javax.servlet.ServletException: Could not save the changes to the threshold because java.io.FileNotFoundException: /opt/opennms/etc/thresholds.xml (Permission denied)] Servlet - dispatcher

It would be nice if the UI could provide this information so a user is not doomed to search in the logs for an unknown issue.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Details

Assignee

Reporter

Labels

Affects versions

Priority

PagerDuty

Created April 9, 2020 at 6:16 AM
Updated April 15, 2020 at 3:27 PM