dnscrypt-proxy icon indicating copy to clipboard operation
dnscrypt-proxy copied to clipboard

Unexpected restarts - what does exit status 2 mean?

Open georgep56 opened this issue 8 years ago • 7 comments

I'm running version 2.0.9 on Ubuntu linux (installed as a service) and I'm seeing this in my logs several times a day, and sometimes every few minutes ....

Apr 27 10:48:03 revo kernel: [787996.085301] init: dnscrypt-proxy main process (30963) terminated with status 2
Apr 27 10:48:03 revo kernel: [787996.085421] init: dnscrypt-proxy main process ended, respawning
....
Apr 27 10:52:09 revo kernel: [788242.220877] init: dnscrypt-proxy main process (31321) terminated with status 2
Apr 27 10:52:09 revo kernel: [788242.220994] init: dnscrypt-proxy main process ended, respawning

There's nothing untoward in the proxy/query/etc. logs that corresponds to the exit/restart.

I have the same setup with a similar (but not identical) configuration on another ubuntu box which doesn't do this at all.

I should probably upgrade to the latest version, but 2.0.9 on the other box is rock solid and I'm not sure what I can do do investigate this. Knowing what the exit value means might be a start.

George

georgep56 avatar Apr 27 '18 10:04 georgep56

What happens when you run it from the command line, not as a service?

jedisct1 avatar Apr 27 '18 10:04 jedisct1

When it was first installed I ran it a manually a handful of times to verify it was working OK and then I installed the service.

It's running as one of a pair of home dns servers so it's hardly being stretched, and the dns service has seemed reliable so if it wasn't for me watching the syslog today looking for another [unrelated] problem I wouldn't have known that this was happening.

It's impossible to predict so it's hard to just sit and watch a terminal until something happens :-)

georgep56 avatar Apr 27 '18 11:04 georgep56

I've run it from a command line prompt for a couple of hours and typically nothing untoward has happened. I can't leave it running like that in case it should 'die' again while I'm not around to restart it, so I've just un-installed and re-installed the service and I'll grep the syslogs periodically to see if that's made any difference. For interest here is a 'log' of events today. Note that it looks like the service also has problems starting after a reboot.

george@revo:~/linux-x86_64$ cat /var/log/syslog | grep respawn
Apr 27 10:41:52 revo kernel: [787625.273174] init: dnscrypt-proxy main process ended, respawning
Apr 27 10:48:03 revo kernel: [787996.085421] init: dnscrypt-proxy main process ended, respawning
Apr 27 10:52:09 revo kernel: [788242.220994] init: dnscrypt-proxy main process ended, respawning
Apr 27 11:45:11 revo kernel: [   28.496653] init: dnscrypt-proxy main process ended, respawning
Apr 27 11:45:14 revo kernel: [   31.236296] init: dnscrypt-proxy main process ended, respawning
Apr 27 11:45:18 revo kernel: [   35.293778] init: dnscrypt-proxy main process ended, respawning
Apr 27 11:45:22 revo kernel: [   39.643577] init: dnscrypt-proxy main process ended, respawning
Apr 27 11:45:25 revo kernel: [   42.649059] init: dnscrypt-proxy main process ended, respawning
Apr 27 11:45:27 revo kernel: [   44.463341] init: dnscrypt-proxy main process ended, respawning
Apr 27 11:45:28 revo kernel: [   45.791582] init: dnscrypt-proxy main process ended, respawning
Apr 27 14:00:25 revo kernel: [ 8142.486015] init: dnscrypt-proxy main process ended, respawning
george@revo:~/linux-x86_64$

georgep56 avatar Apr 27 '18 13:04 georgep56

This is freaky.. I just thought I'd check that the proxy on my other box really wasn't failing in the same way ....

george@asusbox:~/linux-x86_64$ cat /var/log/syslog | grep respawn
Apr 27 14:00:25 asusbox kernel: [946673.916797] init: dnscrypt-proxy main process ended, respawning
george@asusbox:~/linux-x86_64$

Ermm .. why should the proxy on both boxes restart at exactly the same time - to the second ???

georgep56 avatar Apr 27 '18 13:04 georgep56

Sorry I accidentally closed this issue yesterday :-/ Here's the latest info from my logs on 2 different machines...

Apr 27 14:00:25 asusbox kernel: [946673.916797] init: dnscrypt-proxy main process ended, respawning
Apr 27 23:22:51 asusbox kernel: [980419.646645] init: dnscrypt-proxy main process ended, respawning
Apr 28 04:17:17 asusbox kernel: [998085.356245] init: dnscrypt-proxy main process ended, respawning

and


Apr 27 11:45:28 revo kernel: [   45.791582] init: dnscrypt-proxy main process ended, respawning
Apr 27 14:00:25 revo kernel: [ 8142.486015] init: dnscrypt-proxy main process ended, respawning
Apr 27 18:01:43 revo kernel: [22619.926277] init: dnscrypt-proxy main process ended, respawning
Apr 27 18:07:52 revo kernel: [22988.711481] init: dnscrypt-proxy main process ended, respawning
Apr 27 18:09:55 revo kernel: [23112.065626] init: dnscrypt-proxy main process ended, respawning
Apr 27 23:22:51 revo kernel: [41888.230165] init: dnscrypt-proxy main process ended, respawning
Apr 28 04:17:17 revo kernel: [59553.945815] init: dnscrypt-proxy main process ended, respawning
Apr 28 07:35:37 revo kernel: [71454.626936] init: dnscrypt-proxy main process ended, respawning

OK so it's happening more on one box than the other, buy why should both be reloading the proxy at exactly the same time of day? Could it be something to do with the list of active proxies being refreshed?

I also suggest that unless people are using some kind of process monitoring [such as 'monit'] or are actively watching their syslogs, this could be happening to others and not just me.

georgep56 avatar Apr 28 '18 07:04 georgep56

It might be related to my issue: https://github.com/jedisct1/dnscrypt-proxy/issues/442. My error log states: Server [cloudflare] returned temporary error code [2] -- Upstream server may be experiencing connectivity issues

Jimmy89 avatar May 10 '18 18:05 Jimmy89

For me it is very unpredictable. While I was seeing several restarts every day, for the last few days now I've hardly seen any unexpected restarts at all (and I'm working on other things atm so neither of my two dnscrypt installations have been touched).

On 10 May 2018 at 19:35, Jimmy [email protected] wrote:

It might be related to my issue: #442 https://github.com/jedisct1/dnscrypt-proxy/issues/442. My error log states: Server [cloudflare] returned temporary error code [2] -- Upstream server may be experiencing connectivity issues

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jedisct1/dnscrypt-proxy/issues/409#issuecomment-388144566, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqZKIj8DvVt3Q1ph-Tpdy8w8_Y7f8W0ks5txIhogaJpZM4TqIiQ .

georgep56 avatar May 10 '18 19:05 georgep56