error fetching datastores because PBS id down

miran

New Member
Nov 25, 2022
5
0
1
Hi,

how should I reconfigure the PVE to get rid of the "pve pvestatd[5613]: pbs-remote: error fetching datastores - 500 Can't connect to 192.168.110.82:8007 (Connection timed out)" messages in the syslog? The pbs-remote server is always down except for the nightly backup session.
 
you'd need to disable it while it's down (e.g., using a hookscript)
 
  • Like
Reactions: miran
I've the same problem with flooding the syslog.
How to disabling this message in Syslog with the hookscript?
I've no clue.
 
you don't disable the message, you disable the storage ;) there's plenty of hits for exactly this here on the forum..
 
could't find the plenty of hints, but I got it working anyway. In my hook-script for starting and shutdown the PBS i just add:
pvesm set $storeid --disable 0 for enabling the Storage and
pvesm set $storeid --disable 1 for disabling the Storage.

here the full hock-script if some one is interested:
Code:
  GNU nano 5.4                                   /usr/local/bin/vzdump-hook-script *
#!/bin/bash
# script um den Backupserver zu starten wenn ein Backup ansteht. Danach wieder Ausschalten
# dieses Hook-Skript zum Backup-Auftrag hinzufügen: nano /etc/pve/jobs.cfg
# by AME 05/2023
#----------------------- Variablen --------------------------------------------------------------------------------#
PATH=/usr/sbin:${PATH}
# SET-X damit die Ausfuehrung protokolliert wird
# set -x
storeid=BackupServer                                            # Variable - um welches storage handelt es sich
mac="aa:bb:cc:dd:ee:ff"                                         # MAC Adresse des PBS-Servers
host="192.168.xxx.xxx"                                          # Hostname oder IP des PBS-Servers
nic=eno1                                                        # Netzwerk-Karte über die WOL läuft

#----------------------- Programmablauf ---------------------------------------------------------------------------#
if [ "$1" == "job-init" ]; then                                 # wenn ein backup job rein kommt dann
        pvesm set $storeid --disable 0                          # der Storage wir enabled
        etherwake -i $nic  $mac                                 # starte den Backup-server
        sleep 10s
#        ping  $host -c 3 < /dev/null &

until [ "$act" == "true" ]                                      # arbeite die loop-schleife ab bis die variable "ack" wahr ist
do
    com=$(pvesm status --storage $storeid | tail -1);           # Abfrage über den Status des Storage
    [[ "$com" =~ ($storeid+ +)(pbs+ +)(active|inactive) ]];

    if [ "${BASH_REMATCH[3]}" == "active" ]; then               # der server ist erreichbar also aktiv?
        echo "Backup-Server ist erreichbar"
        act=true                                                # variable "act" wirt wahr um aus dem loop raus zukommen
        sleep 6s
        exit 0
    else
        ((c=c+1))                                               # counter
    fi

    if [ $c == 180 ]; then                                      # wenn der server nach 180 sec. nicht erreichbar ist exit 1 e>
        echo "ERROR Backup-Server ist nicht erreich bar"
        sleep 2s
        exit 1
    fi
    sleep 1s
done
fi

if [ "$1" == "job-end" ]; then                                  # Wenn der Backup Job erledigt ist dann
        echo "Backup erledigt, warte 20 Sekunden dann wird der Backup-Server gestoppt"
        sleep 20s
        pvesm set $storeid --disable 1                          # der Storage wir disabled, sonst ist er nicht erreichbar und>
        ssh root@$host -p 22 "poweroff < /dev/null &"           # der Backupserver wird heruntergefahren
fi

exit 0
 
  • Like
Reactions: miran

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!