OSConfigAgent Error parsing metadata, agent cannot start: network error when requesting metadata

hi all,

is there anyone have ever faced this error before?

localhost OSConfigAgent[1843]: OSConfigAgent Critical main.go:112: Error parsing metadata, agent cannot start: network error when requesting metadata, make sure your instance has an active network and can reach the metadata server: Get "http://169.254.169.254/computeMetadata/v1/?recursive=true&alt=json&wait_for_change=true&last_etag=0&...": dial tcp 169.254.169.254:80: connect: network is unreachable

suddenly, i cannot ssh to my machine that only have private ip. i have enabled the IAP, adding firewall rules for the IAP, restart the machine, enlarge the instance, but still i cannot ssh to the machine.

i have tried troubleshoot it the VM status, network status and the permission status everythings results is OK but still cannot access to the machine.

any suggestion?

 

1 2 989
2 REPLIES 2

Greetings @Ricky_Roo,

The most common cause of this issue is a CPU or memory overload. To verify, you can check the logs in /var/log/messages to see if there are any unusual entries that could indicate potential causes.

Here are some troubleshooting steps you can take to identify the issue, as suggested by @ John Hanley from this Stack Overflow thread[1]:

  1. Double-check the network adapter configuration in the GUI.
  2. Ensure that a service account is attached to the instance.
  3. Revert the instance to its original configuration.
  4. Snapshot the disk and attempt to create a new VM.

Additionally, consider resizing the instance and the disk, and restart the OSConfigAgent along with the instance itself.

If none of the above options resolve the problem, I recommend reaching out to Google Cloud Support for further assistance. Thank you! 😃

[1]. https://stackoverflow.com/questions/71407127/unable-to-ssh-vm-after-hardware-configuration-change

hi @lawrencenelson ,

Thanks.

Yes, i have tried check the network adapter and make sure all firewall rules granted but still i cannot ssh access to the vm.

i am using the default service account and have tried to resizing the instance with 3 times larger than current cpu and memory config. but still i cannot access to the machines.

i cannot access to the machines and check the var/log/messages.