[Megoldva] PVE szétesett hostnév változás után

Fórumok

Segítsetek kérlek összerakni az otthoni Proxmox szerveremet. Volt egy domainem, amit megszüntettem. Erre mutatott a PVE host fájlja is. Így a zslaszlo.hu helyett lett zslaszlo.local Átírtam a 

  • /etc/hosts és
  • /etc/hostname

állományok tartalmát de sajnos a restart után sem a webes felületet sem a virtuális gépeket nem érem el.

cat /etc/hosts
#92.43.203.150 zslaszlo.hu
192.168.5.153 zslaszlo.local
127.0.0.1 localhost.localdomain localhost

cat /etc/hostname
zslaszlo.local

És akkor a lényeg:

# qm list
ipcc_send_rec[1] failed: Connection refused
ipcc_send_rec[2] failed: Connection refused
ipcc_send_rec[3] failed: Connection refused
Unable to load access control list: Connection refused


# systemctl status pveproxy.service
● pveproxy.service - PVE API Proxy Server
     Loaded: loaded (/lib/systemd/system/pveproxy.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2024-04-02 11:29:35 CEST; 14min ago
    Process: 1119 ExecStartPre=/usr/bin/pvecm updatecerts --silent (code=exited, status=111)
    Process: 1121 ExecStart=/usr/bin/pveproxy start (code=exited, status=0/SUCCESS)
   Main PID: 1122 (pveproxy)
      Tasks: 4 (limit: 18967)
     Memory: 203.9M
        CPU: 33.412s
     CGroup: /system.slice/pveproxy.service
             ├─1122 pveproxy
             ├─1755 pveproxy worker
             ├─1756 pveproxy worker
             └─1757 pveproxy worker

Apr 02 11:43:42 zslaszlo.local pveproxy[1753]: worker exit
Apr 02 11:43:42 zslaszlo.local pveproxy[1754]: worker exit
Apr 02 11:43:42 zslaszlo.local pveproxy[1122]: worker 1753 finished
Apr 02 11:43:42 zslaszlo.local pveproxy[1122]: starting 1 worker(s)
Apr 02 11:43:42 zslaszlo.local pveproxy[1122]: worker 1756 started
Apr 02 11:43:42 zslaszlo.local pveproxy[1122]: worker 1754 finished
Apr 02 11:43:42 zslaszlo.local pveproxy[1122]: starting 1 worker(s)
Apr 02 11:43:42 zslaszlo.local pveproxy[1122]: worker 1757 started
Apr 02 11:43:42 zslaszlo.local pveproxy[1756]: /etc/pve/local/pve-ssl.key: failed to load local private key (key_file o>
Apr 02 11:43:42 zslaszlo.local pveproxy[1757]: /etc/pve/local/pve-ssl.key: failed to load local private key (key_file o>

pvecm status
ipcc_send_rec[1] failed: Connection refused
ipcc_send_rec[2] failed: Connection refused
ipcc_send_rec[3] failed: Connection refused
Unable to load access control list: Connection refused

Most ssh-n elérem a szervert, de más szolgáltatásokat nem.

Minden segítséget köszönök!

Hozzászólások

Szerkesztve: 2024. 04. 02., k – 12:08

A /etc/pve/local/pve-ssl.key fájllal mi a helyzet? Mert arra panaszkodik, bár pont a lényeg nem látszik a "normál" szélességű terminálkimenetből... Egyébként meg ha 192.168.0.0/16, akkor nem mindegy, hogy mi a domain? Na mindegy...

 

Ja, és hostnevet "hostnamectl set-hostname amitakarsz" módon cserélj.

Hát pontosan ez az! Az a /etc/pve könyvtár üres. És nem tudom újra generálni sem a certeket. És a cluster file system is inkonzisztens lehet valahol.

# pmxcfs
[main] crit: Unable to get local IP address

Én is azt hittem, hogy mindegy a domain, ha úgyis az otthoni subnetben van, de ezek szerint mégsem...

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

Töröld a hosts fileból a 127.0.0.1-es sort és indítsd újra a pve-cluster service-t (systemctl stop pve-cluster  majd  systemctl start pve-cluster)

https://forum.proxmox.com/threads/etc-pve-folder-is-empty.108034/

https://forum.proxmox.com/threads/etc-pve-is-empty.12953/

Kikommenteltem a sort, sőt kikommenteltem az ipv6-os bejegyzéseket is, ahogyan javasolták a linkelt fórumszálban. Sajnos nem sikerült.

systemctl start pve-cluster
Job for pve-cluster.service failed because the control process exited with error code.
See "systemctl status pve-cluster.service" and "journalctl -xe" for details.

# systemctl status pve-cluster.service
● pve-cluster.service - The Proxmox VE cluster filesystem
     Loaded: loaded (/lib/systemd/system/pve-cluster.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2024-04-02 12:57:45 CEST; 10s ago
    Process: 1379 ExecStart=/usr/bin/pmxcfs (code=exited, status=255/EXCEPTION)
        CPU: 10ms

Apr 02 12:57:45 zslaszlo.local systemd[1]: pve-cluster.service: Scheduled restart job, restart counter is at 5.
Apr 02 12:57:45 zslaszlo.local systemd[1]: Stopped The Proxmox VE cluster filesystem.
Apr 02 12:57:45 zslaszlo.local systemd[1]: pve-cluster.service: Start request repeated too quickly.
Apr 02 12:57:45 zslaszlo.local systemd[1]: pve-cluster.service: Failed with result 'exit-code'.
Apr 02 12:57:45 zslaszlo.local systemd[1]: Failed to start The Proxmox VE cluster filesystem.

Most ugye a javaslatok szerint be kellene chrootolnom rescue módban és ott javítani. A probléma csupán az, hogy a szerver abszolút headless, még egy árva billentyűzet sincs rádugva nemhogy monitor. Sőt idehaza nincs is monitorom...

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

"Most ugye a javaslatok szerint be kellene chrootolnom rescue módban és ott javítani." - A host környezet megy, a proxmox+corosync lett megdöglesztve. Ilyenkor vagy visszarakod a módosítás előtti mentést (amiben mindaz ott van, ami a rendszer működéséhez kell), vagy kireszeled a corosync-et...

Mert _nem_ csak a hosts -fájlban van, hanem a corosync is döglik (pontosabban khm. erősen ellenjavallt alatta hostnevet cserélni) tőle. De ott van a dorsy által adott linken: először rá kell venni,hogy quorum nélkül is elinduljon, utána pedig a corosync konfigot kell kireszelned. Egy egrep -R "92.43.203.150|zslaszlo.hu" /etc/ mit mutat egyébként?

Az ugye nem sokat mutat, mert azt szüntettem meg. De itt a kimenet:

# egrep -R "92.43.203.150|zslaszlo.hu" /etc/
grep: /etc/cron.d/vzdump: No such file or directory
grep: /etc/aliases.db: binary file matches
grep: /etc/runit/runsvdir/default/ssh/supervise: No such file or directory
grep: /etc/runit/runsvdir/default/ssh/log/supervise: No such file or directory
/etc/hosts:#92.43.203.150 zslaszlo.hu
/etc/hosts:#2a01:36d:1400:782:7c9d:5511:7f41:6806       zslaszlo.hu
grep: /etc/sv/ssh/supervise: No such file or directory
grep: /etc/sv/ssh/log/supervise: No such file or directory
/etc/nginx/conf.d/proxmox.conf:    server home.zslaszlo.hu;
grep: /etc/ssh/ssh_known_hosts: No such file or directory
root@zslaszlo:~# egrep -R "192.168.5.153|zslaszlo.local" /etc/

Ám az aktuális ip-hostname párosra ezt írja:

# egrep -R "192.168.5.153|zslaszlo.local" /etc/
/etc/hostname:zslaszlo.local
/etc/hostname:192.168.5.153
grep: /etc/cron.d/vzdump: No such file or directory
/etc/network/interfaces:        address 192.168.5.153/24
grep: /etc/network/run/ifstatenew: binary file matches
/etc/network/bak.interfaces.bak:        address 192.168.5.153/24
/etc/postfix/main.cf:myhostname=zslaszlo.local
grep: /etc/runit/runsvdir/default/ssh/supervise: No such file or directory
grep: /etc/runit/runsvdir/default/ssh/log/supervise: No such file or directory
/etc/hosts:192.168.5.153 zslaszlo.local
grep: /etc/sv/ssh/supervise: No such file or directory
grep: /etc/sv/ssh/log/supervise: No such file or directory
grep: /etc/ssh/ssh_known_hosts: No such file or directory

 

először rá kell venni,hogy quorum nélkül is elinduljon, utána pedig a corosync konfigot kell kireszelned

Ha jól nézem, ehhez kellene a rescue mód és a chroot. Ami headless módban ugye nem nagyon kivitelezhető...

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

Bocsánat, itt a "teljes szélességű" kimenet, hátha segít valamit. Nekem sajnos nem sokat segít...

systemctl status pveproxy.service
● pveproxy.service - PVE API Proxy Server
     Loaded: loaded (/lib/systemd/system/pveproxy.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2024-04-02 12:52:09 CEST; 14min ago
    Process: 1089 ExecStartPre=/usr/bin/pvecm updatecerts --silent (code=exited, status=111)
    Process: 1091 ExecStart=/usr/bin/pveproxy start (code=exited, status=0/SUCCESS)
   Main PID: 1092 (pveproxy)
      Tasks: 4 (limit: 18967)
     Memory: 203.3M
        CPU: 33.678s
     CGroup: /system.slice/pveproxy.service
             ├─1092 pveproxy
             ├─1773 pveproxy worker
             ├─1774 pveproxy worker
             └─1775 pveproxy worker

Apr 02 13:06:55 zslaszlo.local pveproxy[1092]: starting 2 worker(s)
Apr 02 13:06:55 zslaszlo.local pveproxy[1092]: worker 1773 started
Apr 02 13:06:55 zslaszlo.local pveproxy[1092]: worker 1774 started
Apr 02 13:06:55 zslaszlo.local pveproxy[1773]: /etc/pve/local/pve-ssl.key: failed to load local private key (key_file or key) at /usr/share/perl5/PVE/APIServer/AnyEvent.pm line 1998.
Apr 02 13:06:55 zslaszlo.local pveproxy[1774]: /etc/pve/local/pve-ssl.key: failed to load local private key (key_file or key) at /usr/share/perl5/PVE/APIServer/AnyEvent.pm line 1998.
Apr 02 13:06:55 zslaszlo.local pveproxy[1767]: worker exit
Apr 02 13:06:55 zslaszlo.local pveproxy[1092]: worker 1767 finished
Apr 02 13:06:55 zslaszlo.local pveproxy[1092]: starting 1 worker(s)
Apr 02 13:06:55 zslaszlo.local pveproxy[1092]: worker 1775 started
Apr 02 13:06:55 zslaszlo.local pveproxy[1775]: /etc/pve/local/pve-ssl.key: failed to load local private key (key_file or key) at /usr/share/perl5/PVE/APIServer/AnyEvent.pm line 1998.

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

Sajnos mivel üres az /etc/pve könyvtáram, így a corosync.conf fájlomat sem látom...

# systemctl status corosync
● corosync.service - Corosync Cluster Engine
     Loaded: loaded (/lib/systemd/system/corosync.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
  Condition: start condition failed at Tue 2024-04-02 12:09:36 CEST; 9min ago
             └─ ConditionPathExists=/etc/corosync/corosync.conf was not met
       Docs: man:corosync
             man:corosync.conf
             man:corosync_overview

Apr 02 11:29:33 zslaszlo.local systemd[1]: Condition check resulted in Corosync Cluster Engine being skipped.

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

Most ugyan nem segít, de eddig sem volt jó, és most ezért szívsz vele...

A zslaszlo.hu egy tartomány név, nem egy hosztnév. Ahogyan a zslaszlo.local is egy tartománynév. Mondjuk az, hogy pve.zslaszlo.hu vagy proxmox.zslaszlo.local, már egy-egy hosztnév lenne. Soha ne használd úgy, hogy csak a TLD-t (legutolsó tagot ami itt a .hu vagy .local) tekinted tartomáynak, és ami előtte van az hosztnév, mert a világ nem így működik. A tartomány az legalább egy név és a TLD a végén. Ami ezen kettő előtt van, az altartomány vagy hoszt.

Ha az /etc/pve üres, akkor nem fut a pmxcfs, ami mount-olja az sqlite config adatbázist (egy host-on vagy cluster szinten egyaránt). Azt kell elindítanod/kitalálni miért nem megy. Ahogy az /etc/pve tartalma megjön, menni fognak a szolgáltatások is, mert ott van minden konfig, cert és hozzáfésér, ami a PVE-nek kell a működéshez.

Ha ezt írod az /etc/hosts-ba, akkor szerintem el fog indulni a pmxcfs (és ekkor a /etc/hostname csak annyi legyen, hogy zslaszlo):

127.0.0.1 localhost.localdomain localhost
192.168.5.153 zslaszlo.local zslaszlo

De én azt javaslom, most adja egy rendes hosztnevet a gépnek ha már így alakult (pl. lehet pve a hosztnév és akkor pve.zslaszlo.local az FQDN és zslaszlo.local a tartomány), és ez legyen a hosts-ban utána:

127.0.0.1 localhost.localdomain localhost
192.168.5.153 pve.zslaszlo.local pve

Proxmox (Debian) rendszeren a /etc/hostname csak a hosztnevet tartalmazza a tartományt nem. Tehát ha az utóbbi példámat választod, akkor a /etc/hostname ennyi legyen:

pve

És igen! Megfogadtam a tanácsod és már van webes felületem. De ha megfogadom a javaslatod és rendes hosztnevet adok a gépnek, akkor ugye nem fogom elérni a meglévő virtuális gépeket. Akkor ugye a

connection failed Error 500: hostname lookup 'zslaszlo' failed - failed to get address info for: zslaszlo: Name or service not known 

hiba lesz, hisz előtte erre mutatott a hostname.

Mit javasolnál, állítsam vissza az első változat szerint zslaszlo-ra a hostname fájlt, vagy kezdjem el módosítgatni az egyes virtuális gépek konfigját?

 

 Soha ne használd úgy, hogy csak a TLD-t (legutolsó tagot ami itt a .hu vagy .local) tekinted tartomáynak, és ami előtte van az hosztnév, mert a világ nem így működik. A tartomány az legalább egy név és a TLD a végén. Ami ezen kettő előtt van, az altartomány vagy hoszt.

Köszönöm. Ezt most egy életre megtanultam.

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick

kozben eszembe jutott hogy ez a sima atnevezes nemlesz jo otlet, mert sok helyen lehet beirva meg a hostnev.

A pve konyvtar amugy ez: https://pve.proxmox.com/wiki/Proxmox_Cluster_File_System_(pmxcfs)

 

En visszaallitanam az eredeti neveket. majd egy node remove + atnevezes + ujneven node add mokat csinalnek a ket gepen.

Lehet meg a clustert is szet kell bontanod, es ujra epiteni: https://pve.proxmox.com/wiki/Cluster_Manager

A vegtelen ciklus is vegeter egyszer, csak kelloen eros hardver kell hozza!

Köszönöm elolvasom a wikit.

Ha megtalálnám az adatbázisfájlt, egy db editorral lehet helyre tudnám hozni kézzel. Valahol olvastam is erről, de már nem találom hol.

Szerk. Megtaláltam: 

/etc/pve is created from a userspace program pmxcfs which generates the data from /var/lib/pve-cluster/config.db

“The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use them.”

― Philip K. Dick