Skip to main content

How to fix Kubernetes Cluster Error IP:6443 , localhost:8080 was refused

First issue was IP:6443 was refused.

Recently I build kubernetes 3 nodes clusters and forget to change IP as static. After a few days the master node IP was changed and I received the following error while running kubectl command.

myo@master-node:~$ kubectl get nodes

The connection to the server 192.168.1.132:6443 was refused - did you specify the right host or port?

I found the following command solved the issue.

sudo -i

swapoff -a

exit

strace -eopenat kubectl version

Here is the result.

myo@master-node:~$ sudo -i

root@master-node:~# swapoff -a

root@master-node:~# exit

logout

myo@master-node:~$ strace -eopenat kubectl version

openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size", O_RDONLY) = 3

openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3

Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.5", GitCommit:"e6503f8d8f769ace2f338794c914a96fc335df0f", GitTreeState:"clean", BuildDate:"2020-06-26T03:47:41Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.5", GitCommit:"e6503f8d8f769ace2f338794c914a96fc335df0f", GitTreeState:"clean", BuildDate:"2020-06-26T03:39:24Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

+++ exited with 0 +++

myo@master-node:~$ kubectl cluster-info

Kubernetes master is running at https://192.168.1.132:6443

KubeDNS is running at https://192.168.1.132:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy


To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

myo@master-node:~$

For second issue was with localhost:8080 was refused.

If you received the following error, "The connection to the server localhost:8080 was refused - did you specify the right host or port?"

Try the following command. 

mkdir -p $HOME/.kube

sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

sudo chown $(id -u):$(id -g) $HOME/.kube/config




Comments

Popular posts from this blog

Fixing Acer Aspire Z3-605 All-in-one speaker buzzing noise - Part 1

 My Acer Aspire Z3-605 AIO PC speaker has buzzing noise. So I decided to replace the speaker. Unscrew 8 screw from the back side. Total 8 screw at back side Pry up starting from below silver color area. Take out speaker You can see the vibrating membrane or sound film has melted. I search in ebay and the price is about USD $19. So I decided to open and see whether I can just replace the speaker only.  The size of the speaker is 24mm diameter and 10mm thickness. I don't see any label or model no on the back side. I search in google about the wattage of the speaker found it's 3 watts. Then I measured with multimeter and it's 4 ohm. So I searched in China site and found the speaker about SGD $2.  So I just purchased 2 pieces and approximately 2 weeks time to reach to Singapore.  To be continued

Unable to launch IPMI with Java version 1.8.131

I have issue with launching IPMI after java JRE version update 1.8.131. "Error: unsigned application requesting unrestricted access to system the following resource is signed with a weak signature algorithm MD5withRSA and is treated as unsigned" The resolution is you can comment out java.security under C:\Program Files\Java\jre1.8.0_131\lib\security #jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 you will able to launch JNLP file without issue.

Building cheap SAN storage for home lab VMware ESXi - Part 2

After the setup has completed, I need to choose which storage software to be used such as FreeNAS, Openfiler , MS iSCSI Software Initiator, StarWind Virtual SAN software etc. I prefer to use FreeNAS but the HP dc7900 do not have ECC RAM. I decided to test StarWind Virtual San with Windows Server 2012. So I installed Windows Server 2012 on the 2.5" 160GB HDD and installed StarWind VirtualSan on that. After that download HP Smart Array software to configure the RAID. I've configure 4 x 146GB SAS HDD to RAID 0 and the space become 584GB of logical drive. I've downloaded CrystalDiskMark software and tested the speed for the SAS HDD RAID 0 with HP Smart Array P410 with 512MB cache. The result is .