Closed ari-s closed 1 year ago
If you compile nbd-server with --enable-syslog, you should actually encounter this message in your syslog:
if(open_unix(unixsock, &gerror) == -1) { msg(LOG_ERR, "failed to setup servers: %s", gerror->message); g_clear_error(&gerror); exit(EXIT_FAILURE);
(this is line 3729 of nbd-server.c)
which should be filled out with one of these messages:
sock = socket(AF_UNIX, SOCK_STREAM, 0); if(sock < 0) { g_set_error(gerror, NBDS_ERR, NBDS_ERR_SOCKET, "failed to open a unix socket: " "failed to create socket: %s", strerror(errno)); goto out; } if(bind(sock, (struct sockaddr*)&sa, sizeof(struct sockaddr_un))<0) { g_set_error(gerror, NBDS_ERR, NBDS_ERR_BIND, "failed to open a unix socket: " "failed to bind to address %s: %s", sockname, strerror(errno)); goto out; } if(listen(sock, 10)<0) { g_set_error(gerror, NBDS_ERR, NBDS_ERR_BIND, "failed to open a unix socket: " "failed to start listening: %s", strerror(errno)); goto out; }
(in open_unix
).
Please double-check that this is the case; if not, feel free to reopen.
I will look at #122 though.
when configured with
unixsock = /run/nbd-test.sock
and the location /run/nbd-test.sock exists, nbd-server silently fails. Only when non-forkingsystemctl start nbd-server "succeeds" even though nbd-server itself isn't actually started
This is related to #122