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

Re: [Nbd] nbd-server premature disconnect after previous failure



On Fri, Oct 10, 2014 at 11:31:27AM +0200, Juan Antonio Martinez wrote:
> 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

Interesting. I'll look at it.

> 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:
[...]

This is unrelated. One is for IPv4, the other is for IPv6. This is a
minor bug that I intend to fix at some point, but it shouldn't do much
harm.

-- 
It is easy to love a country that is famous for chocolate and beer

  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26



Reply to: