Hello,
I just migrated the websites from CentOS 7 running cPanel to new server with Rocky Linux 8 (image rocky-linux-8-optimized-gcp-v20240611) without any problem. Unfortunately when I swap the public IP address from CentOS 7 to Rocky Linux 8 and reboot both server, I can't access the server using ssh. I can view the serial log and found the following message:
Jun 18 00:40:41 uk OSConfigAgent[2362]: 2024-06-18T00:40:41.4796Z 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
Jun 18 00:40:41 uk systemd[1]: google-osconfig-agent.service: Main process exited, code=exited, status=1/FAILURE
Jun 18 00:40:41 uk systemd[1]: google-osconfig-agent.service: Failed with result 'exit-code'.
Jun 18 00:40:42 uk systemd[1]: google-osconfig-agent.service: Service RestartSec=1s expired, scheduling restart.
I able to login into the server using serial console but don't know how to solve the issue. Please advise and let me know the solution as our website has been down for several hours.
Solved! Go to Solution.
Hi Damian,
Thank you for your response. To answer your questions:
1) no
2) unfortunately I believe I can't do that as it may download the package from internet?
3) no as of my knowledge
4) yes earlier working just fine before switch
I have fixed the issue actually shortly after I posted this. The problem was missing the file ifcfg-eth0 for some reason. Creating the file with the DHCP configuration and then do systemctl network restart fixed the issue.
Kind regards,
Asfihani
Hello @asfihani ,Welcome on Google Cloud Community.
1.Are you able to ping 169.254.169.254 from that VM ?
2. Are you able to remove OpsAgent, reboot server and install OpsAgent again?
3. Do you have maybe PublicIP hardcoded somewhere under configuration?
4. Did you've tried to boot only Rocky Linux ?
--
cheers,
DamianS
LinkedIn medium.com Cloudskillsboost
Hi Damian,
Thank you for your response. To answer your questions:
1) no
2) unfortunately I believe I can't do that as it may download the package from internet?
3) no as of my knowledge
4) yes earlier working just fine before switch
I have fixed the issue actually shortly after I posted this. The problem was missing the file ifcfg-eth0 for some reason. Creating the file with the DHCP configuration and then do systemctl network restart fixed the issue.
Kind regards,
Asfihani