Problem with systemd starting watchdog

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















I am trying to enable the watchdog service (on Raspbian Jessie).



I have installed watchdog and (hopefully) configured it.
sudo systemctl start watchdog seems to start it OK



systemctl status watchdog.service shows it running:-



● watchdog.service - watchdog daemon
Loaded: loaded (/lib/systemd/system/watchdog.service; static)
Active: active (running) since Mon 2017-02-20 15:52:46 AEDT; 22s ago
Process: 1828 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options (code=exited, status=0/SUCCESS)
Process: 1824 ExecStartPre=/bin/sh -c [ -z "$watchdog_module" ] || [ "$watchdog_module" = "none" ] || /sbin/modprobe $watchdog_module (code=exited, status=0/SUCCESS)
Main PID: 1831 (watchdog)
CGroup: /system.slice/watchdog.service
└─1831 /usr/sbin/watchdog


When I try to enable it with sudo systemctl enable watchdog I get this strange output



Synchronizing state for watchdog.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d watchdog defaults
Executing /usr/sbin/update-rc.d watchdog enable
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).


Trying sudo update-rc.d watchdog enable did not seem to be successful either
systemctl list-units | grep watchdog



cat /lib/systemd/system/watchdog.service indeed has no [Install] section



[Unit]
Description=watchdog daemon
Conflicts=wd_keepalive.service
After=multi-user.target
OnFailure=wd_keepalive.service

[Service]
Type=forking
EnvironmentFile=/etc/default/watchdog
ExecStartPre=/bin/sh -c '[ -z "$watchdog_module" ] || [ "$watchdog_module" = "none" ] || /sbin/modprobe $watchdog_module
ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'

[Install]


How can I debug this, and get watchdog to run on boot




I added the following to /lib/systemd/system/watchdog.service



[Install]
WantedBy=multi-user.target


watchdog now starts. I will need to test to ensure that it works!










share|improve this question




























    0















    I am trying to enable the watchdog service (on Raspbian Jessie).



    I have installed watchdog and (hopefully) configured it.
    sudo systemctl start watchdog seems to start it OK



    systemctl status watchdog.service shows it running:-



    ● watchdog.service - watchdog daemon
    Loaded: loaded (/lib/systemd/system/watchdog.service; static)
    Active: active (running) since Mon 2017-02-20 15:52:46 AEDT; 22s ago
    Process: 1828 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options (code=exited, status=0/SUCCESS)
    Process: 1824 ExecStartPre=/bin/sh -c [ -z "$watchdog_module" ] || [ "$watchdog_module" = "none" ] || /sbin/modprobe $watchdog_module (code=exited, status=0/SUCCESS)
    Main PID: 1831 (watchdog)
    CGroup: /system.slice/watchdog.service
    └─1831 /usr/sbin/watchdog


    When I try to enable it with sudo systemctl enable watchdog I get this strange output



    Synchronizing state for watchdog.service with sysvinit using update-rc.d...
    Executing /usr/sbin/update-rc.d watchdog defaults
    Executing /usr/sbin/update-rc.d watchdog enable
    The unit files have no [Install] section. They are not meant to be enabled
    using systemctl.
    Possible reasons for having this kind of units are:
    1) A unit may be statically enabled by being symlinked from another unit's
    .wants/ or .requires/ directory.
    2) A unit's purpose may be to act as a helper for some other unit which has
    a requirement dependency on it.
    3) A unit may be started when needed via activation (socket, path, timer,
    D-Bus, udev, scripted systemctl call, ...).


    Trying sudo update-rc.d watchdog enable did not seem to be successful either
    systemctl list-units | grep watchdog



    cat /lib/systemd/system/watchdog.service indeed has no [Install] section



    [Unit]
    Description=watchdog daemon
    Conflicts=wd_keepalive.service
    After=multi-user.target
    OnFailure=wd_keepalive.service

    [Service]
    Type=forking
    EnvironmentFile=/etc/default/watchdog
    ExecStartPre=/bin/sh -c '[ -z "$watchdog_module" ] || [ "$watchdog_module" = "none" ] || /sbin/modprobe $watchdog_module
    ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
    ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'

    [Install]


    How can I debug this, and get watchdog to run on boot




    I added the following to /lib/systemd/system/watchdog.service



    [Install]
    WantedBy=multi-user.target


    watchdog now starts. I will need to test to ensure that it works!










    share|improve this question


























      0












      0








      0


      1






      I am trying to enable the watchdog service (on Raspbian Jessie).



      I have installed watchdog and (hopefully) configured it.
      sudo systemctl start watchdog seems to start it OK



      systemctl status watchdog.service shows it running:-



      ● watchdog.service - watchdog daemon
      Loaded: loaded (/lib/systemd/system/watchdog.service; static)
      Active: active (running) since Mon 2017-02-20 15:52:46 AEDT; 22s ago
      Process: 1828 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options (code=exited, status=0/SUCCESS)
      Process: 1824 ExecStartPre=/bin/sh -c [ -z "$watchdog_module" ] || [ "$watchdog_module" = "none" ] || /sbin/modprobe $watchdog_module (code=exited, status=0/SUCCESS)
      Main PID: 1831 (watchdog)
      CGroup: /system.slice/watchdog.service
      └─1831 /usr/sbin/watchdog


      When I try to enable it with sudo systemctl enable watchdog I get this strange output



      Synchronizing state for watchdog.service with sysvinit using update-rc.d...
      Executing /usr/sbin/update-rc.d watchdog defaults
      Executing /usr/sbin/update-rc.d watchdog enable
      The unit files have no [Install] section. They are not meant to be enabled
      using systemctl.
      Possible reasons for having this kind of units are:
      1) A unit may be statically enabled by being symlinked from another unit's
      .wants/ or .requires/ directory.
      2) A unit's purpose may be to act as a helper for some other unit which has
      a requirement dependency on it.
      3) A unit may be started when needed via activation (socket, path, timer,
      D-Bus, udev, scripted systemctl call, ...).


      Trying sudo update-rc.d watchdog enable did not seem to be successful either
      systemctl list-units | grep watchdog



      cat /lib/systemd/system/watchdog.service indeed has no [Install] section



      [Unit]
      Description=watchdog daemon
      Conflicts=wd_keepalive.service
      After=multi-user.target
      OnFailure=wd_keepalive.service

      [Service]
      Type=forking
      EnvironmentFile=/etc/default/watchdog
      ExecStartPre=/bin/sh -c '[ -z "$watchdog_module" ] || [ "$watchdog_module" = "none" ] || /sbin/modprobe $watchdog_module
      ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
      ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'

      [Install]


      How can I debug this, and get watchdog to run on boot




      I added the following to /lib/systemd/system/watchdog.service



      [Install]
      WantedBy=multi-user.target


      watchdog now starts. I will need to test to ensure that it works!










      share|improve this question
















      I am trying to enable the watchdog service (on Raspbian Jessie).



      I have installed watchdog and (hopefully) configured it.
      sudo systemctl start watchdog seems to start it OK



      systemctl status watchdog.service shows it running:-



      ● watchdog.service - watchdog daemon
      Loaded: loaded (/lib/systemd/system/watchdog.service; static)
      Active: active (running) since Mon 2017-02-20 15:52:46 AEDT; 22s ago
      Process: 1828 ExecStart=/bin/sh -c [ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options (code=exited, status=0/SUCCESS)
      Process: 1824 ExecStartPre=/bin/sh -c [ -z "$watchdog_module" ] || [ "$watchdog_module" = "none" ] || /sbin/modprobe $watchdog_module (code=exited, status=0/SUCCESS)
      Main PID: 1831 (watchdog)
      CGroup: /system.slice/watchdog.service
      └─1831 /usr/sbin/watchdog


      When I try to enable it with sudo systemctl enable watchdog I get this strange output



      Synchronizing state for watchdog.service with sysvinit using update-rc.d...
      Executing /usr/sbin/update-rc.d watchdog defaults
      Executing /usr/sbin/update-rc.d watchdog enable
      The unit files have no [Install] section. They are not meant to be enabled
      using systemctl.
      Possible reasons for having this kind of units are:
      1) A unit may be statically enabled by being symlinked from another unit's
      .wants/ or .requires/ directory.
      2) A unit's purpose may be to act as a helper for some other unit which has
      a requirement dependency on it.
      3) A unit may be started when needed via activation (socket, path, timer,
      D-Bus, udev, scripted systemctl call, ...).


      Trying sudo update-rc.d watchdog enable did not seem to be successful either
      systemctl list-units | grep watchdog



      cat /lib/systemd/system/watchdog.service indeed has no [Install] section



      [Unit]
      Description=watchdog daemon
      Conflicts=wd_keepalive.service
      After=multi-user.target
      OnFailure=wd_keepalive.service

      [Service]
      Type=forking
      EnvironmentFile=/etc/default/watchdog
      ExecStartPre=/bin/sh -c '[ -z "$watchdog_module" ] || [ "$watchdog_module" = "none" ] || /sbin/modprobe $watchdog_module
      ExecStart=/bin/sh -c '[ $run_watchdog != 1 ] || exec /usr/sbin/watchdog $watchdog_options'
      ExecStopPost=/bin/sh -c '[ $run_wd_keepalive != 1 ] || false'

      [Install]


      How can I debug this, and get watchdog to run on boot




      I added the following to /lib/systemd/system/watchdog.service



      [Install]
      WantedBy=multi-user.target


      watchdog now starts. I will need to test to ensure that it works!







      systemd watchdog






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 20 '17 at 7:24







      Milliways

















      asked Feb 20 '17 at 5:15









      MilliwaysMilliways

      5561823




      5561823




















          2 Answers
          2






          active

          oldest

          votes


















          3














          This is a known Debian bug. The systemd integration of the Debian watchdog package has gone through several rounds, varying quite wildly. The watchdog package that went out as Debian 8 was actually non-functional, as you have discovered. That wasn't picked up by pre-release testing.



          The bug has been fixed for version 5.15-1 of the package, alongside another fix that corrects faulty service unit syntax (also visible in your service unit). This version is not available in Debian 8 backports, although two requests have been made (and apparently ignored) for it to be.



          Further reading



          • Paul Menzel (2016-09-19). Syntax error in systemd service file. Bug #838305. Debian bug tracker.

          • Uwe Storbeck (2014-11-05). watchdog does not start at boot. Bug #768168. Debian bug tracker.

          • Andreas Steinel (2015-07-22). Not starting automatically on freshly installed Jessie. Bug #793309. Debian bug tracker.

          • Michael Meskes (2016-02-26). Accepted watchdog 5.15-1 (source amd64) into unstable. debian-devel-changes.





          share|improve this answer


















          • 1





            Could you please tell what should do I, the ordinary user of OSMC on Raspberry Pi 3, to make watchdog work and start automatically? Writing/not writing to /dev/watchdog works. Fine that you provided some links where are some informations, but I do not know what to do with them.

            – Paul
            Dec 6 '17 at 8:39



















          1














          For armbian, you can install updated package manually:



          wget http://ftp.debian.org/debian/pool/main/w/watchdog/watchdog_5.15-2_armhf.deb
          dpkg -i watchdog_5.15-2_armhf.deb
          systemctl enable watchdog





          share|improve this answer






















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f346224%2fproblem-with-systemd-starting-watchdog%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            This is a known Debian bug. The systemd integration of the Debian watchdog package has gone through several rounds, varying quite wildly. The watchdog package that went out as Debian 8 was actually non-functional, as you have discovered. That wasn't picked up by pre-release testing.



            The bug has been fixed for version 5.15-1 of the package, alongside another fix that corrects faulty service unit syntax (also visible in your service unit). This version is not available in Debian 8 backports, although two requests have been made (and apparently ignored) for it to be.



            Further reading



            • Paul Menzel (2016-09-19). Syntax error in systemd service file. Bug #838305. Debian bug tracker.

            • Uwe Storbeck (2014-11-05). watchdog does not start at boot. Bug #768168. Debian bug tracker.

            • Andreas Steinel (2015-07-22). Not starting automatically on freshly installed Jessie. Bug #793309. Debian bug tracker.

            • Michael Meskes (2016-02-26). Accepted watchdog 5.15-1 (source amd64) into unstable. debian-devel-changes.





            share|improve this answer


















            • 1





              Could you please tell what should do I, the ordinary user of OSMC on Raspberry Pi 3, to make watchdog work and start automatically? Writing/not writing to /dev/watchdog works. Fine that you provided some links where are some informations, but I do not know what to do with them.

              – Paul
              Dec 6 '17 at 8:39
















            3














            This is a known Debian bug. The systemd integration of the Debian watchdog package has gone through several rounds, varying quite wildly. The watchdog package that went out as Debian 8 was actually non-functional, as you have discovered. That wasn't picked up by pre-release testing.



            The bug has been fixed for version 5.15-1 of the package, alongside another fix that corrects faulty service unit syntax (also visible in your service unit). This version is not available in Debian 8 backports, although two requests have been made (and apparently ignored) for it to be.



            Further reading



            • Paul Menzel (2016-09-19). Syntax error in systemd service file. Bug #838305. Debian bug tracker.

            • Uwe Storbeck (2014-11-05). watchdog does not start at boot. Bug #768168. Debian bug tracker.

            • Andreas Steinel (2015-07-22). Not starting automatically on freshly installed Jessie. Bug #793309. Debian bug tracker.

            • Michael Meskes (2016-02-26). Accepted watchdog 5.15-1 (source amd64) into unstable. debian-devel-changes.





            share|improve this answer


















            • 1





              Could you please tell what should do I, the ordinary user of OSMC on Raspberry Pi 3, to make watchdog work and start automatically? Writing/not writing to /dev/watchdog works. Fine that you provided some links where are some informations, but I do not know what to do with them.

              – Paul
              Dec 6 '17 at 8:39














            3












            3








            3







            This is a known Debian bug. The systemd integration of the Debian watchdog package has gone through several rounds, varying quite wildly. The watchdog package that went out as Debian 8 was actually non-functional, as you have discovered. That wasn't picked up by pre-release testing.



            The bug has been fixed for version 5.15-1 of the package, alongside another fix that corrects faulty service unit syntax (also visible in your service unit). This version is not available in Debian 8 backports, although two requests have been made (and apparently ignored) for it to be.



            Further reading



            • Paul Menzel (2016-09-19). Syntax error in systemd service file. Bug #838305. Debian bug tracker.

            • Uwe Storbeck (2014-11-05). watchdog does not start at boot. Bug #768168. Debian bug tracker.

            • Andreas Steinel (2015-07-22). Not starting automatically on freshly installed Jessie. Bug #793309. Debian bug tracker.

            • Michael Meskes (2016-02-26). Accepted watchdog 5.15-1 (source amd64) into unstable. debian-devel-changes.





            share|improve this answer













            This is a known Debian bug. The systemd integration of the Debian watchdog package has gone through several rounds, varying quite wildly. The watchdog package that went out as Debian 8 was actually non-functional, as you have discovered. That wasn't picked up by pre-release testing.



            The bug has been fixed for version 5.15-1 of the package, alongside another fix that corrects faulty service unit syntax (also visible in your service unit). This version is not available in Debian 8 backports, although two requests have been made (and apparently ignored) for it to be.



            Further reading



            • Paul Menzel (2016-09-19). Syntax error in systemd service file. Bug #838305. Debian bug tracker.

            • Uwe Storbeck (2014-11-05). watchdog does not start at boot. Bug #768168. Debian bug tracker.

            • Andreas Steinel (2015-07-22). Not starting automatically on freshly installed Jessie. Bug #793309. Debian bug tracker.

            • Michael Meskes (2016-02-26). Accepted watchdog 5.15-1 (source amd64) into unstable. debian-devel-changes.






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Feb 20 '17 at 6:20









            JdeBPJdeBP

            35.8k473171




            35.8k473171







            • 1





              Could you please tell what should do I, the ordinary user of OSMC on Raspberry Pi 3, to make watchdog work and start automatically? Writing/not writing to /dev/watchdog works. Fine that you provided some links where are some informations, but I do not know what to do with them.

              – Paul
              Dec 6 '17 at 8:39













            • 1





              Could you please tell what should do I, the ordinary user of OSMC on Raspberry Pi 3, to make watchdog work and start automatically? Writing/not writing to /dev/watchdog works. Fine that you provided some links where are some informations, but I do not know what to do with them.

              – Paul
              Dec 6 '17 at 8:39








            1




            1





            Could you please tell what should do I, the ordinary user of OSMC on Raspberry Pi 3, to make watchdog work and start automatically? Writing/not writing to /dev/watchdog works. Fine that you provided some links where are some informations, but I do not know what to do with them.

            – Paul
            Dec 6 '17 at 8:39






            Could you please tell what should do I, the ordinary user of OSMC on Raspberry Pi 3, to make watchdog work and start automatically? Writing/not writing to /dev/watchdog works. Fine that you provided some links where are some informations, but I do not know what to do with them.

            – Paul
            Dec 6 '17 at 8:39














            1














            For armbian, you can install updated package manually:



            wget http://ftp.debian.org/debian/pool/main/w/watchdog/watchdog_5.15-2_armhf.deb
            dpkg -i watchdog_5.15-2_armhf.deb
            systemctl enable watchdog





            share|improve this answer



























              1














              For armbian, you can install updated package manually:



              wget http://ftp.debian.org/debian/pool/main/w/watchdog/watchdog_5.15-2_armhf.deb
              dpkg -i watchdog_5.15-2_armhf.deb
              systemctl enable watchdog





              share|improve this answer

























                1












                1








                1







                For armbian, you can install updated package manually:



                wget http://ftp.debian.org/debian/pool/main/w/watchdog/watchdog_5.15-2_armhf.deb
                dpkg -i watchdog_5.15-2_armhf.deb
                systemctl enable watchdog





                share|improve this answer













                For armbian, you can install updated package manually:



                wget http://ftp.debian.org/debian/pool/main/w/watchdog/watchdog_5.15-2_armhf.deb
                dpkg -i watchdog_5.15-2_armhf.deb
                systemctl enable watchdog






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 15 '18 at 12:55









                danmandanman

                112




                112



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f346224%2fproblem-with-systemd-starting-watchdog%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay