Samba issues on a new machine

I have long had a 13.2-RELEASE machine, let's call it Current, that I have set up to use as a server for various sorts of things. One of them is that I use it as a file server via Samba (using net/samba416). It has been serving that purpose without issue for a long time (years, though maybe not always with 4.16, I guess).

I have recently set up a new 14.0-RELEASE machine, let's call it Future, and have slowly been some services from Current to Future. Today I installed Samba on Future (using net/samba419, which I think didn't exist when I set up Current), but I can't get it working well.

It works in some sense: I can get to its shared directories both from my other FreeBSD machines (including Current) and from Windows machines. I can list the contents of the shares without issue. And I can, at least sometimes, start getting the contents of a file in one of the shares. But it quickly seems to just hang, and after a long time, errors out (both via FreeBSD and Windows clients). For example, when I used smbclient on Current to get a song file (just "get", i.e. copy to the local machine), it eventually errored out with "parallel_read returned NT_STATUS_IO_TIMEOUT", and then "SMBecho failed (NT_STATUS_INVALID_NETWORK_RESPONSE). The connection is disconnected now".

When I used a media player on a Windows machine to get that same song file, it started playing the file more or less immediately, but after the first two seconds of the song, it paused; after a few more seconds it played the next two seconds of the song; thereafter it just hung again for quite some time, and eventually errored out with some vague error message that I unfortunately did not record (but I remember it didn't seem at all helpful).

I can use smbclient on Future to get stuff from Current without any problems. And I can also use smbclient on Future to get stuff from Future itself without any problems, including the specific song file mentioned above.

Other than the differences noted above (different machine, 14.0-RELEASE instead of 13.2-RELEASE, and net/samba419 instead of net/samba416), the only thing I've thought of that might have some effect is pf. I do have some specific pf rules on Current for Samba (e.g. allowing traffic on ports 139 and 455). However, I am embarrassed to admit that I do not yet have pf set up at all on Future, so unless I'm missing something, that shouldn't be the issue.

I've seen nothing in the log files that seemed interesting.

Another issue that I've noticed that I guess may or may not be related is that, at least in the past, when I ssh into Future and run some command that generates a lot of console output, the output display would frequently hang after displaying some of the output, and after a little while longer, ssh would disconnect. I could ssh in and attach to that same tmux session, and see that the entire expected output was in fact output. However, I said "at least in the past" because I recently (today? maybe yesterday?) noticed that I hadn't set up a tmux.conf for the user I was using, and copied one over from Current to Future. Since doing that, I haven't noticed such problems anymore (although like I said, I made that change recently).

Here's the "global" section of Future's smb4.conf along with the section specific for the share that the audio files are on. Other than the "server string", all settings here are the same on both Future and Current:

Code:
[global]
workgroup = WORKGROUP
server string = Future
log file = /var/log/samba4/log-%m
max log size = 50
security = user
encrypt passwords = yes
socket options = TCP_NODELAY
hosts allow = 192.168.

[audio]
comment = Audio
path = /stuff/audio
public = no
writeable = no
valid users = bob
write list  = bob
directory mask = 0755
create mask = 0644

Other than uninstalling 4.19 and replacing it with 4.16, I don't currently have any real idea about how to proceed. Any help would be appreciated. Thanks.
 
I believe so - it's the same as it is on Current (wherein no such problems occur), and the two machines are on the same network. I'm not familiar with it, though - I'll review the docs to see if I've screwed it up. Thanks.
 
Upon some review of the docs, I still believe it's correct. man smb4.conf says that its syntax is defined in hosts_access(5), and man -S 5 hosts_access says "A string that ends with a `.´ character. A host address is matched if its first numeric fields match the given string. For example, the pattern `131.155.´ matches the address of (almost) every host on the Eindhoven University network (131.155.x.x)."

And to be explicit, 192.168.*.* is what I intended to allow access from, and both machines are on 192.168.*.*.
 
Aha! Got it.

Future's netmask was not correct. After changing it to the correct value in /etc/rc.conf, doing a /etc/rc.d/netif restart, and a service samba_server restart, everything's working great.

To be clear, I don't know how much of that was necessary beyond changing it in /etc/rc.conf; I just did them because I figured they might be, and it (hopefully, and apparently) couldn't hurt.
 
Upon some review of the docs, I still believe it's correct. man smb4.conf says that its syntax is defined in hosts_access(5), and man -S 5 hosts_access says "A string that ends with a `.´ character. A host address is matched if its first numeric fields match the given string. For example, the pattern `131.155.´ matches the address of (almost) every host on the Eindhoven University network (131.155.x.x)."

And to be explicit, 192.168.*.* is what I intended to allow access from, and both machines are on 192.168.*.*.
thanks for the explanation, it's actually a regular expression.
 
Aha! Got it.

Future's netmask was not correct. After changing it to the correct value in /etc/rc.conf, doing a /etc/rc.d/netif restart, and a service samba_server restart, everything's working great.

To be clear, I don't know how much of that was necessary beyond changing it in /etc/rc.conf; I just did them because I figured they might be, and it (hopefully, and apparently) couldn't hurt.

For the benefit of anyone who may run into a similar issue in the future: After doing all that yesterday, everything that I had been troubleshooting was fixed... but I just discovered today that my machine was no longer able to connect to anything outside of my LAN (connecting to things inside my LAN was fine). "No route to host", things were complaining. /etc/rc.d/routing restart fixed that.
 
Back
Top