Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

CoastalOR

macrumors 68040
Original poster
Jan 19, 2015
3,022
1,147
Oregon, USA
2021 14" MacBook Pro M1 Pro running macOS Sonoma 14.3
EDIT: Firewall is on & FileVault is on.

Problem:
File Sharing using SMB does not work when it is enabled and booted up from Shut Down or Restarted.

The MBP will be listed in Locations in a Finder window Sidebar, but attempts to Connect fails.
Error window is displayed:
"There was a problem connecting to the server "MBPs name".
"The server may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again."

Workaround to Restore File Sharing:
File Sharing can be restored if File Sharing is disabled, the MBP is Shut Down (Restart does not work to restore File Sharing), Boot up, turn on File Sharing and it will work every time until the MBP is Shut Down or Restarted while File Sharing is turned on.

Additional Information:
The problem started when I upgraded from Monterey 12.7.1 (no FS problems) to Sonoma 14.2.
I have no problems with File Sharing on a different 2021 14" MacBook Pro M1 Pro and a 2023 iMac both running macOS Sonoma 14.3.

Things I Have Tried That Have Not Worked:
I've compared settings between the 2 MBPs and I can not see any differences.

Downloaded the full Sonoma installer app from Apple and launched it from the Applications folder to reinstall Sonoma on top of the current Sonoma. I also used this method to update from 13.2.1 to 14.3 instead of the normal Software Update method.

I would appreciate suggestions for things to try to fix the problem.
 
Last edited:

IngoX

macrumors regular
Jan 4, 2022
135
96
Sweden
Does the affected MBP have any third party app or extention that the working MBP doesn’t have? Dig deep! 😉

Creating a new user account on the affected MBP, any difference?
 
  • Like
Reactions: CoastalOR

CoastalOR

macrumors 68040
Original poster
Jan 19, 2015
3,022
1,147
Oregon, USA
Does the affected MBP have any third party app or extention that the working MBP doesn’t have? Dig deep! 😉

Creating a new user account on the affected MBP, any difference?
Thank you for your reply. I'll compare the extensions and make a new User account to test.

It is my wife's MBP so I'll have to wait until it is not in use to get full access. It will probably be tomorrow morning before I'll have more time and access to do the checks and do testing.
 

CoastalOR

macrumors 68040
Original poster
Jan 19, 2015
3,022
1,147
Oregon, USA
UPDATE:
New User did not fix the File Sharing problem.
I created a new User, booted to the new User account, turned File Sharing ON, confirmed I could connect to the MBP with the iMac, Shutdown the while File Sharing was still ON, booted the MBP, the iMac could not connect to the MBP (same symptoms with original User account).
I turned File Sharing OFF, Shutdown the MBP, booted to New User, turned File Sharing ON, and the iMac was able to connect to the MBP.

I have not the Extensions comparison yet, but I'm not sure if that will help since a new User did not work.
 

IngoX

macrumors regular
Jan 4, 2022
135
96
Sweden
A sign that others have similar problems in Sonoma and have to use the ”disable FS > reboot > enable FS” workaround, so you are not alone. But apparently it’s not a general bug since you have two identical M1 MBP now on 14.3 but with different behavior. So it has to be something in the upgrade-path, in the settings or in other software.

Howard Oakley reported a bug in 14.2 affecting file sharing from virtual installations, not the same but maybee related? But that was fixed in 14.3.

I guess a corrupt plist-file could cause problems like this, but since a new user-account didn’t solve it it would be a system wide setting. Unfortunately I don’t have any suggestion exactly which plist you could test to delete and let the system recreate, and I also guess that doing this with a system-plist requires you to disable SIP (System Integrity Protection)

A last thought - is or has the affected MBP been managed with a MDM-solution?
 
  • Like
Reactions: CoastalOR

CoastalOR

macrumors 68040
Original poster
Jan 19, 2015
3,022
1,147
Oregon, USA
IngoX, thank you for the information and your time.

I agree that it very well could be a corrupt file. The problem is not the end of the world, just inconvenient. I'm glad there is a workaround so I can get it working when needed.

All of my Macs were purchased new directly from Apple and have never been on MDM.
 

Brian33

macrumors 65816
Apr 30, 2008
1,420
352
USA (Virginia)
This probably won't help, but it won't hurt anything...

My understanding is that macOS uses Bonjour to find and connect to other file sharing Macs. The commands below won't directly help, but might give some indication on whether Bonjour is working correctly. (I say "might," because they didn't help me figure out my similar connection problem in Monterey. That problem magically went away, and I don't know why!)

The 'dns-sd' Terminal command can register, browse, and look up details for Bonjour (multi-cast DNS or mDNS) services. Note that the command keeps running continuously until you quit it by pressing Ctrl-C.

The first form dns-sd -B _smb._tcp "Browses" to look for local file-sharing machines. It should list all of your home network Macs that have File Sharing turned on. I'll show some example output:

Code:
brian@laptop:~(130)$ dns-sd -B _smb._tcp
Browsing for _smb._tcp
DATE: ---Sat 03 Feb 2024---
17:30:20.720  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
17:30:20.721  Add        3   1 local.               _smb._tcp.           laptop
17:30:20.721  Add        3   4 local.               _smb._tcp.           laptop
17:30:20.721  Add        3   4 local.               _smb._tcp.           imac
17:30:20.721  Add        2   4 local.               _smb._tcp.           macmini
^C

If the "Instance Name" column shows the machine name (from Sharing prefs) of all the Macs on the local network that have File Sharing turned on (in my case, "laptop", "imac", and "macmini" -- you can see I'm not very creative!). If your output is missing the target machine's name, there's a problem registering the service.

The second form dns-sd -L machine-name _smb._tcp does a "Lookup" to get the info needed to connect to a specific Mac. Here I'll query the info related to my machine named "imac" (substitue your own target machine name):

Code:
brian@laptop:~(130)$ dns-sd -L imac _smb._tcp
Lookup imac._smb._tcp.local
DATE: ---Sat 03 Feb 2024---
17:30:41.193  ...STARTING...
17:30:41.194  imac._smb._tcp.local. can be reached at imac.local.:445 (interface 4)
^C
brian@laptop:~(130)$

Your ouput should also show can be reached at xxxx.local:445.

Unfortunately, if your output does show the expected results, I don't know where to go from there. (shrug -- wish I knew!)
 

CoastalOR

macrumors 68040
Original poster
Jan 19, 2015
3,022
1,147
Oregon, USA
This probably won't help, but it won't hurt anything...

My understanding is that macOS uses Bonjour to find and connect to other file sharing Macs. The commands below won't directly help, but might give some indication on whether Bonjour is working correctly. (I say "might," because they didn't help me figure out my similar connection problem in Monterey. That problem magically went away, and I don't know why!)

The 'dns-sd' Terminal command can register, browse, and look up details for Bonjour (multi-cast DNS or mDNS) services. Note that the command keeps running continuously until you quit it by pressing Ctrl-C.

The first form dns-sd -B _smb._tcp "Browses" to look for local file-sharing machines. It should list all of your home network Macs that have File Sharing turned on. I'll show some example output:

Code:
brian@laptop:~(130)$ dns-sd -B _smb._tcp
Browsing for _smb._tcp
DATE: ---Sat 03 Feb 2024---
17:30:20.720  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
17:30:20.721  Add        3   1 local.               _smb._tcp.           laptop
17:30:20.721  Add        3   4 local.               _smb._tcp.           laptop
17:30:20.721  Add        3   4 local.               _smb._tcp.           imac
17:30:20.721  Add        2   4 local.               _smb._tcp.           macmini
^C

If the "Instance Name" column shows the machine name (from Sharing prefs) of all the Macs on the local network that have File Sharing turned on (in my case, "laptop", "imac", and "macmini" -- you can see I'm not very creative!). If your output is missing the target machine's name, there's a problem registering the service.

The second form dns-sd -L machine-name _smb._tcp does a "Lookup" to get the info needed to connect to a specific Mac. Here I'll query the info related to my machine named "imac" (substitue your own target machine name):

Code:
brian@laptop:~(130)$ dns-sd -L imac _smb._tcp
Lookup imac._smb._tcp.local
DATE: ---Sat 03 Feb 2024---
17:30:41.193  ...STARTING...
17:30:41.194  imac._smb._tcp.local. can be reached at imac.local.:445 (interface 4)
^C
brian@laptop:~(130)$

Your ouput should also show can be reached at xxxx.local:445.

Unfortunately, if your output does show the expected results, I don't know where to go from there. (shrug -- wish I knew!)
The Browse test had no change in results between File Sharing working and not working on the MBP.

The Lookup test started fine, but returned no results.

Thank you for your help.
 

svenmany

macrumors demi-god
Jun 19, 2011
2,000
1,299
Have you tried connecting using the IP address of the machine?

In Finder, type command-K. Then enter smb://<<ip address of the machine with shared folders>>.

It would be good to know if it's a name resolution problem.

P.S. I loved @Brian33's post!!
 
  • Like
Reactions: CoastalOR

CoastalOR

macrumors 68040
Original poster
Jan 19, 2015
3,022
1,147
Oregon, USA
Have you tried connecting using the IP address of the machine?

In Finder, type command-K. Then enter smb://<<ip address of the machine with shared folders>>.

It would be good to know if it's a name resolution problem.

P.S. I loved @Brian33's post!!
Thank you for the helpful suggestion.

The good news is File Sharing is working normally now!!!

The problem is I don't know if it was because of your test or because I turned FileVault off this morning. I can connect using the MBP name or IP.

Regardless, I'm very happy File Sharing is back to normal!!
 

CoastalOR

macrumors 68040
Original poster
Jan 19, 2015
3,022
1,147
Oregon, USA
RESOLVED
Thank you everybody that responded with helpful and interesting suggestions. I learned about some very useful tools.
 
Last edited:
  • Like
Reactions: IngoX

Sciuriware

macrumors 6502a
Jan 4, 2014
595
99
Gelderland
RESOLVED
Thank you everybody that responded with helpful and interesting suggestions. I learned about some very useful tools.
My opinion: dropping FileVault can not be a true solution, as FV is intended to protect your system.
APPLE should solve this problem for once and for all.
IP addresses are dynamic on many networks, so that solution is not valid as well.
I found no difference in behaviour or files between my machines (3).

I was astonished when APPLE telephonic support could not even give the above temporary solution.
Presently I live by {FS off, reboot, FS on} for any reboot or upgrade.
;JOOP!
 
Last edited:

svenmany

macrumors demi-god
Jun 19, 2011
2,000
1,299
Thank you for the helpful suggestion.

The good news is File Sharing is working normally now!!!

The problem is I don't know if it was because of your test or because I turned FileVault off this morning. I can connect using the MBP name or IP.

Regardless, I'm very happy File Sharing is back to normal!!

I'm going to make a wild guess about what happened. Somehow the dns resolver's cache on the iMac had some conflicting information about the IP address of the MBP. Accessing the MBP by IP address caused that name to get refreshed and that data cleaned up.

You can find many posts on the web about clearing this cache by executing "sudo killall -HUP mDNSResponder" in the terminal. It wouldn't hurt to do that in case there is other cruft hanging around.

So, my suspicion implies that the problem was with the iMac and the data it had about the MBP. Restarting the MBP and its file sharing caused the MBP to broadcast its name to neighbors (including your iMac). That perturbed things enough in the iMac's cache to allow it to work around the cruft for a while.

All guesswork on my part.
 
  • Like
Reactions: CoastalOR

nuster

macrumors newbie
Feb 8, 2024
2
3
I am experiencing the same issue (SMB only works if disabled before restarting) and here is the solution I came up with:
  1. Disable File Sharing in Settings
  2. Remove smbd from Firewall under Network
  3. Remove smbd from Full Disk Access under Privacy & Security
  4. Add smbd (/usr/sbin/smbd) to Firewall
  5. Add smbd (/usr/sbin/smbd) to Full Disk Access
  6. Enable File Sharing again
I am not sure whether all the steps are really required. I just stopped trying out once I got it work.
The downside is that I have to go through all these steps after every restart if I don't disable File Sharing before shutting down/restarting.
 

svenmany

macrumors demi-god
Jun 19, 2011
2,000
1,299
When it doesn't work, do you get the same error as the OP?

"There was a problem connecting to the server "MBPs name".
"The server may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again."
 

MikeDr206

macrumors 6502
Oct 9, 2021
431
270
I am experiencing the same issue (SMB only works if disabled before restarting) and here is the solution I came up with:
  1. Disable File Sharing in Settings
  2. Remove smbd from Firewall under Network
  3. Remove smbd from Full Disk Access under Privacy & Security
  4. Add smbd (/usr/sbin/smbd) to Firewall
  5. Add smbd (/usr/sbin/smbd) to Full Disk Access
  6. Enable File Sharing again
I am not sure whether all the steps are really required. I just stopped trying out once I got it work.
The downside is that I have to go through all these steps after every restart if I don't disable File Sharing before shutting down/restarting.

this is good info — thanks! When I reboot and forget to disable file sharing before, I’ve always had to reboot again.
 
  • Like
Reactions: nuster

nuster

macrumors newbie
Feb 8, 2024
2
3
When it doesn't work, do you get the same error as the OP?

"There was a problem connecting to the server "MBPs name".
"The server may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again."
Whenever I try to connect to SMB from another Windows/MacOS machine or Android phone I get these TCP Retransmissions:
 

Attachments

  • 445_trace.jpg
    445_trace.jpg
    151 KB · Views: 36

Sciuriware

macrumors 6502a
Jan 4, 2014
595
99
Gelderland
I am experiencing the same issue (SMB only works if disabled before restarting) and here is the solution I came up with:
  1. Disable File Sharing in Settings
  2. Remove smbd from Firewall under Network
  3. Remove smbd from Full Disk Access under Privacy & Security
  4. Add smbd (/usr/sbin/smbd) to Firewall
  5. Add smbd (/usr/sbin/smbd) to Full Disk Access
  6. Enable File Sharing again
I am not sure whether all the steps are really required. I just stopped trying out once I got it work.
The downside is that I have to go through all these steps after every restart if I don't disable File Sharing before shutting down/restarting.
Tell me if I'm wrong, but I think {FS off, reboot, FS on} is a bit shorter, simpler and to the same result.
(did it again this morning for 14.3.1)
;JOOP!
 

CoastalOR

macrumors 68040
Original poster
Jan 19, 2015
3,022
1,147
Oregon, USA
UPDATE:
File sharing was working, but a new problem was found. I could not enter Recovery mode or boot from a bootable USB installer.

DETAILS:
I was getting ready to upgrade from Sonoma 14.3 to 14.3.1. I started preparation and created a bootable 14.3.1 USB installer using Mist (just in case things went sideways). I started testing that I could boot from the USB installer on my 3 Macs. One MBP and the iMac booted fine. The problem MBP, the subject of this thread, could not. If I selected Options (Recovery) or the Sonoma (bootable USB installer), then Continue, the screen would flash "Examining Volumes", then the screen went black, then the MBP restarted to the MBP desktop. Did not want to continue with the upgrade to 14.3.1 until the problem was resolved.

I called Apple Support. The first Tech Advisor did not want to proceed until I had installed 14.3.1 since it MIGHT fix the problem, straight from their script. I was not convinced it would work, but I figured if there was problem I could Restore using Apple Configurator and the iMac (I was wrong about this, more on that later). The upgrade to 14.3.1 using Software Update worked, but the problem getting into Recovery was not fixed.

RESOLUTION
I called Apple Support again. I was connected to a Senior Tech Advisor.
He connected to my iPhone - Camera (with my permission) to see the not being able to enter Recovery problem. We tried using Apple Configurator (AC), but the MBP could not make the DFU connection to the AC running on the iMac. We finally had to use System Settings>Transfer or Reset>Erase All Content and Settings... We did not migrate data and made just a test User Account to test Options>Recovery. IT WORKED!! We finally used Migration Assistant and Time Machine to restore data and remove the test User.

It appears there was more problems than just File Sharing. Everything appears to be working fine now.
 
  • Like
Reactions: IngoX

sj55

macrumors newbie
Mar 27, 2024
1
0
Tell me if I'm wrong, but I think {FS off, reboot, FS on} is a bit shorter, simpler and to the same result.
(did it again this morning for 14.3.1)
;JOOP!
Chiming in...FS off, restart, FS on worked for me. Had the issue yesterday until updating to 14.4.1 which after the update (without following these steps) successfully was able to smb connect. But then testing to see if it would work after restart without turning off FS found it again would not connect. At least there is a clunky workaround to remember but IMHO you'd think this should get resolved by Apple as this is a basic function. Thanks for the workaround tip.
 

Sciuriware

macrumors 6502a
Jan 4, 2014
595
99
Gelderland
Chiming in...FS off, restart, FS on worked for me. Had the issue yesterday until updating to 14.4.1 which after the update (without following these steps) successfully was able to smb connect. But then testing to see if it would work after restart without turning off FS found it again would not connect. At least there is a clunky workaround to remember but IMHO you'd think this should get resolved by Apple as this is a basic function. Thanks for the workaround tip.
And ... put sharing off BEFORE the update, as it will restart and otherwise you'll have to restart again.
Great fun every month, I fear.
;JOOP!
 
  • Like
Reactions: sj55

Sciuriware

macrumors 6502a
Jan 4, 2014
595
99
Gelderland
Chiming in...FS off, restart, FS on worked for me. Had the issue yesterday until updating to 14.4.1 which after the update (without following these steps) successfully was able to smb connect. But then testing to see if it would work after restart without turning off FS found it again would not connect. At least there is a clunky workaround to remember but IMHO you'd think this should get resolved by Apple as this is a basic function. Thanks for the workaround tip.
And to everybody: the problems still exist in 14.4.1
;JOOP!
 

OldMike

macrumors 6502a
Mar 3, 2009
537
218
Dallas, TX
I'm happy this thread exists - I noticed the problem after rebooting for an update and couldn't figure out why I could no longer connect. I was using a Linux box as a fileserver - but decided to move the drives to my Mac, so this didn't bite me until now.

I eventually realized that when shutting off the Firewall connections from clients could be made. I ended up finding an article on 6 colors about adding smbd to the firewall and making sure that it was not blocked using
Code:
/usr/libexec/ApplicationFirewall/socketfilterfw --listapps

But nothing helped. The tip on shutting off file sharing before rebooting is the only thing that really works(?) so far.

I'm wondering if it would be worth it to try something like Murus (murus) to workaround this? I've been meaning to try it out since the built-in Firewall app is not very good.

Seems crazy something like this gets by QA - and does not get fixed right away by one of the wealthiest companies in the world. I wonder when this bug started - I feel like I found some search results about this issue going back to last year...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.