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#70512 - [varnish] Default varnishncsa.service is not working due to missing user and log directory

Attached to Project: Community Packages
Opened by MPThLee (MPThLee) - Monday, 19 April 2021, 11:29 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Saturday, 15 May 2021, 14:56 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:


Additional info:
* package version(s)
- `varnish 6.5.1-1`
* config and/or log files etc.
```
systemd[1]: Starting Varnish Cache HTTP accelerator NCSA logging daemon...
systemd[1470447]: varnishncsa.service: Failed to determine user credentials: No such process
systemd[1470447]: varnishncsa.service: Failed at step USER spawning /usr/bin/varnishncsa: No such process
systemd[1]: varnishncsa.service: Control process exited, code=exited, status=217/USER
systemd[1]: varnishncsa.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Varnish Cache HTTP accelerator NCSA logging daemon.
```
After changing `User` to `varnish` temporary in `varnishncsa.service`:
```
systemd[1]: Starting Varnish Cache HTTP accelerator NCSA logging daemon...
varnishncsa[1471702]: Can't open output file (No such file or directory)
systemd[1]: varnishncsa.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: varnishncsa.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Varnish Cache HTTP accelerator NCSA logging daemon.
```

This was due to missing user and folder creation on PKGBUILD. Default `varnishncsa.service` from package itself is like:
```
[Service]
RuntimeDirectory=varnishncsa
Type=forking
User=varnishlog
Group=varnish

...

ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D
ExecReload=/bin/kill -HUP $MAINPID
```
But User `varnishlog` and Directory `/var/log/varnish` is not created at install.

Steps to reproduce:
Just Install `varnish` and `systemctl start varnishncsa.service`
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Saturday, 15 May 2021, 14:56 GMT
Reason for closing:  No response
Additional comments about closing:  I'm going to assume it's fixed as it works for me and I didn't get a response from the original reporter.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 29 April 2021, 22:28 GMT
This should be fixed in 6.6.0-2. Could you check? You might have to remove your current varnish group and user manually for it to pick it up.

Loading...