How-to-create-an-UbuntuCentos-template-from-an-existing-VM-in-KVM-StackBill-CMP

How to resolve connection to the server localhost:8080 was refused?

Posted by

In this blog, we will show the steps to resolve the connection to the server localhost:8080 was refused – did you specify the right host or port error message.

INFRASTRUCTURE OVERVIEW

  • Currently we have 2 node cluster in our testing environment as shown below.

image_thumb2

  • Also, we have installed the kubernetes in our test environment. You can follow below link to install kubernetes in your end.

https://blog.stackbill.com/2023/07/30/step-by-step-to-install-2-node-kubernetes-cluster-in-cloudstack-using-ubuntu-20-04/

  • Then we restarted the master node server and try to verify the node status. It shows the below error message.

image

REASONS FOR THIS ERROR

  • First reason, is that swap memory has been disabled permanently.
  • Need to KUBECONFIG in bashrc file to load kubernetes configuration automatically even after server reboots.

TROUBLESHOOTING STEPS

  • To verify that goto, vi /etc/fstab.

image_thumb43

  • Add an hash ( # ) tag at being of swap.img line.

image_thumb45

  • Save the file and exit. Then reboot the VM.

image_thumb47

image_thumb49

  • Once the server is back to online, If you are running as root user, you have to run export KUBECONFIG=/etc/kubernetes/admin.conf command every time the master node reboots.
  • To automatic this process, type vi ~/.bashrc command.

image_thumb94

  • Go to last line of that file and add the below line and save it.

image_thumb96

  • Now you will able to access kubernetes without any issues.

image

Thank you for taking the time to read our blog on “steps to resolve the connection to the server localhost:8080 was refused – did you specify the right host or port error .” We hope you found the information valuable and insightful.

To know about Apache CloudStack Reach us.

Next Topic: How to create a Linux OS template with KVM on Ubuntu 20.04?

Leave a Reply

Your email address will not be published. Required fields are marked *