0

This is regarding the GCP compute instances. My GCP instances are not able to fetch the GCE metadata from the metadata server & therefore when I am installing Openstack on google cloud (GCP) via packstack over a CentOS image I am getting this error.

VM instances are a part of default network with no Firewall rules. I am able to login the nodes externally also, which proves the network is OK.

ERROR : Error appeared during Puppet run: 10.142.0.16_compute.pp
Error: Facter: GCE metadata request failed: Timeout was reached

in /var/log/messages I am getting this message repeatedly:

Oct 25 20:16:31 controller-8 google_guest_agent[146448]: ERROR main.go:190 Network error when requesting metadata, make sure your instance has an active network and can reach the metadata server.
Oct 25 20:16:31 controller-8 google_guest_agent[146448]: ERROR main.go:193 Error watching metadata: Get http://169.254.169.254/computeMetadata/v1//?recursive=true&alt=json&wait_for_change=true&timeout_sec=60&last_etag=6f06fe6d055dd9f5: dial tcp 169.254.169.254:80: connect: no route to host
Oct 25 20:19:07 controller-8 OSConfigAgent[146888]: 2021-10-25T20:19:07.5468Z OSConfigAgent Error main.go:218: Get http://169.254.169.254/computeMetadata/v1/?recursive=true&alt=json&wait_for_change=true&last_etag=6f06fe6d055dd9f5&timeout_sec=60: dial tcp 169.254.169.254:80: connect: no route to host
Oct 25 20:20:08 controller-8 OSConfigAgent[146888]: 2021-10-25T20:20:08.9868Z OSConfigAgent Error main.go:218: 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=6f06fe6d055dd9f5&timeout_sec=60: dial tcp 169.254.169.254:80: connect: no route to host
Oct 25 20:21:10 controller-8 OSConfigAgent[146888]: 2021-10-25T20:21:10.4268Z OSConfigAgent Error main.go:218: 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=6f06fe6d055dd9f5&timeout_sec=60: dial tcp 169.254.169.254:80: connect: no route to host
Oct 25 20:22:10 controller-8 OSConfigAgent[146888]: 2021-10-25T20:22:10.7148Z OSConfigAgent Error main.go:218: 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=6f06fe6d055dd9f5&timeout_sec=60: dial tcp 169.254.169.254:80: connect: no route to host
Victor Lee
  • 2,467
  • 3
  • 19
  • 37
Asad Khan
  • 31
  • 1
  • 5
  • Please edit your question and remove duplicate error messages. What changes did you make to the compute engine default service account? My guess at this point is that you disabled the service account. More details are required. – John Hanley Oct 25 '21 at 23:34

1 Answers1

0

IIUC, according this error tips: connect: no route to host, try use the metadata.google.internal domain to replace this IP 169.254.169.254 ?

Check from this documentation Parts of a metadata request , and make sure you have the correctly /etc/resolv.conf file for nameserver before. And you should check the service account setting by John Hanley's suggestion.

Thanks, @John Hanley. Reference from your tips and this question -- "Why can't I access Metadata Server of GCP Instance?" 's earliest answer.

Victor Lee
  • 2,467
  • 3
  • 19
  • 37