Comments (9)
I'm going to give up on the Samba approach for my problem, at least for a bit; I've made more progress with NFSv4 in an hour than I did in four sessions playing w/ Samba, and it's likely to fit my initial use cases just as well. Closing; will re-open if I get brave enough to try again. Thank you for your help! It's been interesting!
from samba.
Hi,
Unfortunately you're right there is no easy solution. At least I haven't found one and I have exactly the same issue.
I see the server in macOS - sometimes with randomly changing icon (despite the fact that I specifically set one icon to display) and I established myself the workaround cmd+k to connect manually to the server
It became the new normal and I didn't really recognize this as a bug
I still suspect that a macOS update interprets something differently than before. Or maybe I need to update the avahi config.
Comparing to a local non docker install would help - if it works there something's wrong with my container 🙈
Unfortunately this will need around 2-3 weeks for me since I'm pretty busy at the moment
If you find something new just update the ticket
Thanks and kind regards
from samba.
Your nmbloopup is interesting, there is no nmbd running inside my container... maybe macOS uses it as some fallback 🤔
Can you connect manually?
from samba.
Thanks for the comments. And sorry for the long post below.
I'm not sure what you mean by "manually", but I can not connect by using the "go" drop-down from Finder and then entering my address (smb://192.168....); I get "There was a problem connecting to the server...."
Frankly, if that worked I'd probably do exactly what you've done :) . I did get that to connect at one point maybe a month or six weeks ago, but I've never reproduced that again. I'm similar to you in terms of time; I can only spend an hour or so a week on it.
A couple more data points: we know the TCP/IP level between the systems is fine, because I'm manipulating the samba server from an ssh session that's initiated on my mac.
For an even more manual attempt to mount, I've tried mounting at the command line:
Ricks-Air:~ rick$ mount_smbfs //guest@newsounds/music test
mount_smbfs: server connection failed: Operation timed out
Ricks-Air:~ rick$ mount_smbfs //guest@<REDACTED_IP>/music test
mount_smbfs: server connection failed: Operation timed out
That command line works fine with my other samba host (which is a bit hard to compare with; it's a ~10 year old Fedora box). OTOH, one thing I checked: yup, the old one's running nmbd. I guess I'll see if that helps....
Well, more data, no fix. I exec'ed into my container and ran nmbd
.
And... now the nmblookup returns the host. Even when I run it from my other samba host. MacOS still won't mount it.
But here's another data point. From that Fedora machine:
-bash-4.2$ smbclient --list=newsounds -N -U guest
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
But as you can see from my original post, I get a good response to that command line when I run it on the new samba host with the container setup.
So I Googled that and found https://www.linuxquestions.org/questions/linux-networking-3/samba-min-protocol-%3D-smb2-causes-protocol-negotiation-failed-nt_status_invalid_network_response-4175597669/ . OTOH, when I tried to set the MIN protocol, I probably screwed up the syntax in the docker-compose.yml; I added
SAMBA_CONF_SERVER_MIN_PROTOCOL: LANMAN1
but didn't see any change in my smb.conf even after a docker-compose up --build
(and doing a docker rm
of my dead containers to make sure there was no chance of a "already initialized".
Thanks for your help!
from samba.
Super interesting, so it's still different from my issue.
I'll prioritize this issue and try to evaluate this problem within the next few days.
Yeah this problem with the minimum samba versions is annoying, at the early days of this container I had a flag to simply enable older versions.
maybe big sur has problems with the new server version...
SAMBA_GLOBAL_CONFIG_server_SPACE_min_SPACE_protocol = LANMAN1
this is the correct and hacky way to configure the server_min_protocol version on my container, you can try it. would be interesting if it works :)
from samba.
did it work?
from samba.
Well, no and yes: OSx still doesn't connect. Thanks for the syntax; it definitely changed the settings.
And, from my other Samba server:
-bash-4.2$ smbclient --list=newsounds -N -U guest
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.15.7]
Sharename Type Comment
--------- ---- -------
Music Disk
IPC$ IPC IPC Service (newsounds)
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.15.7]
Server Comment
--------- -------
Workgroup Master
--------- -------
which is different from NT_STATUS_INVALID_NETWORK_RESPONSE
... but makes me think we fixed a problem smbclient
has with later protocols, but nothing interesting about OSx connections.
from samba.
More information: I can mount the drive from my other Linux box (the same one as that smbclient
came from) using
sudo mount -t cifs -o user=guest //newsounds/MUSIC test-newsounds-mount/
So this is something about requirements for OSx (security? protocol version?); Samba is "working" for an old (Fedora Core 20) definition of working :) .
One point, though: it takes a long time to succeed:
time sudo mount -t cifs -o guest //newsounds/MUSIC test-newsounds-mount/
real 0m20.123s
user 0m0.009s
sys 0m0.015s
So let's see if I can adjust OSx's timeout... and that 20s is a suspiciously round number (also quite repeatable; in three tries the time only differs by 0.003s).
from samba.
Looking for a way to adjust that timeout... it appears to be ~10s (samples at 11, 13, and 12s)...
After more googling, I found https://developer.apple.com/forums/thread/680252, so I created an /etc/nsmb.conf
so it looks like:
$ cat /etc/nsmb.conf
[default]
protocol_vers_map=2
and that makes things different, not quite successful yet:
Ricks-Air:~ rick$ time mount_smbfs -N //newsounds/Music test
mount_smbfs: server rejected the connection: Authentication error
real 0m10.264s
user 0m0.014s
sys 0m0.014s
Ricks-Air:~ rick$ time mount_smbfs -N //guest@newsounds/Music test
mount_smbfs: server connection failed: Socket is not connected
real 0m20.315s
user 0m0.014s
sys 0m0.015s
Nothing gets logged at the output of my samba container during these transactions (i.e., docker logs samba_samba_1 --follow
shows nothing). And I'll point out that the time to complete the command is right around 20s, like the successful setup on Linux. Perhaps I'm on the right path.
Further evidence: I got prompted for authentication when trying to mount from the Go
menu in Finder... but then got a connection error once I selected Guest and OK. Trying the Finder with the IP address instead of Netbios name, I now apparently get an authentication error, regardless of whether I try the Guest selection or just the Guest user id; it gives me a headshake after about 10s.
I tried a few other options, including
- trying to mount via using
smbfs_mount ... cifs://...
instead of "smb" (got a plug-in file not found error), - adding a user name and password (verified worked on the Linux client), no go (with confusing loss of guest access)
and probably a dozen other things. Same basic answer: it appears I can get authenticated, but once I do, I get
mount_smbfs: server connection failed: Socket is not connected
(I can get that error message from smbutil
, too). I'm going to call it a day.
from samba.
Related Issues (20)
- No access to shared folder HOT 5
- Read-only shared folders HOT 2
- Question: Which version of Samba (v1/v2/v3/v4) is being used, and can it be changed for best performance? HOT 5
- force user = %U with timemachine HOT 5
- Why does turning on time machine modify my read and write permissions HOT 4
- Samba Server not visible HOT 5
- `disable netbios = yes` disregards `$NETBIOS_DISABLE` HOT 1
- Multiline not working HOT 3
- Cannot use UID and GID of a host user HOT 1
- differnce to dperson/samba HOT 1
- How to set the Time Machine share max size differently for different users HOT 6
- Why I can't create file? HOT 2
- Add configuration to change AVAHI service host name HOT 10
- Not Able to Delete Files HOT 14
- auth error when use compose list format HOT 14
- enable encryption HOT 2
- Can't connect on my share remotely and not discovarable HOT 4
- Scheduled Docker builds failing HOT 3
- samba:smbd-only-latest always reports unhealthy status HOT 2
- Accessible but empty folder HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samba.