Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context Deadline Exceeded/Exception occurred. (Invalid class ) #1418

Closed
robertgro opened this issue Dec 28, 2023 · 7 comments
Closed

Context Deadline Exceeded/Exception occurred. (Invalid class ) #1418

robertgro opened this issue Dec 28, 2023 · 7 comments
Labels
bug Something isn't working client windows

Comments

@robertgro
Copy link

Describe the problem
I'm unable to connect a windows 10 peer to the network. There is no network adapter/interface anymore and I'm also unable to change settings as well as the netbird service is unable to start. My client.log throws the exceptions as mentioned in the title. Even re-installing didn't fix the issue.

To Reproduce
Steps to reproduce the behavior:

  1. Have a 'malfunctioning' windows 10 client and install the latest netbird release
  2. Receive the following errors
2023-12-28T22:32:16+01:00 ERRO management/client/grpc.go:64: failed creating connection to Management Service context deadline exceeded
2023-12-28T22:32:38+01:00 FATL client/system/info_windows.go:39: Exception occurred. (Invalid class )

Expected behavior
A working connection from the peer to the network.

NetBird status -d output:

Error: failed to connect to daemon error: context deadline exceeded
If the daemon is not running please run:
netbird service install
netbird service start

Screenshots
From the Event Viewer
Screenshot 2023-12-28 235703
Screenshot 2023-12-28 235754

XML

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
[-](https://github.com/netbirdio/netbird/issues/new?assignees=&labels=&projects=&template=bug-issue-report.md&title=#) <System>
  <Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" /> 
  <EventID Qualifiers="49152">7034</EventID> 
  <Version>0</Version> 
  <Level>2</Level> 
  <Task>0</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x8080000000000000</Keywords> 
  <TimeCreated SystemTime="2023-12-28T21:40:12.7564885Z" /> 
  <EventRecordID>368114</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="412" ThreadID="500" /> 
  <Channel>System</Channel> 
  <Computer>XYZ</Computer> 
  <Security /> 
  </System>
[-](https://github.com/netbirdio/netbird/issues/new?assignees=&labels=&projects=&template=bug-issue-report.md&title=#) <EventData>
  <Data Name="param1">Netbird</Data> 
  <Data Name="param2">1</Data> 
  <Binary>4E006500740062006900720064000000</Binary> 
  </EventData>
  </Event>

Additional context
I already did

netbird service uninstall
netbird service install --log-level debug
netbird service start

as mentioned in #1361 (comment) but that didn't work either.

@mlsmaycon
Copy link
Collaborator

Hello @robertgro, it seems to be an issue with a WMI call we do to get the OS name, can you run the following command in Powershell?

$os = Get-WmiObject -Class Win32_OperatingSystem
$osName = $os.Caption
Write-Host "Operating System: $osName"

@robertgro
Copy link
Author

Hello @mlsmaycon, thank you for your reply. Issuing your snippet returns the following output on the affected peer
Screenshot 2024-01-01 183550

@mlsmaycon
Copy link
Collaborator

Thanks @robertgro for sharing the output.

So, the class exists, but the client is unable to access it. Do you have a strict GPO that could cause this?

@mlsmaycon mlsmaycon added bug Something isn't working client windows labels Jan 1, 2024
@robertgro
Copy link
Author

robertgro commented Jan 1, 2024

@mlsmaycon thank you for your feedback. You are welcome.

The following GPO Administrative Templates Settings of the Local Computer Configuration Policy are applied to the client in question:
Screenshot 2024-01-01 194903

I'm pretty sure the RDP configuration didn't affect the process of the client being unable to access the class mentioned. The only change I would take into further consideration is maybe the 'Allow remote server management through WinRM' key, whereby the configuration looks as follows:
Screenshot 2024-01-01 195747

So I don't know if that is the root cause. If you need any additional information, don't hesitate to ask.

@mlsmaycon
Copy link
Collaborator

Thanks, @robertgro. We will take a deeper look into the issue. As a workaround, PR #1426 will return a default value in case of WMI call failure.

@robertgro
Copy link
Author

robertgro commented Jan 1, 2024

I appreciate your effort @mlsmaycon and the PR you created. This should fix the issue in case the wmi.Query returns an error. I'll close this issue as soon as I've tested it successfully.

@robertgro
Copy link
Author

Closing this due to the peer is working now with the latest release. Thanks again @mlsmaycon for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client windows
Projects
None yet
Development

No branches or pull requests

2 participants