After upgrade to Jessie, service control doesn't return result
Clash 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.
systemd raspbian
add a comment |
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.
systemd raspbian
add a comment |
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.
systemd raspbian
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
systemd raspbian
edited Jan 26 '16 at 12:24
Stephen Kitt
156k23343416
156k23343416
asked Jan 26 '16 at 12:07
JWCains
161
161
add a comment |
add a comment |
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
.
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 insystemctl
, 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
add a comment |
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).
add a comment |
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
.
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 insystemctl
, 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
add a comment |
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
.
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 insystemctl
, 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
add a comment |
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
.
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
.
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 insystemctl
, 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
add a comment |
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 insystemctl
, 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
add a comment |
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).
add a comment |
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).
add a comment |
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).
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).
edited 2 days ago
answered 2 days ago
sourcejedi
21.8k43396
21.8k43396
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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