View previous topic :: View next topic |
Author |
Message |
kaizushi n00b
Joined: 22 Sep 2018 Posts: 70
|
Posted: Thu Jul 07, 2022 5:55 am Post subject: OpenRC falsely reports redsocks as crashed |
|
|
I am having issues with one of my systems which uses redsocks which is a transparent proxy for SOCKS.
It is reporting that redsocks has crashed when it has not and indeed works...
Code: |
# rc-service redsocks status
* status: crashed
|
But the process is running...
Code: |
# ps aux | grep redsocks | grep -v grep
redsocks 427 0.0 0.0 2868 120 ? Ss 05:46 0:00 /usr/sbin/redsocks -c /etc/redsocks.conf
|
I also tested it with curl and it indeed works as intended.
This might be worthy of a bug report but I thought the issue might be with my system.
I would like some pointers on diagnosing the issues. How does it check if a service has crashed and what might go wrong? _________________ I cook a delicious onion stew without any chili peppers. |
|
Back to top |
|
|
Leonardo.b Apprentice
Joined: 10 Oct 2020 Posts: 297
|
|
Back to top |
|
|
kaizushi n00b
Joined: 22 Sep 2018 Posts: 70
|
Posted: Wed Jul 13, 2022 1:51 pm Post subject: |
|
|
It seems that the pidfile does not exist...
Code: |
# ls -l /run/redsocks/redsocks.pid
ls: cannot access '/run/redsocks/redsocks.pid': No such file or directory
|
_________________ I cook a delicious onion stew without any chili peppers. |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1660
|
Posted: Wed Jul 13, 2022 2:01 pm Post subject: |
|
|
kaizushi wrote: | It seems that the pidfile does not exist...
Code: |
# ls -l /run/redsocks/redsocks.pid
ls: cannot access '/run/redsocks/redsocks.pid': No such file or directory
|
|
Using the linked init script as a basis:
The default "mode" of OpenRC is to use start-stop-daemon. This particular daemon looks to be able to background itself and write a pidfile with -p.
Since the special variable pidfile is set, OpenRC expects to find this file to track if the daemon is alive or not.
So if the pidfile is missing, either deleted or not created by the daemon, it will report "crashed" with rc-status since it cannot detect otherwise. |
|
Back to top |
|
|
|