-
Notifications
You must be signed in to change notification settings - Fork 88
Service not auto-starting #21
Comments
As a follow-up - I am able to reproduce the issue - service fails to start. After more digging I found that the files were showing with 'unblock' buttons in their properties. After unblocking all of the DNSagent files, I am now getting Symantec Endpoint warnings 'our information on this file is inconclusive'. You can allow the file to run, but this completely breaks auto-start functionality. :( Closing this issue since it has nothing to do w. DNSagent. |
Re-opening, perhaps something else is up. We have completely removed Symantec from the machine, still getting that error. I also gave full control to 'everyone' for all files in that dir, no change. This is ONLY for the service auto-start. I'll dig into it, but kinda stumped...hard to troubleshoot since it's only on auto-start. |
Try changing the startup type to "Automatic (Delayed Start)" and log on account to Local System to see if this would help. Sorry I haven't tested very much about running it as a service... and this project hasn't been updated for quite a while. I'm considering to make some improvements on this project recently. If you have any other problems, please let me know :-) |
Will try that out. The only practical problem with delayed start is that without DNS, not much works, haha. So if you're using this as your machine's primary DNS server, stuff like Slack, domain-related things, etc won't work for 2min. If it successfully auto-starts, will be better than a kick in the pants. |
Yeah, delayed start was the only change I made - working now. Perhaps there is some pre-req that needs to fire up before DNSagent? Possible to make it last in the list of auto starting service? |
First - thanks so much for this! Helped us solve a significant roadblock.
Windows 7 machine, all permissions on the files are correct (users/admins have modify access - user logging on is in local admin group).
When we realized that the service was stopped - we started it via 'start-service DNSagent' and it started just fine - no errors (event log shows 'successfully started'). All DNS issues resolved.
I will try to reproduce.
This is the event log error:
Service cannot be started. System.UnauthorizedAccessException: Access to the path 'C:\DNSAgent\options.cfg' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost) at DnsAgent.Program.ReadOptions() at DnsAgent.Program.Start(String[] args) at DnsAgent.Program.Service.OnStart(Str...
If you have any thoughts, would be appreciated! If all else fails I can make the files 'everyone' accessible, but not sure how that'd solve the issue.
The text was updated successfully, but these errors were encountered: