GoogleCloudPlatform / guest-agent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error watching metadata: invalid character '<' looking for beginning of value - Windows server

deepak-rxt opened this issue · comments

Getting the below error in all our Windows servers. Any specific version to install to fix the issue?

`2024/01/30 16:13:53 GCEGuestAgent: Error watching metadata: invalid character '<' looking for beginning of value

2024/01/30 16:13:53 GCEGuestAgent: Metadata event watcher failed, ignoring: invalid character '<' looking for beginning of value

2024/01/30 16:13:53 GCEGuestAgent: Metadata event watcher failed, ignoring: invalid character 'M' looking for beginning of value

2024/01/30 16:13:53 GCEGuestAgent: Metadata event watcher failed, ignoring: invalid character 'M' looking for beginning of value

2024/01/30 16:13:53 GCEGuestAgent: Metadata event watcher failed, ignoring: invalid character 'M' looking for beginning of value

2024/01/30 16:13:53 GCEGuestAgent: Metadata event watcher failed, ignoring: invalid character 'M' looking for beginning of value`'

There is already a closed issue #320

Hi @deepak-rxt, what Guest Agent and Windows image version you're using?

Hey @ChaitanyaKulkarni28 ,

Edition Windows Server 2022 Datacenter
Version 21H2
OS build 20348.2113

GCE Agent version 20231004.02

Is the error you're seeing consistent? If not, Guest Agent would retry connecting to MDS.

Also, is there any change in behavior if you reboot your system.

Nope, errors are not consistent. haven't tried rebooting.

@deepak-rxt are you seeing these errors only on instance startup or at random times?

same issues with Debian Server came out of no where.

severity: "ERROR"
sourceLocation: {
  file: "metadata.go"
  function: "github.com/GoogleCloudPlatform/guest-agent/google_guest_agent/events/metadata.(*Watcher).Run"
  line: "68"
}
jsonPayload: {
  localTimestamp: "2024-04-08T19:17:25.3397+10:00"
  message: "Error watching metadata: invalid character '<' looking for beginning of value"
  omitempty: null
}
{
  "jsonPayload": {
    "omitempty": null,
    "message": "Metadata event watcher failed, ignoring: invalid character 'M' looking for beginning of value",
    "localTimestamp": "2024-04-08T19:17:25.8373+10:00"
  },
  "sourceLocation": {
    "file": "main.go",
    "line": "225",
    "function": "main.runAgent.func1"
  },
  "receiveTimestamp": "2024-04-08T09:17:26.414441172Z"
}

This issue is fixed in Guest Agent and should be available soon. I will update it here once the new version is released.

Regardless of these error logs, it should not impact any functioning of the Guest Agent at all as agent will retry all transient errors. This is just the mishandling of the error status returned by Metadata server to Guest Agent.

@ChaitanyaKulkarni28 Is there any news on when the update will be published? Last week (7 days), we received around 28K log messages from this, of which 26 were error level.