opendns/dnscrypt-win-client

Can't start the OpenDNSCryptService service

klyushin opened this issue · 1 comments

Hello! Need some help with running the service.

I've build the solution in VisualStudio 2015(Update3) under x64 windows 10.
In debug mode all three projects(script/interface/code) will compile. But no luck with starting the service.
In release mode I checked only the service to build in (build -> configuration manager) because two other projects would cause errors like:

Severity Code Description Project File Line Suppression State Error The command "if Release == Release CALL signtool sign /t http://timestamp.comodoca.com/authenticode /n "OpenDNS" /d "OpenDNS DNSCrypt" "C:\Users\USER\Downloads\dnscrypt-win-client-master\Interface\obj\x64\Release\OpenDNSInterface.exe" " exited with code 1. OpenDNSInterface

so I checked only the service project to compile and the output would say that it compiled successfully:

1>------ Skipped Rebuild All: Project: Code, Configuration: Release x64 ------ 1>Project not selected to build for this solution configuration 2>------ Skipped Rebuild All: Project: OpenDNSInterface, Configuration: Release x64 ------ 2>Project not selected to build for this solution configuration 3>------ Rebuild All started: Project: OpenDNSCryptService, Configuration: Release x64 ------ 3> **OpenDNSCryptService** -> C:\Users\USER\Downloads\dnscrypt-win-client-master\Service\bin\x64\Release\OpenDNSCryptService.exe ========== Rebuild All: **1 succeeded**, 0 failed, 2 skipped ==========

then in command prompt under Administrator I cd to:

c:\Users\USER\Downloads\dnscrypt-win-client-master\Service\bin\x64\Release

and run:

installutil OpenDNSCryptService.exe

the installation log says that everything is okay as far as I understand:

Installing assembly 'c:\Users\USER\Downloads\dnscrypt-win-client-master\Service\bin\x64\Release\OpenDNSCryptService.exe'. Affected parameters are: logtoconsole = assemblypath = c:\Users\USER\Downloads\dnscrypt-win-client-master\Service\bin\x64\Release\OpenDNSCryptService.exe logfile = c:\Users\USER\Downloads\dnscrypt-win-client-master\Service\bin\x64\Release\OpenDNSCryptService.InstallLog Installing service DNSCrypt... Service DNSCrypt has been successfully installed. Creating EventLog source DNSCrypt in log Application... Committing assembly 'c:\Users\USER\Downloads\dnscrypt-win-client-master\Service\bin\x64\Release\OpenDNSCryptService.exe'. Affected parameters are: logtoconsole = assemblypath = c:\Users\USER\Downloads\dnscrypt-win-client-master\Service\bin\x64\Release\OpenDNSCryptService.exe logfile = c:\Users\USER\Downloads\dnscrypt-win-client-master\Service\bin\x64\Release\OpenDNSCryptService.InstallLog

Now I go to windows services and see that the service is installed but status is "stopped"
If I start it - it says

"Windows could not start the OpenDNSCrypt service on Local Computer - Error 5: Access is denied"

Then I go to properties of the service -> "Log On" tab and check the "Local System Account" radiobutton. Apply.
Start again the service and I see another error:
"The OpenDnsCrypt service on Local Computer started and then stopped. Some services stop automatically if they are not in use by another services or programs."

What am I doing wrong?

P.S: also I needed to install "log4net" package via NuGet as it had errors referring to lack of this package.
P.S_2: dnscrypt-proxy.exe from the *dnscrypt-win-client-master\Interface\bin\Debug* runs okay. But I still would prefer to run your program as service.

Any ideas ?