Netatalk Issues

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
Hi all, I got issues with Netatalk on my virtual Ubuntu machine on a Dell PowerEdge R630.

Maybe the issues sound familiar to anyone and you might have a solution:

Whenever I restart the client Mac (IIci, System 7.1) that has the Netatalk volume mounted, it complains, that the connection to the server unexpectedly was disconnected which is obviously not true.

Also, on some of my experiments I've seen AppleDouble folders and others like 'TheFindByContent' folders which are pretty annoying.

Do you know how to prevent these issues and can maybe share Netatalk2 and / or Netatalk3 configs? Which UAMs should be enabled for MacOS 7, 8 and 9 machines?
 

rdmark

Moderator
Staff member
Oct 3, 2021
164
230
43
Would you be able to show us the contents of your afpd.conf and AppleVolumes.default config files? This might help understand why #2 is happening. AppleDouble folders should have a dot prefix and be hidden by default, but you may have overridden that behavior in your configuration. Alternatively, you may have used netatalk3 to share a netatalk2 volume, potentially.

DHX/DHCAST128 is the recommended UAM for Mac OS 7.5 through 9. The manual has more details: https://netatalk.io/2.3/htmldocs/configuration#authentication

See also: https://netatalk.io/docs/Connect-to-AFP-Server

The first issue is a weird one. I would need debug logs to get an idea what's going on...
 

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
I think I switched back and forth between netatalk 2 and 3 a few times. If that is an issue, is there a migration path? I'd like to use a Netatalk that can be my file server for old all classic Macs. OSX Support would be nice but it is not needed. I have no AppleVolumes.default file and no afpd.conf. Just these: afp.conf atalkd.conf dbus-session.conf extmap.conf

Thanks a lot for your response!

afp.conf
; Netatalk 3.x configuration file
;

[Global]
; Global server settings

; [Homes]
; basedir regex = /xxxx

; [My AFP Volume]
; path = /path/to/volume

; [My Time Machine Volume]
; path = /path/to/backup
; time machine = yes

uam list = uams_guest.so

[Classic]
path = /mnt/Classic
browsable = yes
read only = no
guest ok = yes
create mask = 0777
directory mask = 0777
 

rdmark

Moderator
Staff member
Oct 3, 2021
164
230
43
There is a one-way migration path from netatalk2 to netatalk3 as documented in https://netatalk.io/stable/htmldocs/upgrade … but unless you have precious data you absolutely must retain, you should just purge the other version and start over from scratch.

If your focus is Classic Mac OS, then I recommend you use netatalk2. It’s a bit more complex to set up but provides a better experience for pre-OSX systems.

So since you seem to have netatalk3 installed right now, you could start by uninstalling that version. Do you want to go down this path, or try to get your current installation working better?

Actually, your afp.conf above defines a couple of options that don’t exist in netatalk (either version). Did you guess those, or used a guide somewhere? To avoid unexpected behaviors you would be better off referring to the official manual :)
 

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
Haha, sorry for the non existent configs and thanks for your patience. I saved all the files to a real Mac now, will start from scratch with a Netatalk 2 installation and upload the files again. Hope, that will work better then. Best greetings and thanks again! Alex
 

rdmark

Moderator
Staff member
Oct 3, 2021
164
230
43
Absolutely, happy to help!

One option when starting from scratch is to use the official Docker containers on Docker Hub: https://hub.docker.com/u/netatalk

If your host OS has AppleTalk in the kernel, and Avahi with D-Bus, the netatalk2 image should work fully out of the box. Worth a try I think!
 
  • Like
Reactions: eric

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
Hi, short update: installed the out of the box docker image for netatalk2 on a brand new Debian bookworm VM running on Trunas Scale.
With the default settings,
  • my Mac OS 9 client can connect as Guest or with atalk/atalk and can upload data when logged in via atalk/atalk
  • my System 7 client can connect as Guest or with atalk/atalk but can never upload files as it complains that there would not be enough space on it. Maybe the partition is too big (40+ GB)? Is there a way around this?
 

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
Another finding. The zone name I set up within the docker-compose file is applied to the classic Macs after boot but then soon lost (after 30 seconds or so) and the Macs complain that 'The connection to the AppleTalk network was lost'. The network still works though, but the Zone is missing then.

Maybe that is an incompatibility with my UniFi Pro Max switch?
 

NJRoadfan

New Tinkerer
Feb 6, 2022
26
6
3
The UniFi switch is likely not relying multicast Ethernet traffic, which is required for AppleTalk to work. Sounds like the RTMP broadcast packets aren't reaching your Mac. Others have had this problem with UniFi equipment and re-enabling multicast fixes it.
 
  • Like
Reactions: alexADB

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
@NJRoadfan thanks for the hint. I just found a setting 'Multicast DNS' which was disabled and which I enabled just now. Will try it out later. Maybe instead I will build a second network with an older Netgear switch only for the classic Macs.
 

rdmark

Moderator
Staff member
Oct 3, 2021
164
230
43
Hi, short update: installed the out of the box docker image for netatalk2 on a brand new Debian bookworm VM running on Trunas Scale.
With the default settings,
  • my Mac OS 9 client can connect as Guest or with atalk/atalk and can upload data when logged in via atalk/atalk
  • my System 7 client can connect as Guest or with atalk/atalk but can never upload files as it complains that there would not be enough space on it. Maybe the partition is too big (40+ GB)? Is there a way around this?
You can try using the "options:limitsize" AppleVolumes option on the volume that you share with your older Macs, and see if that makes a difference.

See the manual page: https://netatalk.io/oldstable/htmldocs/AppleVolumes.default.5

Tip: Use the netatalk2 webmin module to facilitate the editing of these configuration files.
 

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
Success! It seems to work very nicely now! I also tried the Webmin module. That one unfortunately deletes my share settings when I edit a shared folder. So, I will not use that ;) Thank you so much for your support!
 

rdmark

Moderator
Staff member
Oct 3, 2021
164
230
43
Success! It seems to work very nicely now! I also tried the Webmin module. That one unfortunately deletes my share settings when I edit a shared folder. So, I will not use that ;) Thank you so much for your support!
Oh no, sorry for the data loss! Would you be able to share with me your AppleVolumes.default file? There may be a bug in the parsing logic that I can fix if I know what the sequence of options are.

Good to hear that the file sharing works now!
 

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
One more issue: It complains about Error -50 when I upload an Application to the server. It works nicely and fast as long as it is only .img files (which almost everything is on that server)

This is my AppleVolumes.default
/mnt/Classic/Software "Software" volsizelimit:2000 allow:alex
/mnt/Classic/Diskimages "Diskimages" volsizelimit:2000 allow:alex
/mnt/Classic/Installers "Installers" volsizelimit:2000 allow:alex
/mnt/Classic/Media "Media" volsizelimit:2000 allow:alex

And afpd.conf
"AppleShare" -transall -uamlist uams_guest.so,uams_clrtxt.so,uams_dhx2.so -nosavepassword

And atalkd.conf
ens3 -phase 2 -net 0-65534 -addr 65280.163
 
  • Like
Reactions: rdmark

rdmark

Moderator
Staff member
Oct 3, 2021
164
230
43
Error -50 often means that the resource fork could not be created. Which in the context of netatalk likely means that file system permissions aren't allowing the creation of AppleDouble meta data files. The files that you are able to copy likely don't have resource forks in the first place.

What you can try to do is set permissions to "2775" on the shared directory. (Maybe recursively.) Are you familiar with using the chmod command?

See also the FAQ: https://netatalk.io/docs/FAQ
 

rdmark

Moderator
Staff member
Oct 3, 2021
164
230
43
BTW a tip: you can put options on the DEFAULT line to avoid repeating them for every single shared volume.

For instance:

Code:
:DEFAULT: volsizelimit:2000 allow:alex
 
  • Like
Reactions: alexADB

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
indeed, I just tried a chmod -R 777 * within the Classic folder and now I can upload files with a resource fork. Awesome support from you! Thank you so much. I really enjoy my blazing fast Dell R630 AppleShare Server connected to the network with a 10GB network card
 

rdmark

Moderator
Staff member
Oct 3, 2021
164
230
43
So regarding the webmin bug, using your examples I could find two corner case situations when data gets lost: 1) when editing a shared volume where the dir doesn't actually exist and 2) when editing a 1 or 2 line afpd.conf (i.e. when all the comment lines are removed.)

I'll fix these in the next version of the module!

Did you see any other buggy situations apart from the above?
 

alexADB

Tinkerer
Jun 22, 2023
56
29
18
Bavaria
Nope, not really. It is most crucial, though, to follow the right documentation page.
For Debian that would be this one:

All other how-tos I found or documentation bits did not work for me and resulted in faulty installations, lots of error messages and so on.

As AppleTalk seems to be included in the Debian kernel it seems to be a good basis for building an AppleTalk server. Ubuntu does not have it out of the box, AFAIK
 
Last edited by a moderator: