[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Nbd] nbd-server premature disconnect after previous failure



Hi All

Scenario: 
Ubuntu 14.04 amd64 server properly updated
using nbd client and server from distribution packages
Trying to export a 4000000000bytes (3814MB) image file

When imagefile has no proper owner/permissions, exporting fails as
expected:
... cut here ...
Oct 10 10:42:22 binubuntu14 nbd_server[13200]: connect from 127.0.0.1,
assigned file is /opt/ltsp/build/live_lab.img
Oct 10 10:42:22 binubuntu14 nbd_server[13200]: Can't open authorization
file (null) (Bad address).
Oct 10 10:42:22 binubuntu14 nbd_server[13200]: Starting to serve
Oct 10 10:42:22 binubuntu14 nbd_server[13200]: Size of exported
file/device is 4000000000
Oct 10 10:42:22 binubuntu14 nbd_server[13200]: Read failed: Permission
denied
Oct 10 10:42:22 binubuntu14 nbd_server[13200]: Exiting.
Oct 10 10:42:22 binubuntu14 nbd_server[5591]: Child exited with 1
... cut here ...

But if I fix file owner and permissions and try again to invoke
nbd-client again, nbd-server fails:

.... cut here ....
Oct 10 10:47:11 binubuntu14 nbd_server[13371]: connect from 127.0.0.1,
assigned file is /opt/ltsp/build/live_lab.img
Oct 10 10:47:11 binubuntu14 nbd_server[13371]: Can't open authorization
file (null) (Bad address).
Oct 10 10:47:11 binubuntu14 nbd_server[13371]: Starting to serve
Oct 10 10:47:11 binubuntu14 nbd_server[13371]: Size of exported
file/device is 4000000000
Oct 10 10:47:11 binubuntu14 nbd_server[13371]: Read failed: Bad file
descriptor
Oct 10 10:47:11 binubuntu14 nbd_server[13371]: Exiting.
Oct 10 10:47:11 binubuntu14 nbd_server[5591]: Child exited with 1
...... cut here ......

( notice that "/opt/ltsp/build/live_lab.img" is a symbolic link to real
file )

The only way to get server working properly is by mean of restarting
service

Not sure if related, but "nbd-client -l localhost" shows me duplicated
entries:
.... cut here ....
root@...1791...:~# nbd-client -l localhost
Negotiation: ..
i386_1404_fat
i386_1404_fat
i386_1404_thin-latest
i386_1404_thin-latest
i386_1404_thin
i386_1404_thin
swap
swap
i386_1404_fat-latest
i386_1404_fat-latest
live_lab
live_lab
opt
opt
.... cut here ....

¿Any ideas?
Thanks in advance
Juan Antonio




Reply to: