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.

Apiserver stopped working (no changes made)

See original GitHub issue

I have two clusters that have both stopped working in the same way. kubectl can’t connect to them and the apiserver is not running. One of the clusters is a single-node (inspection report comes from that one), the other has three nodes. No changes have been made to the machines where they are running.

I tried upgrading the single-node cluster from v1.21 to 1.22 without any changes. It’s not the problem from #2486, both info.yaml and cluster.yaml have the expected contents…

I don’t know why apiserver isn’t included in the inspect… This is what is says (after upgrading to 1.22, that’s why it’s 2585 here instead of 2546 in the inspect tarball that was created before the upgrade).

● snap.microk8s.daemon-apiserver.service - Service for snap application microk8s.daemon-apiserver
   Loaded: loaded (/etc/systemd/system/snap.microk8s.daemon-apiserver.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2021-10-18 11:26:40 UTC; 2 days ago
  Process: 33264 ExecStart=/usr/bin/snap run microk8s.daemon-apiserver (code=exited, status=0/SUCCESS)
 Main PID: 33264 (code=exited, status=0/SUCCESS)

Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: ++ /snap/microk8s/2585/bin/uname -m
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: + ARCH=x86_64
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: + export LD_LIBRARY_PATH=:/snap/microk8s/2585/lib:/snap/microk8s/2585/usr/lib:/snap/microk8s/2585/lib/x86_64-linux-gnu:/snap/mic
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: + LD_LIBRARY_PATH=:/snap/microk8s/2585/lib:/snap/microk8s/2585/usr/lib:/snap/microk8s/2585/lib/x86_64-linux-gnu:/snap/microk8s/2
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: + export LD_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void::/snap/microk8s/2585/lib:/snap/microk
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: + LD_LIBRARY_PATH=/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void::/snap/microk8s/2585/lib:/snap/microk8s/2585
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: + '[' -e /var/snap/microk8s/2585/var/lock/lite.lock ']'
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: + echo 'Will not run along with kubelite'
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: Will not run along with kubelite
Oct 18 11:26:40 pm-cluster microk8s.daemon-apiserver[33264]: + exit 0

inspection-report-20211018_080210.tar.gz

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
balchuacommented, Oct 25, 2021

The fix on the dqlite to have a more robust write to cluster.yaml is being merged to the different versions. That should fix the single node issue.

1reaction
balchuacommented, Oct 20, 2021

@osirisguitar thanks for reporting. Kubelite wraps most if not all kube control plane components, thats why the log you see on the apiserver says it is not starting.

Looking at the logs, it looks like dqlite isn’t starting or it is unable to find the leader. @ktsakalozos @mathieubordere any thoughts? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

apiserver: stopped - connection to the server x:8443 was refused
When then running kubectl get pods I get: The connection to the server 192.168.64.9:8443 was refused - did you specify the right host...
Read more >
Minikube apiserver stopped frequently - Stack Overflow
2 Answers 2 · Increase the amount of allocated memory and CPU to make sure it is enough for your use case. ·...
Read more >
Apiserver stopped working (on multiple installations, microk8s ...
Two of my microk8s clusters running version 1.21 just stopped working. kubectl locally returns The connection to the server 127.0. 0.1:16443 ...
Read more >
How to Make Changes to kube-apiserver - Lullabot
kube-apiserver might not restart after making changes to it. Here are some tips on how to monitor the process and fix it.
Read more >
Troubleshoot the API server endpoint of an Amazon EKS Cluster
Your cluster is stuck in the Failed state and you can't change the endpoint access setting from public to private. Note: To set...
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