Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#41659 - [unifi] Add "WorkingDirectory=/usr/lib/unifi" in systemd service

Attached to Project: Community Packages
Opened by Sean Lynch (seanl) - Friday, 22 August 2014, 23:06 GMT
Last edited by Sébastien Luttringer (seblu) - Monday, 25 August 2014, 12:53 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

unifi will not start due to inability to find its log directory

Additional info:
* Version: 3.2.1-1
* config and/or log files etc.


Steps to reproduce:

1. Install unifi package
2. systemctl start unifi
3. wait about 10 seconds
4. journalctl -e

Expected results:

Unifi starts and works

Actual results:

Unifi fails with the following in the journal:

Aug 22 15:15:18 dib java[18862]: log4j:ERROR setFile(null,true) call failed.
Aug 22 15:15:18 dib java[18862]: java.io.FileNotFoundException: logs/server.log (No such file or directory)

Looking at the CWD of the process shows it is /. Adding WorkingDirectory=/usr/lib/unifi to the unit file makes the problem go away.
This task depends upon

Closed by  Sébastien Luttringer (seblu)
Monday, 25 August 2014, 12:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  unifi-3.2.1-2
Comment by Sébastien Luttringer (seblu) - Saturday, 23 August 2014, 23:32 GMT
I'm not able to reproduce wit a fresh install.

Could you give me the output of:
$ getent passwd unifi
Comment by Sean Lynch (seanl) - Sunday, 24 August 2014, 03:51 GMT
Sure, it says:

unifi:x:113:113::/usr/lib/unifi:/bin/bash
Comment by Sébastien Luttringer (seblu) - Monday, 25 August 2014, 12:51 GMT
That's fix the issue of missing server.log file, so I will add it, but this was not a blocker for unifi service to work. I don't understand why your setup is not working without changing of working directory.

Loading...