Berto Furth
2022-Aug-18 01:34 UTC
[Samba] Problem with SO_REUSEPORT in samba v4.16 No problem in v4.14
Hi Samba folks, I have having a problem running samba v4.16.4 on my very old Linux system running kernel v2.6.35. I had no problems with version samba v4.14.6. I am getting the following error messages in my logs ../../source3/lib/util_sock.c:294(open_socket_in) open_socket_in: setsockopt(SO_REUSEPORT) failed: Protocol not available ../../source3/smbd/server.c:1097(smbd_open_one_socket) smbd_open_one_socket: open_socket_in failed: Protocol not available ../../source3/smbd/server.c:1264(open_sockets_smbd) open_sockets_smbd: No sockets available to bind to. INTERNAL ERROR: open_sockets_smbd() failed in pid 12523 (4.16.3) The issue appears to be that in earlier versions of smbd, if the SO_REUSEPORT socket option could not be set then a debug message was printed but the code would continue on. My system runs Linux v2.6.35 which does not support SO_REUSEPORT (introduced in Linux v3.3) I believe the behavior was changed in the following commit lib: Properly return errno from open_socket_in()" (Commit : 72540222c2290dc041fb01018de7febe44a4ac0d ) https://git.samba.org/?p=samba.git;a=commitdiff;h=72540222c2290dc041fb01018de7febe44a4ac0d After this commit if setting SO_REUSEPORT fails then the socket would not be setup. If I were to raise a bug asking for the old behavior back do you think it would be fixed? Thanks so much, Berto.
Andrew Bartlett
2022-Aug-18 01:57 UTC
[Samba] Problem with SO_REUSEPORT in samba v4.16 No problem in v4.14
On Thu, 2022-08-18 at 11:34 +1000, Berto Furth via samba wrote:> Hi Samba folks, > > If I were to raise a bug asking for the old behavior back do you > think it would be fixed?I've sent you an invite to our bugzilla. Feel free to report it there - if there is some reason for it not to be fixed then it can easily be closed. But I think it is more likely to just be fixed for you, and a bug is needed to do the backport, so start there. Andrew Bartlett -- Andrew Bartlett (he/him) https://samba.org/~abartlet/ Samba Team Member (since 2001) https://samba.org Samba Team Lead, Catalyst IT https://catalyst.net.nz/services/samba Samba Development and Support, Catalyst IT - Expert Open Source Solutions