Created attachment 1602737 [details] Example changes needed for service unit file To get the socket to install automatically together with the service, I needed to add additional dependency directives to the .service file. The attachment shows the edits I needed for the [Unit] and [Install] section to make the socket start when I started the service and to enable the socket unit when I enabled the service. (I'm using this with CentOS 7 (based on RHEL7) which has a buggy "systemctl enable" command when used with templates, so I needed to manually copy the templates to /etc/systemd/system and expand the %i macro manually.)
Yeah, the version of systemd on CentOS 7 is not quite as trouble free as the newer versions found on Fedora. However, this package was built with the intention of letting the socket auto spawn the service. You should not need to enable the service itself. See the systemd socket documentation: https://www.freedesktop.org/software/systemd/man/systemd.socket.html A socket automagically starts it's service with the same name, and it appears to do so even on CentOS 7. Just to make sure nothing changed since the last time I tested this, I blew the dust off my CentOS 7 vm. This is what I did: > sudo yum install fcgiwrap > systemctl enable fcgiwrap > systemctl start fcgiwrap Observed the socket was started: > $ systemctl status fcgiwrap > ● fcgiwrap - fcgiwrap Socket > Loaded: loaded (/usr/lib/systemd/system/fcgiwrap@.socket; enabled; vendor preset: disabled) > Active: active (running) since Mon 2019-08-12 09:50:15 CDT; 50min ago > Listen: /run/fcgiwrap/fcgiwrap-nginx.sock (Stream) > Aug 12 09:50:15 vcentos systemd[1]: Starting fcgiwrap Socket. > Aug 12 09:50:15 vcentos systemd[1]: Listening on fcgiwrap Socket. Observed the service had NOT started yet: > $ systemctl status fcgiwrap > ● fcgiwrap - Simple CGI Server > Loaded: loaded (/usr/lib/systemd/system/fcgiwrap@.service; bad; vendor preset: disabled) > Active: inactive (dead) I then tested my application with nginx, zoneminder, which streamed video from the web console as expected. Observed the service had started automatically: > $ systemctl status fcgiwrap > ● fcgiwrap - Simple CGI Server > Loaded: loaded (/usr/lib/systemd/system/fcgiwrap@.service; bad; vendor preset: disabled) > Active: active (running) since Mon 2019-08-12 10:18:38 CDT; 22min ago > Main PID: 14214 (fcgiwrap) > CGroup: /system.slice/system-fcgiwrap.slice/fcgiwrap > └─14214 /usr/sbin/fcgiwrap -f -c 1 > Aug 12 10:18:38 vcentos systemd[1]: Started Simple CGI Server. I see the SETUP file included with the package incorrectly states to enable the service, rather than the socket. I can update that.
Thanks. I removed my edited unit files and issued your commands and the system is working as expected. So it's just a documentation bug and my inexperience with systemd's socket-initiated services.
FEDORA-EPEL-2019-f2e04e2289 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-f2e04e2289
fcgiwrap-1.1.0-12.20181108git99c942c.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-f2e04e2289
The new text in the SETUP file looks good. I'm blessing this as a fix. (Did anything else change? I pulled the SRPM to inspect the documentation.)
No, nothing else needed changing. Now I am in a holding pattern until the fcgi package maintainer builds fcgi package for el8.
fcgiwrap-1.1.0-12.20181108git99c942c.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.