abbbi / virtnbdbackup

Backup utility for Libvirt / qemu / kvm supporting incremental and differential backups + instant recovery (agentless).
http://libvirtbackup.grinser.de/
GNU General Public License v3.0
330 stars 46 forks source link

Remote Backup Error #115

Closed aitoraall closed 1 year ago

aitoraall commented 1 year ago

when i have a remote backup a have this error but in local its fine. I have installed in centos 8.

usr/local/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6. from cryptography.hazmat.backends import default_backend [2023-06-01 19:25:59] INFO lib common - printVersion [MainThread]: Version: 1.9.23 Arguments: /usr/local/bin/virtnbdbackup -U qemu+ssh://root@192.168.5.2/system --ssh-user root -d SRV-PLEX -o /tmp/backupset [2023-06-01 19:25:59] INFO root virtnbdbackup - main [MainThread]: Backup level: [copy] root@192.168.5.2's password: [2023-06-01 19:26:03] INFO virt client - _connect [MainThread]: Connected to remote host: [ahcentos], local host: [ahbck] [2023-06-01 19:26:03] INFO root virtnbdbackup - main [MainThread]: Libvirt library version: [9003000] [2023-06-01 19:26:03] INFO root virtnbdbackup - main [MainThread]: Backup will save [1] attached disks. [2023-06-01 19:26:03] INFO root virtnbdbackup - main [MainThread]: Concurrent backup processes: [1] [2023-06-01 19:26:03] INFO root checkpoint - redefine [MainThread]: Loading checkpoint list from: [/tmp/backupset/checkpoints] [2023-06-01 19:26:03] INFO root checkpoint - create [MainThread]: Checkpoint handling. [2023-06-01 19:26:03] INFO ssh client - connect [MainThread]: Connecting remote system [ahcentos] via ssh, username: [root] [2023-06-01 19:26:03] ERROR ssh client - connect [MainThread]: [Errno -2] Name or service not known Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/virtnbdbackup-1.9.23-py3.6.egg/libvirtnbdbackup/ssh/client.py", line 69, in connect timeout=5000, File "/usr/local/lib/python3.6/site-packages/paramiko/client.py", line 377, in connect to_try = list(self._families_and_addresses(hostname, port)) File "/usr/local/lib/python3.6/site-packages/paramiko/client.py", line 203, in _families_and_addresses hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM File "/usr/lib64/python3.6/socket.py", line 745, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known [2023-06-01 19:26:03] WARNING lib common - sshSession [MainThread]: Failed to setup SSH connection: [Unknown exception occurred: [Errno -2] Name or service not known] [2023-06-01 19:26:03] ERROR root virtnbdbackup - main [MainThread]: Remote backup detected but ssh session setup failed

abbbi commented 1 year ago

sshSession [MainThread]: Failed to setup SSH connection: [Unknown exception occurred: [Errno -2] Name or service not known]

please check your DNS settings, seems like the remote host "ahcentos" fails to forward/reverse lookup correctly. As it fails during getaddrinfo i guess its reverse lookup which fails.

aitoraall commented 1 year ago

Hi I resolved the problem configuring a dns but now i have another problem

i don´t have another connection

2:54] INFO root virtnbdbackup - main [MainThread]: Backup level: [auto] [2023-06-03 11:22:54] INFO root virtnbdbackup - main [MainThread]: Compression enabled, level [16] [2023-06-03 11:22:54] INFO root virtnbdbackup - main [MainThread]: Backup mode auto, target folder is empty: executing full backup. [2023-06-03 11:22:54] INFO virt client - _connect [MainThread]: Connected to remote host: [bilbaon.ah.local], local host: [ahbck.ah.local] [2023-06-03 11:22:54] INFO root virtnbdbackup - main [MainThread]: Libvirt library version: [9003000] [2023-06-03 11:22:54] INFO root virtnbdbackup - main [MainThread]: Backup will save [1] attached disks. [2023-06-03 11:22:54] INFO root virtnbdbackup - main [MainThread]: Concurrent backup processes: [1] [2023-06-03 11:22:54] INFO root checkpoint - redefine [MainThread]: Loading checkpoint list from: [/media/PLEX-PFSENSE/checkpoints] [2023-06-03 11:22:54] INFO root checkpoint - create [MainThread]: Checkpoint handling. [2023-06-03 11:22:54] INFO root checkpoint - create [MainThread]: Using checkpoint name: [virtnbdbackup.0]. [2023-06-03 11:22:54] INFO ssh client - connect [MainThread]: Connecting remote system [bilbaon.ah.local] via ssh, username: [root]

[2023-06-03 11:22:55] INFO paramiko.transport transport - _log [Thread-1]: Authentication (publickey) successful! [2023-06-03 11:22:55] INFO root virtnbdbackup - main [MainThread]: Remote: NDB Endpoint socket: [bilbaon.ah.local:/var/tmp/virtnbdbackup.15563] [2023-06-03 11:22:55] INFO root virtnbdbackup - main [MainThread]: Temporary scratch file target directory: [/var/tmp] [2023-06-03 11:22:55] INFO root virtnbdbackup - startBackupJob [MainThread]: Starting backup job. [2023-06-03 11:22:55] WARNING fs fs - freeze [MainThread]: Argumento sin soporte: Agente de huésped QEMU no está configurado [2023-06-03 11:22:55] ERROR root virtnbdbackup - startBackupJob [MainThread]: Failed to start backup: [error interno: no es posible ejecutar el comando QEMU 'nbd-server-start': Failed to find an available port: Address already in use] [root@ahbck ~]#

abbbi commented 1 year ago

Failed to start backup: [error interno: no es posible ejecutar el comando QEMU 'nbd-server-start': Failed to find an available port: Address already in use]

it seems libvirt/qemu is unable to start the NBD Service for the data transport because "failed to find an available port", thats pretty strange, might be related to DNS too (if it fails to find the address to bind to)

Try with option -v to get more debug log output so we can see which address/port is attempted to use, or check libvirt/qemu related logfiles.

Note that you need to specify a unique --nbd-port option if you run multiple backups from a remote system at the same time.

abbbi commented 1 year ago

no reply in 2 weeks, closing