** Description changed: [ Impact ] nbdtab uses a port of 0 by default which is not sensible. This means that if you do not set a default port in nbdtab, it will fail. You will see an error such as: Error: Socket failed: Connection refused - [ Test Plan ] $ lxc launch ubuntu:noble n-vm --vm $ lxc shell n-vm # apt update -y && apt install -y nbd-client nbd-server # dpkg -s nbd-client | grep Version: Version: 1:3.26.1-1build1 # modprobe nbd # truncate -s 1T /vol-0.img # cat > /etc/nbd-server/conf.d/exports.conf << _EOF_ [vol0] exportname = /vol-0.img _EOF_ # systemctl restart nbd-server.service Verify that NBD is working properly: # nbd-client localhost /dev/nbd0 -name vol0 It should work. To clean it up: # nbd-client -d /dev/nbd0 Now, trigger the problem: # cat >> /etc/nbdtab << _EOF_ nbd0 localhost vol0 _EOF_ # nbd-client nbd0 You should see the error: # nbd-client nbd0 Error: Socket failed: Connection refused Test the fix: # add-apt-repository -y ppa:mitchdz/lp2060745-nbd-port-fix # apt update -y && apt upgrade -y # dpkg -s nbd-client | grep Version: Version: 1:3.26.1-1ubuntu0.1~noble1 # nbd-client -d /dev/nbd0 < no errors here> + + [ Where problems could occur ] + * This changes the default port, so issues using custom ports could arise. This seems unlikely since it is a one line change that should get overridden.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2060745 Title: nbd-client fails to connect Error: Socket failed: Connection refused To manage notifications about this bug go to: https://bugs.launchpad.net/nbd/+bug/2060745/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
