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.

calico-node-xxxx “Hit error connecting to datastore” in a newly setup worker node

See original GitHub issue

I want to create a multi-node cluster with two machines on the same private network. So I followed the documentation. Exeuting kubectl get nodes shows that the newly created worker node is indeed Ready.

However I can see the following error in an automatically created pod by the new worker

Hit error connecting to datastore - retry error=Get “https://10.152.183.1:443/api/v1/nodes/foo”: dial tcp 10.152.183.1:44 ││ 3: i/o timeout`

2022-04-27_123724 2022-04-27_123745

I describe this is more details here.

Output of microk8s inspect inspection-report-20220427_122038.tar.gz

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
usersinacommented, Apr 29, 2022

I finally managed to get it working! Running microk8s kubectl get nodes -o wide shows that the Internal IP being used is always the WAN ip and not the LAN one. Therefore I tried looking for a way to change the IP addresses of the nodes and workers and stumbled upon this issue.

At the end, I had to do this for all nodes

microk8s stop
# or for workers: sudo snap stop microk8s

sudo vim.tiny /var/snap/microk8s/current/args/kubelet
# Add this to bottom: --node-ip=<this-specific-node-lan-ip>

sudo vim.tiny /var/snap/microk8s/current/args/kube-apiserver
# Add this to bottom: --advertise-address=<this-specific-node-lan-ip>

microk8s start
# or for workers: sudo snap start microk8s

That said, being able to specify both --node-ip and --advertise-address through runtime envs is definitely helpful.

0reactions
usersinacommented, Jun 7, 2022

Closing the issue since this here is a direct fix for it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calico-node-xxxx "Hit error connecting to datastore" in a newly ...
Calico-node-xxxx "Hit error connecting to datastore" in a newly setup worker node ... Is this something I have to worry about? To give...
Read more >
Recently Active 'project-calico' Questions - Stack Overflow
Below is the output from ip route command in one of the worker nodes of Kubernetes ... Calico prints "Hit error connecting to...
Read more >
【kubernetes/k8s源码分析】calico node源码分析_张忠琳的博客
calico node 工作内容镜像命令start_runit#! ... Initialize a new node ... Info("Hit error connecting to datastore - retry").
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