Skip to content

NBD Server connection timeout #245

@Dyadya-Sasha

Description

@Dyadya-Sasha

Hello everyone!
I have faced the issue couldn't find solution for :(

I tried to perform remote backup
virtnbdbackup -U qemu+ssh://root@infra1/system --ssh-user root -d net_mon -o /home/libvirt/VM/backups/net_mon/

And then it stucks on setting connection to nbd-server

[2025-01-31 20:14:04] INFO fs fs - thaw [main]:  Thawed [1] filesystems.
[2025-01-31 20:14:04] INFO nbd client - connect [vda]:  Waiting until NBD server at [nbd://infra1:10809/vda] is up.
[2025-01-31 20:14:05] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 0 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:06] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 1 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:07] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 2 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:08] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 3 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:09] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 4 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:10] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 5 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:11] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 6 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:12] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 7 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:13] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 8 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:14] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 9 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:15] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 10 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:16] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 11 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:17] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 12 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:18] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 13 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:19] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 14 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:20] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 15 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:21] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 16 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:22] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 17 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:23] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 18 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:24] INFO nbd client - connect [vda]:  Waiting for NBD Server connection, Retry: 19 [Unable to connect nbd server: nbd_connect_uri: recv: Connection refused (ECONNREFUSED)]
[2025-01-31 20:14:25] ERROR root virtnbdbackup - main [main]:  Disk backup failed: [NBD endpoint: [TCP(exportName='vda', metaContext='', hostname='infra1', tls=False, port=10809, backupSocket='')]: connection failed: [Timeout during connection to NBD server backend.]]

okay, even it is not written in manual, but probably I have to install nbd-server on the remote host
Here is config of NBD on remote

root@infra1:/home/g10# cat /etc/nbd-server/config 
[generic]
# If you want to run everything as root rather than the nbd user, you
# may either say "root" in the two following lines, or remove them
# altogether. Do not remove the [generic] section, however.
        user = nbd
        group = nbd
        includedir = /etc/nbd-server/conf.d
        listen = 12.122.22.86:10809

# What follows are export definitions. You may create as much of them as
# you want, but the section header has to be unique.
[export_kek]
exportname = /home/libvirt/VM/images/net_mon.qcow2

And if I start nbd server on remote and try to execute backup command again, then I have

2025-01-31 20:16:44] INFO fs fs - thaw [main]:  Thawed [1] filesystems.
[2025-01-31 20:16:44] ERROR root job - start [main]:  Failed to start backup: [internal error: unable to execute QEMU command 'nbd-server-start': Failed to find an available port: Address already in use]

So what should I do?

OS: UBUNTU 22.04
VIRTNDBBACKUP VERSION: 2.18-1

Describe the solution you'd like
A clear and concise description of what you want to happen.

I would expect that remote backup is done and presented in specified folder on local host

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions