FS#41823 - [nbd] Error: Server closed connection
Attached to Project:
Community Packages
Opened by Yenal (yenal) - Thursday, 04 September 2014, 15:18 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 08 October 2014, 01:49 GMT
Opened by Yenal (yenal) - Thursday, 04 September 2014, 15:18 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 08 October 2014, 01:49 GMT
|
Details
While Arch Linux documentation on nbd is scanty and other
docs are mostly out-dated, it was hard for a beginner like
me to find out why I couldnt connect to a nbd-server neither
with oldstyle nor with newstyle. The pre-packaged config
leads to errors if only the export-part is being edited,
because nbd running as "nbd-user" seems not working
correctly.
nbd-client will report: Negotiation: ..Error: Server closed connection Exiting. nbd-server will report: Spawned a child process virststyle ipliteral Child exited with 1 "ps aux | grep nbd" will report that /usr/bin/nbd-server is running as "nbd" not "root" (to start nbd-server as root I was trying it manually from command-line similar how it is written as an example in man pages > but this isnt recommended, didnt work for me and gave also errors not starting the nbd-server) Steps to reproduce: @SERVER: ------ /etc/nbd-server/config [generic] user = nbd group = nbd # oldstyle = true [testfile] exportname = /path/to/testfile # port = 12345 ------ # systemctl start nbd @CLIENT: # modprobe nbd # nbd-client <Server-IP> /dev/nbd0 -name testfile same if using oldstyle-config without #'s and: nbd-client <Server-IP> 12345 /dev/nbd0 old- and newstyle is working if nbd-server is started without user and group in config > running as root ..maybe this would work with non-root if the user and group permissions for nbd are tweaked? Additional info: pkg-version: nbd 3.8-1 configfile: /etc/nbd-server/config (probably taken from https://github.com/yoe/nbd) tested on: Arch Linux x86_64 |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Wednesday, 08 October 2014, 01:49 GMT
Reason for closing: Upstream
Wednesday, 08 October 2014, 01:49 GMT
Reason for closing: Upstream
see EXAMPLES: man 5 nbd-server
e.g.:
----
/etc/nbd-server/config:
[generic]
authfile = /etc/nbd-server/allow
[testfile]
exportname = /path/to/testfile
----
/etc/nbd-server/allow:
127.0.0.1
192.168.0.5
192.168.0.0/24
----
will not work, but commenting #authfile in config will
Upstream was corrected today, next version should provide working authfiles.