DNSCrypt / dnscrypt-proxy

dnscrypt-proxy 2 - A flexible DNS proxy, with support for encrypted DNS protocols.
https://dnscrypt.info
ISC License
11.45k stars 1.01k forks source link

Restart is failing on Windows when the service is not started #145

Closed u1735067 closed 6 years ago

u1735067 commented 6 years ago
[2018-02-18 23:27:29] [NOTICE] Source [https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md] loaded
[2018-02-18 23:27:29] [NOTICE] dnscrypt-proxy 2.0.0
[2018-02-18 23:27:29] [FATAL] Failed to restart DNSCrypt client proxy: Le service n’a pas été démarré.

I guess you expect the service to be started if it's not (that's what systemctl does). I that's probably more an upstream (https://github.com/kardianos/service/blob/master/service_windows.go#L322) consistency problem, but I'm posting here anyway. (I migrated to v2 yesterday from 2 v1 instances, but I'm experiencing issues: sometime resolution fails, and it even completely stopped working a some point, I enabled logs & hope to have something to post)

jedisct1 commented 6 years ago

That's... expected. At least, it makes sense. "restart" means "re-start" :)

u1735067 commented 6 years ago

It doesn't feel natural .. but ok, I'll keep my old sc stop & sc start then :) Thanks for the clarification.

Tallefer commented 6 years ago

Probably it should emit a log entry or even a warning of some sort. Like "Service is not running. Do you want to start it? Please consider using a Start command."