On 11/11/16 13:36, Gordon Messmer wrote:> On 11/09/2016 02:07 AM, Rob Kampen wrote: >> so I have /etc/tmpfiles.d/clamd.amavisd.conf with content >> d /var/run/clamd.amavisd 0755 amavis amavis - >> >> the process owner name and group name are amavis >> this is not quite what you specified - which should it be? > > If "User" is set to amavis in the clamd configuration, that looks fine. > >> My real head scratch problem is that running clamd from a cli works >> perfectly. >> Trying to get systemd (via systemctl start clamd at amavisd.service) >> brings it up but after 1 second removes the pid file and shuts down. >> set up clamd via the service file to use --debug and get nothing helpful >> Trying to debug this systemd stuff seems impossible > > systemd starts processes in the correct SELinux context, while running > it from the shell does not. So my first guess would be that it's an > SELinux issue. Use "setenforce" to put the system in permissive mode > to see if that's the case. If so, "grep AVC /var/log/audit/audit.log" > for more info.Another random thought When I invoke from the CLI - there is a -nofork=yes as a part of the invocation. When systemd tries to do the invocation via the ExecStart line - the original clamd at .service file had this --nofork=yes also, the problem was that this just caused an abend of the start up with the message: > /usr/sbin/clamd: unrecognized option `--nofork=yes' > ERROR: Unknown option passed > ERROR: Can't parse command line options and a look at the clamd man shows no such parameter - thus I removed it. I wonder if this is the issue? Not sure what I can or how I can test. Will keep playing> _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos
On 11/11/2016 02:39 AM, Rob Kampen wrote:> When I invoke from the CLI - there is a -nofork=yes as a part of the > invocation. > When systemd tries to do the invocation via the ExecStart line - the > original clamd at .service file had this --nofork=yes also, the problem > was that this just caused an abend of the start up with the message:Not on my system, it doesn't: $ grep Exec /usr/lib/systemd/system/clamd at .service ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes $ rpm -qf /usr/lib/systemd/system/clamd at .service clamav-server-systemd-0.99.2-1.el7.noarch> > /usr/sbin/clamd: unrecognized option `--nofork=yes' > > ERROR: Unknown option passed > > ERROR: Can't parse command line options > and a look at the clamd man shows no such parameter - thus I removed it. > I wonder if this is the issue? Not sure what I can or how I can test.Yeah, it might be worth removing the package and reinstalling it. You shouldn't need to modify the provided systemd service file.
CentOS 7 and my experience with clamav 99.2 from epel repository: instead of --nofork you need --foreground=yes nofork parameter is definitly outdated. See man clamd.conf and https://www.centos.org/forums/viewtopic.php?t=58763 with the necessary changes in /etc/systemd/system/multi-user.target.wants/clamd.service Best regards -- Viele Gr??e Helmut Drodofsky Internet XS Service GmbH He?br?hlstra?e 15 70565 Stuttgart Gesch?ftsf?hrung Dr.-Ing. Roswitha Hahn-Drodofsky HRB 21091 Stuttgart USt.ID: DE190582774 Tel. 0711 781941 0 Fax: 0711 781941 79 Mail: info at internet-xs.de www.internet-xs.de Am 12.11.2016 um 04:46 schrieb Gordon Messmer:> On 11/11/2016 02:39 AM, Rob Kampen wrote: >> When I invoke from the CLI - there is a -nofork=yes as a part of the >> invocation. >> When systemd tries to do the invocation via the ExecStart line - the >> original clamd at .service file had this --nofork=yes also, the problem >> was that this just caused an abend of the start up with the message: > > Not on my system, it doesn't: > > $ grep Exec /usr/lib/systemd/system/clamd at .service > ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes > $ rpm -qf /usr/lib/systemd/system/clamd at .service > clamav-server-systemd-0.99.2-1.el7.noarch > > >> > /usr/sbin/clamd: unrecognized option `--nofork=yes' >> > ERROR: Unknown option passed >> > ERROR: Can't parse command line options >> and a look at the clamd man shows no such parameter - thus I removed it. >> I wonder if this is the issue? Not sure what I can or how I can test. > > Yeah, it might be worth removing the package and reinstalling it. You > shouldn't need to modify the provided systemd service file. > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos
On 12/11/16 16:46, Gordon Messmer wrote:> On 11/11/2016 02:39 AM, Rob Kampen wrote: >> When I invoke from the CLI - there is a -nofork=yes as a part of the >> invocation. >> When systemd tries to do the invocation via the ExecStart line - the >> original clamd at .service file had this --nofork=yes also, the problem >> was that this just caused an abend of the start up with the message: > > Not on my system, it doesn't: > > $ grep Exec /usr/lib/systemd/system/clamd at .service > ExecStart = /usr/sbin/clamd -c /etc/clamd.d/%i.conf --foreground=yes > $ rpm -qf /usr/lib/systemd/system/clamd at .service > clamav-server-systemd-0.99.2-1.el7.noarch > > >> > /usr/sbin/clamd: unrecognized option `--nofork=yes' >> > ERROR: Unknown option passed >> > ERROR: Can't parse command line options >> and a look at the clamd man shows no such parameter - thus I removed it. >> I wonder if this is the issue? Not sure what I can or how I can test. > > Yeah, it might be worth removing the package and reinstalling it. You > shouldn't need to modify the provided systemd service file.this looks like the issue. doing the rpm -qf /usr/lib/systemd/system/clamd at .service gave no owner?? So I tried a reinstall and it informed me the package clamav-server-systemd-0.99.2-1.el7.noarch was not installed - no idea where the systemd service file came from. So I installed it and it now appears to run. thanks so much for your assistance - progress finally being made!> _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos