Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbd-client connects to wrong port #172

Closed
hartmark opened this issue Sep 29, 2024 · 3 comments
Closed

nbd-client connects to wrong port #172

hartmark opened this issue Sep 29, 2024 · 3 comments

Comments

@hartmark
Copy link

I was trying to replicate #169 using latest from master branch.

I noticed that nbd-client have an issue where the port number is ignored.

First I startup my server:
sudo ./nbd-server localhost:31488 /srv/nbd/hej.img -C foo --copy-on-write -d

Then I use this to connect:
sudo ./nbd-client -name foo localhost 31488 /dev/nbd3

Noting is outputted in the server. But!! nbdkit which I have switched to instead that is listening on the default 10809 port outputs this:

Sep 29 23:46:57 staropramen nbdkit[694634]: nbdkit: debug: accepted connection
Sep 29 23:46:57 staropramen nbdkit[694634]: nbdkit: ondemand[18]: debug: ondemand: preconnect
Sep 29 23:46:57 staropramen nbdkit[694634]: nbdkit: ondemand[18]: debug: newstyle negotiation: flags: global 0x3
Sep 29 23:46:57 staropramen nbdkit[694634]: nbdkit: ondemand[18]: debug: newstyle negotiation: client flags: 0x3
Sep 29 23:46:57 staropramen nbdkit[694634]: nbdkit: ondemand[18]: debug: newstyle negotiation: NBD_OPT_GO: client requested export 'foo'
Sep 29 23:46:57 staropramen nbdkit[694634]: nbdkit: ondemand[18]: debug: ondemand: open readonly=0 exportname="foo" tls=0

Another question: How do I specify the exportname that should be used when I'm running nbd-server without any config-file?

@hartmark
Copy link
Author

Also is it possible to get more debug output from nbd-client and nbd-server commands?

@yoe
Copy link
Member

yoe commented Dec 20, 2024

When specifying an export on the command line, the syntax is "host@port", not "host:port".

Note that specifying exports on the command line is deprecated though.

@yoe yoe closed this as completed Dec 20, 2024
@hartmark
Copy link
Author

Aha, didn't see your use @ for delimiter, : is most common though.

What do you mean it's deprecated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants