netmaker icon indicating copy to clipboard operation
netmaker copied to clipboard

[Bug]: Windows application event log has the same Event ID (0) for all netclient events

Open unquietwiki opened this issue 1 year ago • 3 comments

Contact Details

[email protected]

What happened?

I was trying to write a Task Scheduler event to remap DNS whenever netclient restarts, or does a pull. However, all the event log IDs are 0, meaning that the DNS will be set against an unstable adapter entry. Having specific event log IDs for connections and disconnections would be helpful for this, and for debugging in general. Thanks!

Version

v0.22.0

What OS are you using?

Windows

Relevant log output

No response

Contributing guidelines

  • [X] Yes, I did.

unquietwiki avatar Feb 09 '24 01:02 unquietwiki

I found one workaround for determining when the network's been reset: an Time Service event 37 gets triggered whenever the network changes; at least for machines on a domain.

unquietwiki avatar Feb 09 '24 01:02 unquietwiki

@unquietwiki , currently Windows client does not manage the service by itself, but it's delegated to Winsw. The event log(start, stop) is written by Winsw, not by netclient code. I raised a git issue https://github.com/winsw/winsw/issues/1078 let's see if it's possible to improve in Winsw level.

yabinma avatar Mar 02 '24 15:03 yabinma

Thank you @yabinma for looking into this, and opening that request. It's appreciated!

unquietwiki avatar Mar 02 '24 17:03 unquietwiki