Systemd service times out for syslog-ng 3.16.1
I'm trying to switch from an init.d script to a system service and having problems getting the service to run. The syslog-ng service gets timed out and never starts up. My service looks like this: [Unit] Description="Syslog-ng an enhanced syslog" Documentation=man:syslog-ng(8) After=network.target ConditionFileNotEmpty=/opt/syslog-ng/etc/syslog-ng.conf [Service] Type=notify ExecStart=/opt/syslog-ng/sbin/syslog-ng --no-caps -p /var/run/syslogd.pid -rdvt ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/amd64/server:$LD_LIBRARY_PATH [Install] WantedBy=multi-user.target My config looks like this: ############################################################################# # Default syslog-ng.conf.partial file which collects all local logs into a # single file called /var/log/messages. # @version: 3.16 @module "mod-java" @include "scl.conf" @include "conf.d/gc-parsers.conf" source s_internal {internal();}; source s_rtl_stream { unix-stream("/var/gamecircus/log/rtl-stream.sock" flags(no-parse) log_msg_size(1000000)); }; # Backup for when syslog-ng crashes and doesn't restart queues the messages source s_rtl_backup { file("/var/gamecircus/log/rtl-backup.log" flags(no-parse) log_msg_size(1000000)); }; destination d_kafka_unstructured { kafka ( client-lib-dir("/opt/syslog-ng/lib/syslog-ng/java-modules/:/opt/kafka/libs/") kafka-bootstrap-servers(<redacted>) topic("syslog-ng-`DeployedEnvironment`") ); }; destination d_kafka_structured { kafka ( client-lib-dir("/opt/syslog-ng/lib/syslog-ng/java-modules/:/opt/kafka/libs/") kafka-bootstrap-servers(<redacted>) topic("${topic}.${environment}") template("$(format-json --scope nv_pairs --exclude MESSAGE)\n") ); }; destination d_syslog_ng { file("/var/log/syslog-ng"); }; parser p_json { json-parser(); }; log { source(s_internal); destination(d_syslog_ng); }; log { source(s_rtl_stream); parser(p_json); destination(d_kafka_structured); }; log { source(s_rtl_backup); parser(p_json); destination(d_kafka_structured); }; # Build script will add stuff below for the specific build. ############################################################################### The logging that I turned on in the service above isbn't helping. Here's the last little bit May 16 15:10:13 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:10:13.217091] Add path to classpath: /opt/kafka/libs/kafka-streams-0.11.0.0.jar; May 16 15:10:13 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:10:13.217248] Add path to classpath: /opt/kafka/libs/rocksdbjni-5.0.1.jar; May 16 15:10:13 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:10:13.217309] Add path to classpath: /opt/kafka/libs/kafka-streams-examples-0.11.0.0.jar; May 16 15:10:13 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:10:13.361062] Add path to classpath: /opt/syslog-ng/lib/syslog-ng/java-modules/syslog-ng-core.jar; May 16 15:10:13 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:10:13.365718] Running application hooks; hook='1' May 16 15:10:13 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:10:13.365930] Running application hooks; hook='3' May 16 15:10:13 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:10:13.366137] syslog-ng starting up; version='3.16.1' May 16 15:10:13 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:10:13.366480] Worker thread started; driver='d_kafka_structured#0' May 16 15:11:43 ip-172-30-6-13.ec2.internal systemd[1]: syslog-ng.service start operation timed out. Terminating. May 16 15:11:43 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:11:43.273058] Running application hooks; hook='4' May 16 15:11:43 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:11:43.273074] syslog-ng shutting down; version='3.16.1' May 16 15:11:43 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:11:43.376882] Worker thread finished; driver='d_kafka_structured#0' May 16 15:11:43 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:11:43.377030] Closing log transport fd; fd='92' May 16 15:11:43 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:11:43.377186] Java machine free; May 16 15:11:43 ip-172-30-6-13.ec2.internal syslog-ng[23866]: [2019-05-16T15:11:43.378858] Running application hooks; hook='5' May 16 15:11:43 ip-172-30-6-13.ec2.internal systemd[1]: Failed to start "Syslog-ng an enhanced syslog". May 16 15:11:43 ip-172-30-6-13.ec2.internal systemd[1]: Unit syslog-ng.service entered failed state. May 16 15:11:43 ip-172-30-6-13.ec2.internal systemd[1]: syslog-ng.service failed. Any suggestions on what me causing it to timeout? I'm new to Ssytemd but if I understand the notify type it would suggest that syslog-ng isn't notifying systemd that it's started. I'm not sure what would be holding it up. Any help is much appreciated. Ronald Fenner Network Architect Game Circus LLC. rfenner@gamecircus.com
I think you are just missing the forground flag (-F) in the ExecStart command You can see a discussion of the systemd service unit file at https://github.com/balabit/syslog-ng/issues/2667 and a proposed service file. On 5/16/19 8:27 AM, Ronald Fenner wrote:
I'm trying to switch from an init.d script to a system service and having problems getting the service to run. The syslog-ng service gets timed out and never starts up.
My service looks like this: [Unit] Description="Syslog-ng an enhanced syslog" Documentation=man:syslog-ng(8) After=network.target ConditionFileNotEmpty=/opt/syslog-ng/etc/syslog-ng.conf
[Service] Type=notify ExecStart=/opt/syslog-ng/sbin/syslog-ng --no-caps -p /var/run/syslogd.pid -rdvt ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/amd64/server:$LD_LIBRARY_PATH
[Install] WantedBy=multi-user.target
Thanks I'll look through that and see what changes I may need to make. I may have found the problem but I'm still waiting on a build to finish is that my java command was broken when I check to see if I could see some of the Kafka streams to confirm it could access the cluster. I had based mine on the service file listed in GitHub for rhel package and on one that and one I worked up for consul. Ronald Fenner Network Architect Game Circus LLC. rfenner@gamecircus.com
On May 16, 2019, at 11:30 AM, Evan Rempel <erempel@uvic.ca> wrote:
I think you are just missing the forground flag (-F) in the ExecStart command
You can see a discussion of the systemd service unit file at
https://github.com/balabit/syslog-ng/issues/2667 <https://github.com/balabit/syslog-ng/issues/2667>
and a proposed service file.
On 5/16/19 8:27 AM, Ronald Fenner wrote:
I'm trying to switch from an init.d script to a system service and having problems getting the service to run. The syslog-ng service gets timed out and never starts up.
My service looks like this: [Unit] Description="Syslog-ng an enhanced syslog" Documentation=man:syslog-ng(8) After=network.target ConditionFileNotEmpty=/opt/syslog-ng/etc/syslog-ng.conf
[Service] Type=notify ExecStart=/opt/syslog-ng/sbin/syslog-ng --no-caps -p /var/run/syslogd.pid -rdvt ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/amd64/server:$LD_LIBRARY_PATH
[Install] WantedBy=multi-user.target
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng <https://lists.balabit.hu/mailman/listinfo/syslog-ng> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng <http://www.balabit.com/support/documentation/?product=syslog-ng> FAQ: http://www.balabit.com/wiki/syslog-ng-faq <http://www.balabit.com/wiki/syslog-ng-faq>
Here's the config I came up with that works. The biggest change is that type should be forking. Notify requires the service to signal back to systemd that the process has finished starting up which syslog-ng doesn't do and thus ends up timing out. Tje -F flag actually blocked the start command when I ran systemctl start syslog-ng. Since syslog-ng apparently forks over to the supervising process the correct type is forking as the service's exec start is expected to exit immediately after execution with the child process running the service. Looking at the status for the service show both the supervising and actual process. ● syslog-ng.service - System Logger Daemon Loaded: loaded (/etc/systemd/system/syslog-ng.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-05-16 19:26:08 UTC; 14s ago Docs: man:syslog-ng(8) Process: 12591 ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTIONS --cfgfile $SYSLOGNG_CONF_FILE --control $SYSLOGNG_CONTROL_FILE --persist-file $SYSLOGNG_PERSIST_FILE --pidfile $SYSLOGNG_PID_FILE (code=exited, status=0/SUCCESS) Main PID: 12592 (syslog-ng) CGroup: /system.slice/syslog-ng.service ├─12592 supervising syslog-ng └─12593 /opt/syslog-ng/sbin/syslog-ng --no-caps --cfgfile /opt/syslog-ng/etc/syslog-ng.conf --control /opt/syslog-ng/var//syslog-ng.ctl --persist-file /opt/syslog-ng/var//syslog-ng.persist --pidfile /var/run/... May 16 19:26:08 ip-172-30-6-133.ec2.internal systemd[1]: Starting System Logger Daemon... May 16 19:26:08 ip-172-30-6-133.ec2.internal systemd[1]: Started System Logger Daemon. syslog-ng.service [Unit] Description=System Logger Daemon Documentation=man:syslog-ng(8) Wants=network.target network-online.target After=network.target network-online.target [Service] Type=forking Environment=SYSLOGNG_PID_FILE="/var/run/syslog-ng.pid" Environment=SYSLOGNG_CONF_FILE="/opt/syslog-ng/etc/syslog-ng.conf" Environment=SYSLOGNG_PERSIST_FILE="/opt/syslog-ng/var//syslog-ng.persist" Environment=SYSLOGNG_CONTROL_FILE="/opt/syslog-ng/var//syslog-ng.ctl" Environment=SYSLOGNG_OPTIONS="--no-caps" ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTIONS --cfgfile $SYSLOGNG_CONF_FILE --control $SYSLOGNG_CONTROL_FILE --persist-file $SYSLOGNG_PERSIST_FILE --pidfile $SYSLOGNG_PID_FILE ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/jre-1.8.0/lib/amd64/server:$LD_LIBRARY_PATH [Install] WantedBy=multi-user.target Hope this helps anyone else in the future Ronald Fenner Network Architect Game Circus LLC. rfenner@gamecircus.com
On May 16, 2019, at 1:07 PM, Ronald Fenner <rfenner@gamecircus.com> wrote:
Thanks I'll look through that and see what changes I may need to make.
I may have found the problem but I'm still waiting on a build to finish is that my java command was broken when I check to see if I could see some of the Kafka streams to confirm it could access the cluster.
I had based mine on the service file listed in GitHub for rhel package and on one that and one I worked up for consul.
Ronald Fenner Network Architect Game Circus LLC.
rfenner@gamecircus.com
On May 16, 2019, at 11:30 AM, Evan Rempel <erempel@uvic.ca> wrote:
I think you are just missing the forground flag (-F) in the ExecStart command
You can see a discussion of the systemd service unit file at
https://github.com/balabit/syslog-ng/issues/2667
and a proposed service file.
On 5/16/19 8:27 AM, Ronald Fenner wrote:
I'm trying to switch from an init.d script to a system service and having problems getting the service to run. The syslog-ng service gets timed out and never starts up.
My service looks like this: [Unit] Description="Syslog-ng an enhanced syslog" Documentation=man:syslog-ng(8) After=network.target ConditionFileNotEmpty=/opt/syslog-ng/etc/syslog-ng.conf
[Service] Type=notify ExecStart=/opt/syslog-ng/sbin/syslog-ng --no-caps -p /var/run/syslogd.pid -rdvt ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/amd64/server:$LD_LIBRARY_PATH
[Install] WantedBy=multi-user.target
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
That seems quite odd to me. We have been running under Redhat 7 for quite some time (hundreds of systems) with a Type=notify and the -F flag. ● syslog-ng.service - System Logger Daemon Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2019-05-13 14:43:24 PDT; 2 days ago Docs: man:syslog-ng(8) Main PID: 48953 (syslog-ng) CGroup: /system.slice/syslog-ng.service └─48953 /usr/sbin/syslog-ng -F -p /var/run/syslogd.pid This uses the service file that is part of the copr RPMs from the syslog-ng maintainers $ rpm -ql syslog-ng | grep service /usr/lib/systemd/system/syslog-ng.service [Unit] Description=System Logger Daemon Documentation=man:syslog-ng(8) Wants=network.target network-online.target After=network.target network-online.target [Service] Type=notify ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS -p /var/run/syslogd.pid ExecReload=/bin/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal StandardError=journal Restart=on-failure [Install] WantedBy=multi-user.target Oh well. I'm glad you got it running and are happy. Evan. On 5/16/19 12:46 PM, Ronald Fenner wrote:
Here's the config I came up with that works. The biggest change is that type should be forking. Notify requires the service to signal back to systemd that the process has finished starting up which syslog-ng doesn't do and thus ends up timing out. Tje -F flag actually blocked the start command when I ran systemctl start syslog-ng.
Since syslog-ng apparently forks over to the supervising process the correct type is forking as the service's exec start is expected to exit immediately after execution with the child process running the service.
Looking at the status for the service show both the supervising and actual process.
● syslog-ng.service - System Logger Daemon Loaded: loaded (/etc/systemd/system/syslog-ng.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-05-16 19:26:08 UTC; 14s ago Docs: man:syslog-ng(8) Process: 12591 ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTIONS --cfgfile $SYSLOGNG_CONF_FILE --control $SYSLOGNG_CONTROL_FILE --persist-file $SYSLOGNG_PERSIST_FILE --pidfile $SYSLOGNG_PID_FILE (code=exited, status=0/SUCCESS) Main PID: 12592 (syslog-ng) CGroup: /system.slice/syslog-ng.service ├─12592 supervising syslog-ng └─12593 /opt/syslog-ng/sbin/syslog-ng --no-caps --cfgfile /opt/syslog-ng/etc/syslog-ng.conf --control /opt/syslog-ng/var//syslog-ng.ctl --persist-file /opt/syslog-ng/var//syslog-ng.persist --pidfile /var/run/...
May 16 19:26:08 ip-172-30-6-133.ec2.internal systemd[1]: Starting System Logger Daemon... May 16 19:26:08 ip-172-30-6-133.ec2.internal systemd[1]: Started System Logger Daemon.
syslog-ng.service [Unit] Description=System Logger Daemon Documentation=man:syslog-ng(8) Wants=network.target network-online.target After=network.target network-online.target
[Service] Type=forking Environment=SYSLOGNG_PID_FILE="/var/run/syslog-ng.pid" Environment=SYSLOGNG_CONF_FILE="/opt/syslog-ng/etc/syslog-ng.conf" Environment=SYSLOGNG_PERSIST_FILE="/opt/syslog-ng/var//syslog-ng.persist" Environment=SYSLOGNG_CONTROL_FILE="/opt/syslog-ng/var//syslog-ng.ctl" Environment=SYSLOGNG_OPTIONS="--no-caps" ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTIONS --cfgfile $SYSLOGNG_CONF_FILE --control $SYSLOGNG_CONTROL_FILE --persist-file $SYSLOGNG_PERSIST_FILE --pidfile $SYSLOGNG_PID_FILE ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/jre-1.8.0/lib/amd64/server:$LD_LIBRARY_PATH
[Install] WantedBy=multi-user.target
Hope this helps anyone else in the future Ronald Fenner Network Architect Game Circus LLC.
rfenner@gamecircus.com <mailto:rfenner@gamecircus.com>
On May 16, 2019, at 1:07 PM, Ronald Fenner <rfenner@gamecircus.com <mailto:rfenner@gamecircus.com>> wrote:
Thanks I'll look through that and see what changes I may need to make.
I may have found the problem but I'm still waiting on a build to finish is that my java command was broken when I check to see if I could see some of the Kafka streams to confirm it could access the cluster.
I had based mine on the service file listed in GitHub for rhel package and on one that and one I worked up for consul.
Ronald Fenner Network Architect Game Circus LLC.
rfenner@gamecircus.com <mailto:rfenner@gamecircus.com>
On May 16, 2019, at 11:30 AM, Evan Rempel <erempel@uvic.ca> wrote:
I think you are just missing the forground flag (-F) in the ExecStart command
You can see a discussion of the systemd service unit file at
https://github.com/balabit/syslog-ng/issues/2667
and a proposed service file.
On 5/16/19 8:27 AM, Ronald Fenner wrote:
I'm trying to switch from an init.d script to a system service and having problems getting the service to run. The syslog-ng service gets timed out and never starts up.
My service looks like this: [Unit] Description="Syslog-ng an enhanced syslog" Documentation=man:syslog-ng(8) After=network.target ConditionFileNotEmpty=/opt/syslog-ng/etc/syslog-ng.conf
[Service] Type=notify ExecStart=/opt/syslog-ng/sbin/syslog-ng --no-caps -p /var/run/syslogd.pid -rdvt ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/amd64/server:$LD_LIBRARY_PATH
[Install] WantedBy=multi-user.target
I should clarify I'm on amazon linux 2 with systemd 219-57 Ronald Fenner Network Architect Game Circus LLC. rfenner@gamecircus.com
On May 16, 2019, at 2:57 PM, Evan Rempel <erempel@uvic.ca> wrote:
That seems quite odd to me. We have been running under Redhat 7 for quite some time (hundreds of systems) with a Type=notify and the -F flag.
● syslog-ng.service - System Logger Daemon Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2019-05-13 14:43:24 PDT; 2 days ago Docs: man:syslog-ng(8) <man:syslog-ng(8)> Main PID: 48953 (syslog-ng) CGroup: /system.slice/syslog-ng.service └─48953 /usr/sbin/syslog-ng -F -p /var/run/syslogd.pid
This uses the service file that is part of the copr RPMs from the syslog-ng maintainers
$ rpm -ql syslog-ng | grep service /usr/lib/systemd/system/syslog-ng.service
[Unit] Description=System Logger Daemon Documentation=man:syslog-ng(8) <man:syslog-ng(8)> Wants=network.target network-online.target After=network.target network-online.target
[Service] Type=notify ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS -p /var/run/syslogd.pid ExecReload=/bin/kill -HUP $MAINPID EnvironmentFile=-/etc/default/syslog-ng EnvironmentFile=-/etc/sysconfig/syslog-ng StandardOutput=journal StandardError=journal Restart=on-failure
[Install] WantedBy=multi-user.target
Oh well. I'm glad you got it running and are happy.
Evan.
On 5/16/19 12:46 PM, Ronald Fenner wrote:
Here's the config I came up with that works. The biggest change is that type should be forking. Notify requires the service to signal back to systemd that the process has finished starting up which syslog-ng doesn't do and thus ends up timing out. Tje -F flag actually blocked the start command when I ran systemctl start syslog-ng.
Since syslog-ng apparently forks over to the supervising process the correct type is forking as the service's exec start is expected to exit immediately after execution with the child process running the service.
Looking at the status for the service show both the supervising and actual process.
● syslog-ng.service - System Logger Daemon Loaded: loaded (/etc/systemd/system/syslog-ng.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-05-16 19:26:08 UTC; 14s ago Docs: man:syslog-ng(8) <man:syslog-ng(8)> Process: 12591 ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTIONS --cfgfile $SYSLOGNG_CONF_FILE --control $SYSLOGNG_CONTROL_FILE --persist-file $SYSLOGNG_PERSIST_FILE --pidfile $SYSLOGNG_PID_FILE (code=exited, status=0/SUCCESS) Main PID: 12592 (syslog-ng) CGroup: /system.slice/syslog-ng.service ├─12592 supervising syslog-ng └─12593 /opt/syslog-ng/sbin/syslog-ng --no-caps --cfgfile /opt/syslog-ng/etc/syslog-ng.conf --control /opt/syslog-ng/var//syslog-ng.ctl --persist-file /opt/syslog-ng/var//syslog-ng.persist --pidfile /var/run/...
May 16 19:26:08 ip-172-30-6-133.ec2.internal systemd[1]: Starting System Logger Daemon... May 16 19:26:08 ip-172-30-6-133.ec2.internal systemd[1]: Started System Logger Daemon.
syslog-ng.service [Unit] Description=System Logger Daemon Documentation=man:syslog-ng(8) <man:syslog-ng(8)> Wants=network.target network-online.target After=network.target network-online.target
[Service] Type=forking Environment=SYSLOGNG_PID_FILE="/var/run/syslog-ng.pid" Environment=SYSLOGNG_CONF_FILE="/opt/syslog-ng/etc/syslog-ng.conf" Environment=SYSLOGNG_PERSIST_FILE="/opt/syslog-ng/var//syslog-ng.persist" Environment=SYSLOGNG_CONTROL_FILE="/opt/syslog-ng/var//syslog-ng.ctl" Environment=SYSLOGNG_OPTIONS="--no-caps" ExecStart=/opt/syslog-ng/sbin/syslog-ng $SYSLOGNG_OPTIONS --cfgfile $SYSLOGNG_CONF_FILE --control $SYSLOGNG_CONTROL_FILE --persist-file $SYSLOGNG_PERSIST_FILE --pidfile $SYSLOGNG_PID_FILE ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/jre-1.8.0/lib/amd64/server:$LD_LIBRARY_PATH
[Install] WantedBy=multi-user.target
Hope this helps anyone else in the future Ronald Fenner Network Architect Game Circus LLC.
rfenner@gamecircus.com <mailto:rfenner@gamecircus.com>
On May 16, 2019, at 1:07 PM, Ronald Fenner <rfenner@gamecircus.com <mailto:rfenner@gamecircus.com>> wrote:
Thanks I'll look through that and see what changes I may need to make.
I may have found the problem but I'm still waiting on a build to finish is that my java command was broken when I check to see if I could see some of the Kafka streams to confirm it could access the cluster.
I had based mine on the service file listed in GitHub for rhel package and on one that and one I worked up for consul.
Ronald Fenner Network Architect Game Circus LLC.
rfenner@gamecircus.com <mailto:rfenner@gamecircus.com>
On May 16, 2019, at 11:30 AM, Evan Rempel <erempel@uvic.ca> <mailto:erempel@uvic.ca> wrote:
I think you are just missing the forground flag (-F) in the ExecStart command
You can see a discussion of the systemd service unit file at
https://github.com/balabit/syslog-ng/issues/2667 <https://github.com/balabit/syslog-ng/issues/2667>
and a proposed service file.
On 5/16/19 8:27 AM, Ronald Fenner wrote:
I'm trying to switch from an init.d script to a system service and having problems getting the service to run. The syslog-ng service gets timed out and never starts up.
My service looks like this: [Unit] Description="Syslog-ng an enhanced syslog" Documentation=man:syslog-ng(8) <man:syslog-ng(8)> After=network.target ConditionFileNotEmpty=/opt/syslog-ng/etc/syslog-ng.conf
[Service] Type=notify ExecStart=/opt/syslog-ng/sbin/syslog-ng --no-caps -p /var/run/syslogd.pid -rdvt ExecReload=/bin/kill -HUP $MAINPID StandardOutput=journal StandardError=journal Restart=on-failure Environment=LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/amd64/server:$LD_LIBRARY_PATH
[Install] WantedBy=multi-user.target
______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.balabit.com/wiki/syslog-ng-faq
participants (2)
-
Evan Rempel
-
Ronald Fenner