<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I should clarify I'm on amazon linux 2 with systemd 219-57<div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-position: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">Ronald Fenner</div><div class="">Network Architect</div><div class="">Game Circus LLC.</div></div><div class=""><br class=""></div><div class=""><a href="mailto:rfenner@gamecircus.com" class="">rfenner@gamecircus.com</a></div></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On May 16, 2019, at 2:57 PM, Evan Rempel <<a href="mailto:erempel@uvic.ca" class="">erempel@uvic.ca</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class="">
    <div class="moz-cite-prefix">That seems quite odd to me. We have
      been running under Redhat 7 for quite some time (hundreds of
      systems) with a Type=notify</div>
    <div class="moz-cite-prefix">and the -F flag.</div>
    <div class="moz-cite-prefix"><br class="">
    </div>
    <div class="moz-cite-prefix">● syslog-ng.service - System Logger
      Daemon<br class="">
         Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service;
      enabled; vendor preset: enabled)<br class="">
         Active: active (running) since Mon 2019-05-13 14:43:24 PDT; 2
      days ago<br class="">
           Docs: <a class="moz-txt-link-freetext" href="man:syslog-ng(8)">man:syslog-ng(8)</a><br class="">
       Main PID: 48953 (syslog-ng)<br class="">
         CGroup: /system.slice/syslog-ng.service<br class="">
                 └─48953 /usr/sbin/syslog-ng -F -p /var/run/syslogd.pid<br class="">
    </div>
    <div class="moz-cite-prefix"><br class="">
    </div>
    <div class="moz-cite-prefix">This uses the service file that is part
      of the copr RPMs from the syslog-ng maintainers</div>
    <div class="moz-cite-prefix"><br class="">
    </div>
    <div class="moz-cite-prefix">$ rpm -ql syslog-ng | grep service<br class="">
      /usr/lib/systemd/system/syslog-ng.service<br class="">
      <br class="">
    </div>
    <div class="moz-cite-prefix">[Unit]<br class="">
      Description=System Logger Daemon<br class="">
      Documentation=<a class="moz-txt-link-freetext" href="man:syslog-ng(8)">man:syslog-ng(8)</a><br class="">
      <span class="">Wants=network.target network-online.target<br class="">
        After=network.target network-online.target</span></div>
    <div class="moz-cite-prefix"><span class=""></span><br class="">
      [Service]<br class="">
      Type=notify<br class="">
      ExecStart=/usr/sbin/syslog-ng -F $SYSLOGNG_OPTS -p
      /var/run/syslogd.pid<br class="">
      ExecReload=/bin/kill -HUP $MAINPID<br class="">
      EnvironmentFile=-/etc/default/syslog-ng<br class="">
      EnvironmentFile=-/etc/sysconfig/syslog-ng<br class="">
      StandardOutput=journal<br class="">
      StandardError=journal<br class="">
      Restart=on-failure<br class="">
      <br class="">
      [Install]<br class="">
      WantedBy=multi-user.target<br class="">
    </div>
    <div class="moz-cite-prefix"><br class="">
    </div>
    <div class="moz-cite-prefix"><br class="">
    </div>
    <div class="moz-cite-prefix"><br class="">
    </div>
    <div class="moz-cite-prefix">Oh well. I'm glad you got it running
      and are happy.<br class="">
    </div>
    <div class="moz-cite-prefix"><br class="">
    </div>
    <div class="moz-cite-prefix">Evan.<br class="">
    </div>
    <div class="moz-cite-prefix"><br class="">
    </div>
    <div class="moz-cite-prefix">On 5/16/19 12:46 PM, Ronald Fenner
      wrote:<br class="">
    </div>
    <blockquote type="cite" cite="mid:2A0462BB-DC19-4029-AB10-922289BCC60E@gamecircus.com" class="">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
      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.
      <div class="">Tje -F flag actually blocked the start command when
        I ran systemctl start syslog-ng.</div>
      <div class=""><br class="">
      </div>
      <div class="">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.<br class="">
        <div class=""><br class="">
        </div>
        <div class="">Looking at the status for the service show both
          the supervising and actual process.</div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
        <div class="">
          <div class="">● syslog-ng.service - System Logger Daemon</div>
          <div class="">   Loaded: loaded
            (/etc/systemd/system/syslog-ng.service; enabled; vendor
            preset: enabled)</div>
          <div class="">   Active: active (running) since Thu 2019-05-16
            19:26:08 UTC; 14s ago</div>
          <div class="">     Docs: <a class="moz-txt-link-freetext" href="man:syslog-ng(8)">man:syslog-ng(8)</a></div>
          <div class="">  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)</div>
          <div class=""> Main PID: 12592 (syslog-ng)</div>
          <div class="">   CGroup: /system.slice/syslog-ng.service</div>
          <div class="">           ├─12592 supervising syslog-ng</div>
          <div class="">           └─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/...</div>
          <div class=""><br class="">
          </div>
          <div class="">May 16 19:26:08 ip-172-30-6-133.ec2.internal
            systemd[1]: Starting System Logger Daemon...</div>
          <div class="">May 16 19:26:08 ip-172-30-6-133.ec2.internal
            systemd[1]: Started System Logger Daemon.</div>
        </div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
        <div class="">syslog-ng.service</div>
        <span class="">[Unit]<br class="">
          Description=System Logger Daemon<br class="">
          Documentation=<a class="moz-txt-link-freetext" href="man:syslog-ng(8)">man:syslog-ng(8)</a><br class="">
          Wants=network.target network-online.target<br class="">
          After=network.target network-online.target<br class="">
          <br class="">
          [Service]<br class="">
          Type=forking<br class="">
          Environment=SYSLOGNG_PID_FILE="/var/run/syslog-ng.pid"<br class="">
Environment=SYSLOGNG_CONF_FILE="/opt/syslog-ng/etc/syslog-ng.conf"<br class="">
Environment=SYSLOGNG_PERSIST_FILE="/opt/syslog-ng/var//syslog-ng.persist"<br class="">
Environment=SYSLOGNG_CONTROL_FILE="/opt/syslog-ng/var//syslog-ng.ctl"<br class="">
          Environment=SYSLOGNG_OPTIONS="--no-caps"<br class="">
          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<br class="">
          ExecReload=/bin/kill -HUP $MAINPID<br class="">
          StandardOutput=journal<br class="">
          StandardError=journal<br class="">
          Restart=on-failure<br class="">
Environment=LD_LIBRARY_PATH=/usr/lib/jvm/jre-1.8.0/lib/amd64/server:$LD_LIBRARY_PATH<br class="">
          <br class="">
          [Install]<br class="">
          WantedBy=multi-user.target<br class="">
          <br class="">
          <br class="">
          <br class="">
          Hope this helps anyone else in the future<br class="">
          <div class="">Ronald Fenner<br class="">
            Network Architect<br class="">
            Game Circus LLC.<br class="">
            <br class="">
            <a href="mailto:rfenner@gamecircus.com" class="" moz-do-not-send="true">rfenner@gamecircus.com</a><br class="">
          </div>
          <br class="">
          <blockquote type="cite" class="">On May 16, 2019, at 1:07 PM,
            Ronald Fenner <<a href="mailto:rfenner@gamecircus.com" class="" moz-do-not-send="true">rfenner@gamecircus.com</a>>
            wrote:<br class="">
            <br class="">
            Thanks I'll look through that and see what changes I may
            need to make.<br class="">
            <br class="">
            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.<br class="">
            <br class="">
            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.<br class="">
            <br class="">
            Ronald Fenner<br class="">
            Network Architect<br class="">
            Game Circus LLC.<br class="">
            <br class="">
            <a href="mailto:rfenner@gamecircus.com" class="" moz-do-not-send="true">rfenner@gamecircus.com</a><br class="">
            <br class="">
            <blockquote type="cite" class="">On May 16, 2019, at 11:30
              AM, Evan Rempel <a class="moz-txt-link-rfc2396E" href="mailto:erempel@uvic.ca"><erempel@uvic.ca></a> wrote:<br class="">
              <br class="">
              I think you are just missing the forground flag (-F) in
              the ExecStart command<br class="">
              <br class="">
              You can see a discussion of the systemd service unit file
              at<br class="">
              <br class="">
              <a class="moz-txt-link-freetext" href="https://github.com/balabit/syslog-ng/issues/2667">https://github.com/balabit/syslog-ng/issues/2667</a><br class="">
              <br class="">
              and a proposed service file.<br class="">
              <br class="">
              On 5/16/19 8:27 AM, Ronald Fenner wrote:<br class="">
              <blockquote type="cite" style="font-family: Helvetica;
                font-size: 13px; font-style: normal; font-variant-caps:
                normal; font-weight: normal; letter-spacing: normal;
                orphans: auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px; text-decoration: none;" class="">I'm trying to switch from an init.d script to a
                system service and having problems getting the service
                to run.<br class="">
                The syslog-ng service gets timed out and never starts
                up.<br class="">
                <br class="">
                My service looks like this:<br class="">
                [Unit]<br class="">
                Description="Syslog-ng an enhanced syslog"<br class="">
                Documentation=<a class="moz-txt-link-freetext" href="man:syslog-ng(8)">man:syslog-ng(8)</a><br class="">
                After=network.target<br class="">
                ConditionFileNotEmpty=/opt/syslog-ng/etc/syslog-ng.conf<br class="">
                <br class="">
                [Service]<br class="">
                Type=notify<br class="">
                ExecStart=/opt/syslog-ng/sbin/syslog-ng --no-caps -p
                /var/run/syslogd.pid -rdvt<br class="">
                ExecReload=/bin/kill -HUP $MAINPID<br class="">
                StandardOutput=journal<br class="">
                StandardError=journal<br class="">
                Restart=on-failure<br class="">
Environment=LD_LIBRARY_PATH=/usr/lib/jvm/java/jre/lib/amd64/server:$LD_LIBRARY_PATH<br class="">
                <br class="">
                [Install]<br class="">
                WantedBy=multi-user.target</blockquote>
            </blockquote>
          </blockquote>
        </span></div>
    </blockquote>
    <br class="">
  </div>

______________________________________________________________________________<br class="">Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" class="">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br class="">Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" class="">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br class="">FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" class="">http://www.balabit.com/wiki/syslog-ng-faq</a><br class=""><br class=""></div></blockquote></div><br class=""></div></body></html>