Created cluster - Node IP is 127.0.0.1

h9k

Member
Feb 22, 2014
16
0
21
Hi there!

I have two machines which are connected with a private VLAN.
I properly set up the IP in the /etc/hosts file to be 172.16.0.2, but after I created the cluster with the
Code:
pvecm create clustername
and then did
Code:
pvecm status
it says
Code:
Node addresses: 127.0.0.1
which I guess is wrong. When I try to add the other machine to the cluster I type
Code:
pvecm add 172.16.0.2
and after first accepting the ssh key (added to known hosts) I get this error:
Code:
unable to copy ssh ID
I suppose this has to do with the IP of the main node being wrong.
The question now is: how do I fix that?
 
Hi,
how looks your /etc/hosts?

I assume it's not an standard-installation? Because than should it work.
See alos in the wiki: http://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Wheezy

An correct entry looks like this:
Code:
127.0.0.1 localhost.localdomain localhost
192.168.6.177 proxmox-6-177.proxmox.com proxmox-6-177 pvelocalhost
In this case "hostname -a" shows pvelocalhost.

Udo
 
Hi Udo,

here is my /etc/hosts
127.0.0.1 localhost.localdomain localhost
172.16.0.1 nebula.fulldomain.tld nsXXXXXX.ip-XX-XX-XX.eu nebula nsXXXXXX
172.16.0.2 clavius.fulldomain.tld nsYYYYYY.ovh.net clavius nsYYYYYY

Hostname -a shows "nsXXXXXX.ip-XX-XX-XX.eu nebula nsXXXXXX" for nebula and "nsYYYYYY.ovh.net clavius nsYYYYYY" for clavius.

Both hosts have the same hosts file. The strange thing is that when I created the cluster on nebula, the IP was detected fine. But as nebula is the new server without any containers yet and clavius is production, I reset the cluster on nebula and created in on clavius. But for some reason there it got the 127.0.0.1.

I have two OVH servers which were installed with the Proxmox image from OVH. Clavius was installed with v2 and at some point upgraded to v3, Nebula is a fresh v3 install.
They are connected via VLAN over the secondary network devices and the hosts ping each other fine, also SSH connections do work.
 
Ok I did so and restarted pve-cluster, but pvecm status still says 127.0.0.1 for node IP.
 
Ok I did so and restarted pve-cluster, but pvecm status still says 127.0.0.1 for node IP.

Imho I guess it's best , if you can, to try the much simpler path of reinstalling nodes using iso installer, and provide it final ip addresses, and fqdn where asked there...

in a complex system as pve cluster there's more than /etc/hosts file to be setup.

Marco
 
Well I have production containers running on one box, I cannot just reinstall it. If the cluster was working I could migrate the containers, so I'm stuck here.
It sure must be possible to change the node IP somehow or reset something without affecting uptime of the running containers.
 
Well I have production containers running on one box, I cannot just reinstall it. If the cluster was working I could migrate the containers, so I'm stuck here.

Imho, if you really care about your production machines, don't try to play with networks setting on a cluster system you don't really know: ask before, and test before. Anyway, now you could backup/restore on working nodes, probably after having setup temporary alternative services on working nodes. (and also ask for pve paid support, if your business can't allow such alternative ways...)

Marco
 
Ok I did so and restarted pve-cluster, but pvecm status still says 127.0.0.1 for node IP.
Hi,
I assume it's goes wrong during the creation of the cluster with the missing pvelocalhost entry.
See in /etc/pve/cluster.conf which name are used.

The official way is an new installation, but there are an thread in the forum, which files are must removed to "recluster" an node.

Udo
 
Yeah I just "reclustered" the clavius node after adding pvelocalhost to /etc/hosts.
Weirdly though it still assigned 127.0.0.1 as node IP.
In /etc/pve/cluster.conf the node name is "clavius". If I ping clavius I get the correct 172.16.0.2 IP.
 
Yes, I restarted all I could find: pvebanner pve-cluster pvedaemon pve-manager pvenetcommit pveproxy pvestatd
 
No matter what I try, it just doesn't work.
Would this be something you could fix if I had a basic subscription plan?
 
Hi,

I had the same problem, I have edited /etc/hosts, /etc/pve/corosync.conf to the correct /24 address, then I have restarted corosync and pve-cluster services. I encoutered also a problem with authorized kzys already present when wanting to re-add nodes. I used pvecm add IP -force, and my cluster is now up and running.

Just in case someone encountered the same pb.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!