question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I changed the LAN IP address and now the api server doesn't work

See original GitHub issue

I was running MicroK8s on a server which had a 192.168.1.158 IP. I later moved the server to a different LAN and changed its IP to 10.0.0.10. Afterwards, MicroK8s stopped working:

tribes@tribes-doge:~$ microk8s status
microk8s is not running. Use microk8s inspect for a deeper inspection.
tribes@tribes-doge:~$ microk8s inspect
Inspecting Certificates
Inspecting services
  Service snap.microk8s.daemon-cluster-agent is running
  Service snap.microk8s.daemon-containerd is running
  Service snap.microk8s.daemon-apiserver is running
  Service snap.microk8s.daemon-apiserver-kicker is running
  Service snap.microk8s.daemon-control-plane-kicker is running
  Service snap.microk8s.daemon-proxy is running
  Service snap.microk8s.daemon-kubelet is running
  Service snap.microk8s.daemon-scheduler is running
  Service snap.microk8s.daemon-controller-manager is running
  Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
  Copy processes list to the final report tarball
  Copy snap list to the final report tarball
  Copy VM name (or none) to the final report tarball
  Copy disk usage information to the final report tarball
  Copy memory usage information to the final report tarball
  Copy server uptime to the final report tarball
  Copy current linux distribution to the final report tarball
  Copy openSSL information to the final report tarball
  Copy network configuration to the final report tarball
Inspecting kubernetes cluster
  Inspect kubernetes cluster
Inspecting juju
  Inspect Juju
Inspecting kubeflow
  Inspect Kubeflow

Building the report tarball
  Report tarball is at /var/snap/microk8s/1910/inspection-report-20210131_020755.tar.gz

It seems the API server is crashing. From journalctl -u snap.microk8s.daemon-apiserver:

Jan 31 01:57:29 tribes-doge systemd[1]: snap.microk8s.daemon-apiserver.service: Main process exited, code=exited, status=1/FAILURE
Jan 31 01:57:29 tribes-doge systemd[1]: snap.microk8s.daemon-apiserver.service: Failed with result 'exit-code'.
Jan 31 01:57:29 tribes-doge systemd[1]: snap.microk8s.daemon-apiserver.service: Scheduled restart job, restart counter is at 4.
Jan 31 01:57:29 tribes-doge systemd[1]: Stopped Service for snap application microk8s.daemon-apiserver.
Jan 31 01:57:29 tribes-doge systemd[1]: Started Service for snap application microk8s.daemon-apiserver.

(I see a lot of these logs repeated)

So I tried grep -R '192.168.1.158' /var/snap/microk8s/ and replaced every occurrence of it I could find with my new IP address, but even after rebooting the problem persists.

Any ideas?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

3reactions
alexgleasoncommented, Jan 31, 2021

Yep I changed it there too… I eventually came to the conclusion the IPs are probably stored in dqlite, and I couldn’t figure out how to query it, so I ended up just nuking the cluster and starting over. It was painful and I lost some data.

I think it would make sense for there to be a microk8s set-ip subcommand or something, but I learned my lesson about changing IPs and will never do it again.

1reaction
GBrawlcommented, Jun 29, 2022

If anyone is still running into this, I followed the following steps: https://microk8s.io/docs/restore-quorum After changing the ip address in cluster.yaml and reconfiguring the changes everything seemed to be working fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

I changed the LAN IP address and now the api server doesn't ...
I was running MicroK8s on a server which had a 192.168.1.158 IP. I later moved the server to a different LAN and changed...
Read more >
I changed the IP address on my router and now can't access ...
Once a machine is in the new subnet you can then access the router again through 192.168. 0.254. It should take only a...
Read more >
How To Fix the “Server IP Address Could Not Be Found” Error
Restart your computer. Use an Incognito or private browsing window to navigate to the site.
Read more >
Changed LAN ip address after powerdown/reboot
Situation: Router from my ISP in bridge mode, so basically a modem, connected by wire on a Nest Wifi with 4 AP's troughout...
Read more >
How to Easily Fix the "Server IP Address Could Not Be Found ...
How to Easily Fix the "Server IP Address Could Not Be Found" Google Chrome Error · In the Start menu, search for Command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found