After upgrade to Jessie, service control doesn't return result

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











up vote
3
down vote

favorite












Actually not debian, but Raspbian Wheezy to Raspbian Jessie.
I upgrade it using some commands which found on Raspbian official forum.



cat /etc/debian_version = 8.0.



The problem is, I can't view any result when I restart the service.



Before upgrade(Wheezy):



# service tor restart
[ok] cccc
[ok] ddd
# _


After upgrade(Jessie):



# service tor restart
# _


And all results are written to /var/log/syslog...
How can I revert this thing? I want to see actual result, not written to log.










share|improve this question



























    up vote
    3
    down vote

    favorite












    Actually not debian, but Raspbian Wheezy to Raspbian Jessie.
    I upgrade it using some commands which found on Raspbian official forum.



    cat /etc/debian_version = 8.0.



    The problem is, I can't view any result when I restart the service.



    Before upgrade(Wheezy):



    # service tor restart
    [ok] cccc
    [ok] ddd
    # _


    After upgrade(Jessie):



    # service tor restart
    # _


    And all results are written to /var/log/syslog...
    How can I revert this thing? I want to see actual result, not written to log.










    share|improve this question

























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      Actually not debian, but Raspbian Wheezy to Raspbian Jessie.
      I upgrade it using some commands which found on Raspbian official forum.



      cat /etc/debian_version = 8.0.



      The problem is, I can't view any result when I restart the service.



      Before upgrade(Wheezy):



      # service tor restart
      [ok] cccc
      [ok] ddd
      # _


      After upgrade(Jessie):



      # service tor restart
      # _


      And all results are written to /var/log/syslog...
      How can I revert this thing? I want to see actual result, not written to log.










      share|improve this question















      Actually not debian, but Raspbian Wheezy to Raspbian Jessie.
      I upgrade it using some commands which found on Raspbian official forum.



      cat /etc/debian_version = 8.0.



      The problem is, I can't view any result when I restart the service.



      Before upgrade(Wheezy):



      # service tor restart
      [ok] cccc
      [ok] ddd
      # _


      After upgrade(Jessie):



      # service tor restart
      # _


      And all results are written to /var/log/syslog...
      How can I revert this thing? I want to see actual result, not written to log.







      systemd raspbian






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 26 '16 at 12:24









      Stephen Kitt

      156k23343416




      156k23343416










      asked Jan 26 '16 at 12:07









      JWCains

      161




      161




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote













          service is now handled by systemd, and systemd is quiet when everything goes well. There doesn't seem to be a way to change that. Lennart added a TODO item to add a verbose mode restoring behaviour similar to what you're after, but three years later it's still in the TODO list!



          You could always define a shell function to do something like



          service tor restart && echo '[OK]' || echo '[Failed]'


          (with tor replaced by $1, and whatever message you want in the echo commands), but that won't give you details of units running multiple commands.



          systemctl status tor


          will show you the detailed status of the relevant unit, so another option could be to couple that with start or restart.






          share|improve this answer






















          • For some services this is "good", but that do not work for a lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it....
            – Luciano Andress Martini
            Jun 13 at 15:15







          • 1




            I agree, the workaround given here is imperfect. This really needs to be implemented in systemctl, and units need to be written correctly to properly report the service’s status (which is another issue).
            – Stephen Kitt
            Jun 13 at 15:18










          • Thank you for your feedback so it is a general problem! So sad!
            – Luciano Andress Martini
            Jun 13 at 15:27

















          up vote
          0
          down vote














          A lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it. – @Luciano Andress Martini




          "No result" means the operation succeeded. This is the UNIX default. It is how the cp or rm commands behave, for example.



          If your service is written incorrectly, it may return success and then fail immediately afterwards e.g. when it reads a bad configuration. This is a bug in the service! If a sysvinit script behaves like this, you would have exactly the same problem! There is nothing systemd can do to fix that.



          When your unit fails, there is a trick to view the last 10 lines from your daemon only. Run systemctl status as the root user (i.e. sudo). Alternatively, you can add your user as a member of one of the groups systemd-journal or adm.



          When I need more than the last 10 lines, I use journalctl -u tor -b, meaning everything from the current boot. Or if you have restarted it many times during the current boot, you might want to use journalctl -u tor --since=-1hour. Or for short, --since=-1h.



          I think systemctl already suggests you run systemctl status when the unit fails to start. (Unfortunately, systemctl never mentions the permissions issue).



          systemctl does also suggest journalctl -xe. Personally, I think this is unhelpful. -x mostly just adds a lot of noise. -e skips e.g. stdout/stderr messages and anything else that is not explicitly marked as an error message. (It even skips stderr messages, sorry. Changing this is awkward: it would allow stderr lines to be re-ordered v.s. stdout, which might be undesirable for shell scripts).




          There is a similar user complaint on the systemd issue tracker, which involves some other services which are buggy. (Or, one of them looks like it might be deliberately failing "in the background", after a long network timeout. Again, this is exactly how the service is written, it is not systemd trying to annoy you).






          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',
            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%2f257727%2fafter-upgrade-to-jessie-service-control-doesnt-return-result%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








            up vote
            3
            down vote













            service is now handled by systemd, and systemd is quiet when everything goes well. There doesn't seem to be a way to change that. Lennart added a TODO item to add a verbose mode restoring behaviour similar to what you're after, but three years later it's still in the TODO list!



            You could always define a shell function to do something like



            service tor restart && echo '[OK]' || echo '[Failed]'


            (with tor replaced by $1, and whatever message you want in the echo commands), but that won't give you details of units running multiple commands.



            systemctl status tor


            will show you the detailed status of the relevant unit, so another option could be to couple that with start or restart.






            share|improve this answer






















            • For some services this is "good", but that do not work for a lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it....
              – Luciano Andress Martini
              Jun 13 at 15:15







            • 1




              I agree, the workaround given here is imperfect. This really needs to be implemented in systemctl, and units need to be written correctly to properly report the service’s status (which is another issue).
              – Stephen Kitt
              Jun 13 at 15:18










            • Thank you for your feedback so it is a general problem! So sad!
              – Luciano Andress Martini
              Jun 13 at 15:27














            up vote
            3
            down vote













            service is now handled by systemd, and systemd is quiet when everything goes well. There doesn't seem to be a way to change that. Lennart added a TODO item to add a verbose mode restoring behaviour similar to what you're after, but three years later it's still in the TODO list!



            You could always define a shell function to do something like



            service tor restart && echo '[OK]' || echo '[Failed]'


            (with tor replaced by $1, and whatever message you want in the echo commands), but that won't give you details of units running multiple commands.



            systemctl status tor


            will show you the detailed status of the relevant unit, so another option could be to couple that with start or restart.






            share|improve this answer






















            • For some services this is "good", but that do not work for a lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it....
              – Luciano Andress Martini
              Jun 13 at 15:15







            • 1




              I agree, the workaround given here is imperfect. This really needs to be implemented in systemctl, and units need to be written correctly to properly report the service’s status (which is another issue).
              – Stephen Kitt
              Jun 13 at 15:18










            • Thank you for your feedback so it is a general problem! So sad!
              – Luciano Andress Martini
              Jun 13 at 15:27












            up vote
            3
            down vote










            up vote
            3
            down vote









            service is now handled by systemd, and systemd is quiet when everything goes well. There doesn't seem to be a way to change that. Lennart added a TODO item to add a verbose mode restoring behaviour similar to what you're after, but three years later it's still in the TODO list!



            You could always define a shell function to do something like



            service tor restart && echo '[OK]' || echo '[Failed]'


            (with tor replaced by $1, and whatever message you want in the echo commands), but that won't give you details of units running multiple commands.



            systemctl status tor


            will show you the detailed status of the relevant unit, so another option could be to couple that with start or restart.






            share|improve this answer














            service is now handled by systemd, and systemd is quiet when everything goes well. There doesn't seem to be a way to change that. Lennart added a TODO item to add a verbose mode restoring behaviour similar to what you're after, but three years later it's still in the TODO list!



            You could always define a shell function to do something like



            service tor restart && echo '[OK]' || echo '[Failed]'


            (with tor replaced by $1, and whatever message you want in the echo commands), but that won't give you details of units running multiple commands.



            systemctl status tor


            will show you the detailed status of the relevant unit, so another option could be to couple that with start or restart.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 27 '16 at 10:04

























            answered Jan 26 '16 at 12:43









            Stephen Kitt

            156k23343416




            156k23343416











            • For some services this is "good", but that do not work for a lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it....
              – Luciano Andress Martini
              Jun 13 at 15:15







            • 1




              I agree, the workaround given here is imperfect. This really needs to be implemented in systemctl, and units need to be written correctly to properly report the service’s status (which is another issue).
              – Stephen Kitt
              Jun 13 at 15:18










            • Thank you for your feedback so it is a general problem! So sad!
              – Luciano Andress Martini
              Jun 13 at 15:27
















            • For some services this is "good", but that do not work for a lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it....
              – Luciano Andress Martini
              Jun 13 at 15:15







            • 1




              I agree, the workaround given here is imperfect. This really needs to be implemented in systemctl, and units need to be written correctly to properly report the service’s status (which is another issue).
              – Stephen Kitt
              Jun 13 at 15:18










            • Thank you for your feedback so it is a general problem! So sad!
              – Luciano Andress Martini
              Jun 13 at 15:27















            For some services this is "good", but that do not work for a lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it....
            – Luciano Andress Martini
            Jun 13 at 15:15





            For some services this is "good", but that do not work for a lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it....
            – Luciano Andress Martini
            Jun 13 at 15:15





            1




            1




            I agree, the workaround given here is imperfect. This really needs to be implemented in systemctl, and units need to be written correctly to properly report the service’s status (which is another issue).
            – Stephen Kitt
            Jun 13 at 15:18




            I agree, the workaround given here is imperfect. This really needs to be implemented in systemctl, and units need to be written correctly to properly report the service’s status (which is another issue).
            – Stephen Kitt
            Jun 13 at 15:18












            Thank you for your feedback so it is a general problem! So sad!
            – Luciano Andress Martini
            Jun 13 at 15:27




            Thank you for your feedback so it is a general problem! So sad!
            – Luciano Andress Martini
            Jun 13 at 15:27












            up vote
            0
            down vote














            A lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it. – @Luciano Andress Martini




            "No result" means the operation succeeded. This is the UNIX default. It is how the cp or rm commands behave, for example.



            If your service is written incorrectly, it may return success and then fail immediately afterwards e.g. when it reads a bad configuration. This is a bug in the service! If a sysvinit script behaves like this, you would have exactly the same problem! There is nothing systemd can do to fix that.



            When your unit fails, there is a trick to view the last 10 lines from your daemon only. Run systemctl status as the root user (i.e. sudo). Alternatively, you can add your user as a member of one of the groups systemd-journal or adm.



            When I need more than the last 10 lines, I use journalctl -u tor -b, meaning everything from the current boot. Or if you have restarted it many times during the current boot, you might want to use journalctl -u tor --since=-1hour. Or for short, --since=-1h.



            I think systemctl already suggests you run systemctl status when the unit fails to start. (Unfortunately, systemctl never mentions the permissions issue).



            systemctl does also suggest journalctl -xe. Personally, I think this is unhelpful. -x mostly just adds a lot of noise. -e skips e.g. stdout/stderr messages and anything else that is not explicitly marked as an error message. (It even skips stderr messages, sorry. Changing this is awkward: it would allow stderr lines to be re-ordered v.s. stdout, which might be undesirable for shell scripts).




            There is a similar user complaint on the systemd issue tracker, which involves some other services which are buggy. (Or, one of them looks like it might be deliberately failing "in the background", after a long network timeout. Again, this is exactly how the service is written, it is not systemd trying to annoy you).






            share|improve this answer


























              up vote
              0
              down vote














              A lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it. – @Luciano Andress Martini




              "No result" means the operation succeeded. This is the UNIX default. It is how the cp or rm commands behave, for example.



              If your service is written incorrectly, it may return success and then fail immediately afterwards e.g. when it reads a bad configuration. This is a bug in the service! If a sysvinit script behaves like this, you would have exactly the same problem! There is nothing systemd can do to fix that.



              When your unit fails, there is a trick to view the last 10 lines from your daemon only. Run systemctl status as the root user (i.e. sudo). Alternatively, you can add your user as a member of one of the groups systemd-journal or adm.



              When I need more than the last 10 lines, I use journalctl -u tor -b, meaning everything from the current boot. Or if you have restarted it many times during the current boot, you might want to use journalctl -u tor --since=-1hour. Or for short, --since=-1h.



              I think systemctl already suggests you run systemctl status when the unit fails to start. (Unfortunately, systemctl never mentions the permissions issue).



              systemctl does also suggest journalctl -xe. Personally, I think this is unhelpful. -x mostly just adds a lot of noise. -e skips e.g. stdout/stderr messages and anything else that is not explicitly marked as an error message. (It even skips stderr messages, sorry. Changing this is awkward: it would allow stderr lines to be re-ordered v.s. stdout, which might be undesirable for shell scripts).




              There is a similar user complaint on the systemd issue tracker, which involves some other services which are buggy. (Or, one of them looks like it might be deliberately failing "in the background", after a long network timeout. Again, this is exactly how the service is written, it is not systemd trying to annoy you).






              share|improve this answer
























                up vote
                0
                down vote










                up vote
                0
                down vote










                A lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it. – @Luciano Andress Martini




                "No result" means the operation succeeded. This is the UNIX default. It is how the cp or rm commands behave, for example.



                If your service is written incorrectly, it may return success and then fail immediately afterwards e.g. when it reads a bad configuration. This is a bug in the service! If a sysvinit script behaves like this, you would have exactly the same problem! There is nothing systemd can do to fix that.



                When your unit fails, there is a trick to view the last 10 lines from your daemon only. Run systemctl status as the root user (i.e. sudo). Alternatively, you can add your user as a member of one of the groups systemd-journal or adm.



                When I need more than the last 10 lines, I use journalctl -u tor -b, meaning everything from the current boot. Or if you have restarted it many times during the current boot, you might want to use journalctl -u tor --since=-1hour. Or for short, --since=-1h.



                I think systemctl already suggests you run systemctl status when the unit fails to start. (Unfortunately, systemctl never mentions the permissions issue).



                systemctl does also suggest journalctl -xe. Personally, I think this is unhelpful. -x mostly just adds a lot of noise. -e skips e.g. stdout/stderr messages and anything else that is not explicitly marked as an error message. (It even skips stderr messages, sorry. Changing this is awkward: it would allow stderr lines to be re-ordered v.s. stdout, which might be undesirable for shell scripts).




                There is a similar user complaint on the systemd issue tracker, which involves some other services which are buggy. (Or, one of them looks like it might be deliberately failing "in the background", after a long network timeout. Again, this is exactly how the service is written, it is not systemd trying to annoy you).






                share|improve this answer















                A lot of services on error, some services always return sucess, even if the service not started, because systemd is starting a kind of service manager instead of the service itself..... And no dont trust service status about what hapenned I get a lot of times a "STARTED OK" and service is really not running without any feedback! So it still does not solve the problem! But is better if you run journal -xe lot better than doing this, but not good enough because you need to run it everytime and remember of it. – @Luciano Andress Martini




                "No result" means the operation succeeded. This is the UNIX default. It is how the cp or rm commands behave, for example.



                If your service is written incorrectly, it may return success and then fail immediately afterwards e.g. when it reads a bad configuration. This is a bug in the service! If a sysvinit script behaves like this, you would have exactly the same problem! There is nothing systemd can do to fix that.



                When your unit fails, there is a trick to view the last 10 lines from your daemon only. Run systemctl status as the root user (i.e. sudo). Alternatively, you can add your user as a member of one of the groups systemd-journal or adm.



                When I need more than the last 10 lines, I use journalctl -u tor -b, meaning everything from the current boot. Or if you have restarted it many times during the current boot, you might want to use journalctl -u tor --since=-1hour. Or for short, --since=-1h.



                I think systemctl already suggests you run systemctl status when the unit fails to start. (Unfortunately, systemctl never mentions the permissions issue).



                systemctl does also suggest journalctl -xe. Personally, I think this is unhelpful. -x mostly just adds a lot of noise. -e skips e.g. stdout/stderr messages and anything else that is not explicitly marked as an error message. (It even skips stderr messages, sorry. Changing this is awkward: it would allow stderr lines to be re-ordered v.s. stdout, which might be undesirable for shell scripts).




                There is a similar user complaint on the systemd issue tracker, which involves some other services which are buggy. (Or, one of them looks like it might be deliberately failing "in the background", after a long network timeout. Again, this is exactly how the service is written, it is not systemd trying to annoy you).







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 days ago

























                answered 2 days ago









                sourcejedi

                21.8k43396




                21.8k43396



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f257727%2fafter-upgrade-to-jessie-service-control-doesnt-return-result%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?

                    Displaying single band from multi-band raster using QGIS

                    How many registers does an x86_64 CPU actually have?