DNS-321 Shares no longer showing up in Mac Finder, working in Windows 10

303 views
Skip to first unread message

Trevor Boicey

unread,
Jul 13, 2022, 12:44:50 PM7/13/22
to Alt-F
Hello. Something that worked for a few months just stopped working on my DNS-321 running (fairly sure) the latest Alt-F. I have a feeling I clicked a wrong checkbox somewhere, I was adding some shares when it stopped working.

In Windows 10, everything works. I can mount shares by name/IP, and if I browse the network I can see all my shares. Great.

In Mac OS-X, I can mount drives with Command-K and smb:// notation, works fine. The device appears in Finder, but the shares inside it don't. This means that Time Machine won't use them unless I remember to mount them manually in advance.

I have netatalk, avahi_daemon, and wsdd2 running.

The one thing that seems weird, is that every time I log into the WebUI, it prompts me to save settings because server.crt and server.key have changed. I'm not sure why it keeps regenerating those? Maybe with each restart of the NAS?

Images below of what I think are the screens that matter. Am I missing something? This worked up until a few days ago.

Thanks in advance.

connection_failed_1.png

connection_failed_2.png

files_that_keep_changing.png


netatalk_settings.png

network_services.png

samba_settings.png


Trevor Boicey

unread,
Jul 13, 2022, 6:56:05 PM7/13/22
to Alt-F
I "solved" the problem by resetting flash and doing the config all again.

I learned that it died when I clicked the "Time Machine" checkbox on the time machine share, and came back when I unchecked. So checking that checkbox broke all browsing, unchecking it fixed it.

However, the netatalk log was showing an error, because I had "share user's home folder" turned on while essentially replicating the shares in the grid above.

I removed the shares in the grid and left "share user's home folder" checkbox on, and now when I click "time machine" it does not fall over and everything works.

Small mystery though, in the above screenshots I do NOT have "share user's home folder" checked and it still failed. Oh well. Maybe it doesn't like explicitly entering the data to share a user's home folder for some internal conflict?

Cheers.

Trevor Boicey

unread,
Jul 14, 2022, 12:44:27 PM7/14/22
to Alt-F

Ok, I'm answering my own posts in a vacuum here, but I will keep adding to this if only for the google-fu that might help somebody in the future.

I have now reduced the problem so that I can make it fail and unfail with one config change.

Summary:

Problem - getting network browsing and time machine working for Macs, especially for multiple time machine shares for multiple users.

In windows 10, everything works fine. No issues, all config changes produce what I'd expect.

In Mac, if I do NOT check the "Time Machine" beside any shares in the netatalk config, browsing works. I can see all the shares, browse, whatever. However, since it's not being registered as a Time Machine volume, I can't use it as a back up. It doesn't appear when I click "Choose Disk" on the Time Machine Configuration screen.

If I *DO* click the Time Machine box, then browsing is broken and I can't mount shares, I get the error screenshotted at the top of this thread. The shares DO appear in "Choose Disk" for time machine so they are being registered properly, and I can select them, but then it fails as it cannot mount the file system.

(side note, after changing the netatalk config in the WebUI, it seems like Alt-F automatically restarts netatalk to load the new config. Good. But you also need to restart avahi manually (or reboot) for the changes to take effect. Not sure if this can be patched but it is not intuitive)

So... is there a chance the webUI is making a broken config for netatalk/avahi that I can fix manually? I could also try configuring it manually without using the web UI, but I don't know what might be wrong or what I would change in the config files.

Also mentioned in an old feature request, if samba could be updated to a newer version (at least 4?) then it would support time machine natively via vfs_fruit and not require netatalk. It would still require avahi running, but another added benefit would be not needing configuration for netatalk, meaning all of the config for shares would be in one place.

I would consider trying to compile samba if people have had success installing gcc et al on a Dlink-321. It might take a few days to finish!

Thanks in advance if anyone is listening.

Joao Cardoso

unread,
Jul 14, 2022, 7:23:44 PM7/14/22
to Alt-F
On Thursday, July 14, 2022 at 5:44:27 PM UTC+1 Trevor Boicey wrote:

Ok, I'm answering my own posts in a vacuum here,

I keep reading the forum...
 
but I will keep adding to this if only for the google-fu that might help somebody in the future.

Great! I wish that all users who ask for help and find out the solution would post it. 

I have now reduced the problem so that I can make it fail and unfail with one config change.

Summary:

Problem - getting network browsing and time machine working for Macs, especially for multiple time machine shares for multiple users.

In windows 10, everything works fine. No issues, all config changes produce what I'd expect.

In Mac, if I do NOT check the "Time Machine" beside any shares in the netatalk config, browsing works. I can see all the shares, browse, whatever. However, since it's not being registered as a Time Machine volume, I can't use it as a back up. It doesn't appear when I click "Choose Disk" on the Time Machine Configuration screen.

If I *DO* click the Time Machine box, then browsing is broken and I can't mount shares, I get the error screenshotted at the top of this thread. The shares DO appear in "Choose Disk" for time machine so they are being registered properly, and I can select them, but then it fails as it cannot mount the file system.

Thanks. Not having an Apple myself for testing, your findings are invaluable. I'm literally blind in this respect and used only the netatalk manual pages for coding everything.

So, I don't know if the culprit for the issue you describe is the webUI generated config file or netatalk itself.  
 

(side note, after changing the netatalk config in the WebUI, it seems like Alt-F automatically restarts netatalk to load the new config. Good. But you also need to restart avahi manually (or reboot) for the changes to take effect. Not sure if this can be patched but it is not intuitive)

You are right, it is not intuitive. Some services require others, and the required ones are started, but on "restart" or "stop" they are not restarted or stopped. That's an Alt-F design flaw. 

So... is there a chance the webUI is making a broken config for netatalk/avahi that I can fix manually? I could also try configuring it manually without using the web UI, but I don't know what might be wrong or what I would change in the config files.
 
Only reading the netatalk manual pages and experimenting. I would save a config for both situations you describe and look at the differences to see if the error is obvious.
 

Also mentioned in an old feature request, if samba could be updated to a newer version (at least 4?) then it would support time machine natively via vfs_fruit and not require netatalk. It would still require avahi running, but another added benefit would be not needing configuration for netatalk, meaning all of the config for shares would be in one place.

I have compiled and tested samba 4.16.1 with success (some 20% faster throughput) , but there are too many changes to the build infrastructure, so a samba package update requires many other packages updates, and that will most probably broke other packages.

I would consider trying to compile samba if people have had success installing gcc et al on a Dlink-321. It might take a few days to finish!

That is not viable. You would have to compile many other packages. The dev-bundle package was more like a proof of concept (like a humans Mars colony) 

The most feasible solution is for you to install Entware's samba4. I have done that and it works fine. But you have to at least update Entware package feed; and write your own samba4 init script. For samba4 itself, you can create a symbolic link from /etc/samba to /opt/etc/samba  and use Alt-F samba webUI :-)  
 

Thanks in advance if anyone is listening.

I'm hearing (if not acting)

Jeremy Laidman

unread,
Jul 14, 2022, 8:44:17 PM7/14/22
to al...@googlegroups.com
On Fri, 15 Jul 2022 at 09:23, Joao Cardoso <joao.fs...@gmail.com> wrote:

On Thursday, July 14, 2022 at 5:44:27 PM UTC+1 Trevor Boicey wrote:

Ok, I'm answering my own posts in a vacuum here,

Definitely not. I don't have a Mac, but if I did, I'd be grateful for your investigation and findings.
 
The most feasible solution is for you to install Entware's samba4. I have done that and it works fine. But you have to at least update Entware package feed; and write your own samba4 init script. For samba4 itself, you can create a symbolic link from /etc/samba to /opt/etc/samba  and use Alt-F samba webUI :-)  

Is there a step-by-step for this? I can't see anything in the FAQ or other pages on the Wiki. I tried following instructions posted on a thread on this mailing list a little while back, but I couldn't get it to work and had to switch back to the standard one.

J

Alex Khroustalev

unread,
Jul 15, 2022, 6:50:54 AM7/15/22
to al...@googlegroups.com
Hi Trevor, hi Joao.

Up until a couple of month ago I used DNS-327 with Alt-F and a Mac. 

1. MacOS shifted to SMB over AFP for file shares and TimeMachine backups. When one enables TimeMachine in Alt-F Web UI it forces AFP daemon to start and enables avahi ‘afp.service' broadcast. Mac can now see a share but can’t connect since AFAIK AFP is not supported in modern MacOS.
2. Alt-F has SMB3 out of the box, which does not support TimeMachine. I installed SMB4 from Entware and used it for years without issue. I created a separate init script for smb4 by simply making a copy of the original smb init script and modifying paths to /opt.
3. Alt-F's avahi_daemon config for samba shares does not work with Mac: it tells MacOS to connect via port 137, which is obsolete. It results in the share showing up in Finder's sidebar but it is not accessible. To fix that one has to manually modify '/etc/avahi/services/smb.service' and leave only port 445 (no restart needed). Here one also can specify the box’s icon.

Sorry for not being precise, I don’t have my Alt-F box at hand now. Will try to boot it up and share my scripts this weekend.

To sum it up: if you can see a share in Finder sidebar but can’t connect, check ‘/etc/avahi/services/‘ files. 

Best regards,
Alex

-- 
You received this message because you are subscribed to the Google Groups "Alt-F" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alt-f+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alt-f/296b70f2-a543-4264-ba44-d353a66b6b37n%40googlegroups.com.

Trevor Boicey

unread,
Jul 16, 2022, 12:32:19 PM7/16/22
to Alt-F
Thank you both. I'm away from my Dlink for a few days, but will try out these solutions ASAP. Longtime linux user so not afraid.

I will report back and can assist in getting it into the docs somehow, Wiki or otherwise.

I didn't buy a Synology on Prime Day betting that I could get this working again. All this began when I had to press this Dlink into service after my Airport Time Capsule died a week ago. Chain reaction!

Trevor Boicey

unread,
Jul 18, 2022, 10:38:01 PM7/18/22
to Alt-F
Ok. I've had time to do a lot of experimenting.

So the goal again is to get Time Machine shares working on OS X Monterey. I can get it to work with with my older Catalina machine, but Apple seems to have made a lot of changes between Catalina and Monterey, some of which others have helped with in this thread.

So in various attempts, I have gotten it as far as Monterey seeing the shares and not being able to mount them, or being able to mount them via Command-K but not by browsing. Neither will work automatically as a Time Machine so neither will work for me.

So.... Here I *THINK* is the best path and the furthest I can get. This method tries to use the newest available versions of samba and avahi. Netatalk is no longer required as this version of samba has that functionality built in.

Summary:
- In Packages->Alt-F, disable samba-small
- In Packages->Alt-F, remove dbus, netatalk, and avahi.
- ssh to the box, and use the command line to install Entware. (Not Entware-ng, which is the older version built into the firmware).
- Install the new version with 'wget http://bin.entware.net/armv5sf-k3.2/installer/generic.sh' and running the script you get.
- When Entware is installed, do "opkg update" and "opkg upgrade"
- Use opkg to install "dbus" and "avahi-dbus-daemon". That should also grab all the dependencies.
- Reboot (maybe not required but...)
- Ensure dbus and avahi are not running (ps ax | grep dbus; ps ax | grep avahi) If they are running they are probably Alt-F remnants. 
- Start the new daemons. I didn't have much luck with the Entware init scripts so I crufted my own, see below. You can just type them out to test, but if it works you can add this to the User script or create something in /etc/init.d/
- Note that we are running the new Entware stuff in /opt. We seem to have to specify paths to config files as the default is to look in / and it will either fail or find older versions.

#!/bin/sh
/opt/etc/init.d/S91smb start

rm /opt/var/run/dbus/pid
/opt/bin/dbus-daemon --config-file=/opt/etc/dbus.conf

# You might need this sleep here so dbus is running when avahi tries to connect to it
sleep 5
/opt/sbin/avahi-daemon --file=/opt/etc/avahi/avahi-daemon.conf

If dbus doesn't start, it might want a user named dbus. You can create it in the Alt-F UI and save settings so that it will persist through configuration changes. 

So that works and sms productive, except I'm stuck here starting avahi-daemon:

Found user 'nobody' (UID 99) and group 'nogroup' (GID 99).
Successfully dropped root privileges.
avahi-daemon 0.8 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
dbus_bus_request_name(): Connection ":1.0" is not allowed to own the service "org.freedesktop.Avahi" due to security policies in the configuration file
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.8 exiting.

Google finds a few people asking about this error but their problems seem to be packaging errors. I haven't figured out what configuration tweaks are needed to solve this one. It seems to be a fight between avahi and dbus arguing about whether avahi should be allowed to be service.

Can anyone crack that nut? Or am I going down a dead end?

Cheers.

Jeremy Laidman

unread,
Jul 19, 2022, 12:19:39 AM7/19/22
to al...@googlegroups.com
Trevor

Could it be that avahi has already registered the service, such as the avahi daemon already running? Or the are two avahi-dbus.conf files? Or perhaps the avahi package installed the avahi dbus config file (probably /etc/dbus-1/system.d/avahi-dbus.conf) after the dbus daemon was started so it hasn't picked up the new file yet? Your process ordering suggests this is unlikely to happen, but nevertheless, it couldn't hurt to try restarting dbus and then avahi.

I'm curious why you added Entware from the command line, and didn't just alter the URL in the GUI. This is what I have under Entware-NG:
image.png
If you found problems with doing it this way, perhaps I will also one day.

Cheers
Jeremy

Alex Khroustalev

unread,
Jul 19, 2022, 5:35:49 AM7/19/22
to 'z pascal' via Alt-F
Hi Trevor!

Catalina still has AFP support, Monterey doesn’t. That’s why you can’t work with stock Alt-F from a new Mac.

You don’t need to uninstall neither Alt-F's avahi, nor netatalk. Installing SMB 4 from Entware and disabling Alt-F’s netatalk is enough. Just make sure you have avahi running with proper smb.service contents and with afp.service disabled. Enabling/disabling a service broadcast with avahi is done simply by renaming/removing .service extension. No reboot/restart required.
In your new S91smb init file you can include avahi prerequisite (example lines could be found in Alt-F’s netatalk init file).

Alex

Trevor Boicey

unread,
Jul 25, 2022, 2:03:26 PM7/25/22
to Alt-F
Well I think this is where I am tapping out. I have enough junk around the house to build a TrueNAS server so I think that is what I will do, and move these usable drives over.

For anyone finding this thread, using Alt-F in 2022 or later, here's what I could get to work on my D-Link DNS-321

Windows/Linux:
- Everything works

Mac Catalina and older:
- Everything works (Browsing, marking as Time Machine, automatic time machine backups)

Mac Monterey:
- Browsing and seeing shares works
- Manually mounting shares works
- Time Machine backups to shares that you have manually mounted works

The main thing NOT working, is seamless Time Machine backups without manual effort, where time machine mounts the disk by itself. But that's a huge thing so I think I have to punt here.

Thanks all!



Reply all
Reply to author
Forward
0 new messages