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.

Cannot connect worker node to master

See original GitHub issue

Summary

I have single-node microk8s instance. Status on it:

microk8s is running high-availability: no datastore master nodes: 10.10.20.20:19001 datastore standby nodes: none addons: enabled: dashboard # (core) The Kubernetes dashboard dns # (core) CoreDNS ha-cluster # (core) Configure high availability on the current node helm3 # (core) Helm 3 - Kubernetes package manager ingress # (core) Ingress controller for external access metrics-server # (core) K8s Metrics Server for API access to service metrics rbac # (core) Role-Based Access Control for authorisation disabled: …

Firewall disabled.

Also i installed new worker node with:

microk8s is running high-availability: no datastore master nodes: 127.0.0.1:19001 datastore standby nodes: none addons: enabled: dns # (core) CoreDNS ha-cluster # (core) Configure high availability on the current node helm3 # (core) Helm 3 - Kubernetes package manager rbac # (core) Role-Based Access Control for authorisation disabled: …

When i make microk8s join 10.10.20.20:25000/<redacted> --worker command on worker node i got:

Contacting cluster at 10.10.20.20 Traceback (most recent call last): File “/snap/microk8s/4175/scripts/cluster/join.py”, line 993, in <module> join(prog_name=“microk8s join”) File “/snap/microk8s/4175/usr/lib/python3/dist-packages/click/core.py”, line 722, in call return self.main(*args, **kwargs) File “/snap/microk8s/4175/usr/lib/python3/dist-packages/click/core.py”, line 697, in main rv = self.invoke(ctx) File “/snap/microk8s/4175/usr/lib/python3/dist-packages/click/core.py”, line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File “/snap/microk8s/4175/usr/lib/python3/dist-packages/click/core.py”, line 535, in invoke return callback(*args, **kwargs) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 986, in join join_dqlite(connection_parts, verify, worker) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 762, in join_dqlite join_dqlite_worker_node(info, master_ip, master_port, token) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 846, in join_dqlite_worker_node update_cert_auth_kubeproxy(token, info[“ca”], master_ip, master_port, hostname_override) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 423, in update_cert_auth_kubeproxy cert = get_client_cert(master_ip, master_port, “kube-proxy”, proxy_token, “system:kube-proxy”) File “/snap/microk8s/4175/scripts/cluster/join.py”, line 277, in get_client_cert subprocess.check_call(cmd_cert.split(), stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) File “/snap/microk8s/4175/usr/lib/python3.6/subprocess.py”, line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command ‘[’/snap/microk8s/4175/usr/bin/openssl’, ‘req’, ‘-new’, ‘-sha256’, ‘-key’, ‘/var/snap/microk8s/current/certs/kube-proxy.key’, ‘-out’, ‘/var/snap/microk8s/current/certs/kube-proxy.csr’, ‘-subj’, ‘/CN=system:kube-proxy’]’ returned non-zero exit status 1.

In journal on master node i see: microk8s.daemon-cluster-agent[189902]: 2022/12/05 07:50:37 POST 200 "/cluster/api/v2.0/join" 2112 bytes in 833.686178ms

Both servers - Centos7 with OpenSSL 1.0.2k-fips

How i can connect my worker node to master node? Please, help.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MonkzCodecommented, Dec 6, 2022

Figured out, I had to execute the command openssl rand -out .rnd 16 then i used Your, @neoaggelos , suggestion with my path to openssl.cnf. After that worker node successfully connected to master. HUGE thanks for Your support!

0reactions
MonkzCodecommented, Dec 6, 2022

@neoaggelos , i searched for default and found it only in /etc/pki/tls/openssl.cnf (except /var/lib/snap/ directories, there are several dirs with openssl.cnf) Tried with your suggestion - no luck, even with export OPENSSL_CONF=/etc/pki/tls/openssl.cnf. The error is: Can't load /root/.rnd into RNG 140480045253632:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd

Read more comments on GitHub >

github_iconTop Results From Across the Web

spark worker not connecting to master - Stack Overflow
Have you set the SPARK_MASTER_HOST variable to the IP address of the master node? If not try to set it and restart the...
Read more >
Not able to join node to Master - Discuss Kubernetes
Hello, I am not able to join Node to Kubernetes master. ... of the api server: abort connecting to API servers after timeout...
Read more >
Worker nodes not connecting to controllers · Issue #53 - GitHub
Something is wrong with the hostname setup of my worker node it seems. It can't get a valid IP for itself.
Read more >
worker connect to master failed - Google Groups
While starting Spark on cluster, I found that I could't connect the worker node to the master. I started the master with "./run...
Read more >
How to Fix Kubernetes 'Node Not Ready' Error - Komodor
Node Not Ready error indicates a machine in a K8s cluster that cannot run pods. Learn about the causes of this problem and...
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