Netatalk 2.3.0 available

slipperygrey

Well-known member
What versions of the AppleShare client are you using on those two systems?

Can you try to upgrade to 3.7.4 or later?
 

Mk.558

Well-known member
I would suggest loading a Linux VM (Mint I guess should be easy enough, it's Debian) and testing Netatalk 2.3.2 on it. Use Bridged Adapter for your ethernet cable, not NAT.
 

MacBrian

Member
What versions of the AppleShare client are you using on those two systems?

Can you try to upgrade to 3.7.4 or later?

I'm already on AppleShare client 3.7.4 on both systems.

I managed to get volsizelimit to work and that does somehow make a difference. When I copy something to the share it won't immediately tell me that there is not enough space but actually start copying. Eventually it will unfortunately hang still reading and copying while nothing happens.

Maybe it could be a permission issue or something on the Synology system that is incompatible.
 

slipperygrey

Well-known member
If you capture some debug level logs from the afpd process, there might be hints to what is going wrong in the log output.
 

MacBrian

Member
If you capture some debug level logs from the afpd process, there might be hints to what is going wrong in the log output.
Appreciate all the help. Unfortunately I do not know how to capture debug logs from afpd process and I haven't been able to find a how to.
 

slipperygrey

Well-known member
Happy to help. If you look at https://hub.docker.com/r/netatalk/netatalk2 there's an example how to pass additional options to afpd via the AFPD_OPTIONS environment variable.

If you set it to the following string you should start getting debug logs in the stdout of the docker container. Depending on how the env variables are defined in your NAS, you may have to escape the quotation marks.

-setuplog "default log_debug"
 

MacBrian

Member
Thanks.

I have attached the log from Docker. Not 100% sure if this is the log you ask for.
 

Attachments

  • netatalk2.html.zip
    1.6 KB · Views: 3

slipperygrey

Well-known member
Thanks.

I have attached the log from Docker. Not 100% sure if this is the log you ask for.
Right, my apologies, I gave you bad information.

There is a special environment variable that you need to use to set the log level: AFPD_LOGLEVEL

Please set this variable to “debug” (without the quotes) and try again. Thanks!
 

MacBrian

Member
Right, my apologies, I gave you bad information.

There is a special environment variable that you need to use to set the log level: AFPD_LOGLEVEL

Please set this variable to “debug” (without the quotes) and try again. Thanks!

I added this "AFPD_OPTIONS=-setuplog default log_debug:debug" to my Docker compose YAML configuration and rebuild the Docker container.

As far as I can see it doesn't change anything in the log. Not sure if I added it correct...?
 

slipperygrey

Well-known member
Right, my apologies, I gave you bad information.

There is a special environment variable that you need to use to set the log level: AFPD_LOGLEVEL

Please set this variable to “debug” (without the quotes) and try again. Thanks!
No, you need to set it to exactly what I wrote above: “debug”

I have documented each environment variable thoroughly at the Docker Hub page for your reference: https://hub.docker.com/r/netatalk/netatalk2
 

MacBrian

Member
No, you need to set it to exactly what I wrote above: “debug”

I have documented each environment variable thoroughly at the Docker Hub page for your reference: https://hub.docker.com/r/netatalk/netatalk2
Sorry, I misread it. I started a copy to the server and it stalled. Then I waited for a while and stopped it. I have attached the log. Hope you can interpret it.

Thanks.
 

Attachments

  • netatalk2.html.zip
    23.7 KB · Views: 1

slipperygrey

Well-known member
Cheers, this is more informative. Can you please remind me: Do you absolutely have to use limitsize and volsizelimit together? The two are operating on the same logic, and my reading of the code is that it may cause a mess under the hood (although it's hard to tell exactly what given its spaghetti nature.)

In etc/afpd/volume.c

The logic for options:limitsize

C:
    /* report up to 2GB if afp version is < 2.2 (4GB if not) */
    maxsize = (vol->v_flags & AFPVOL_A2VOL) ? 0x01fffe00 :
        (((afp_version < 22) || (vol->v_flags & AFPVOL_LIMITSIZE))
         ? 0x7fffffffL : 0xffffffffL);

And the logic for volsizelimit

C:
getvolspace_done:
    if (vol->v_limitsize) {
        if (get_tm_used(vol) != 0)
            return AFPERR_MISC;

        *xbtotal = MIN(*xbtotal, (vol->v_limitsize * 1024 * 1024));
        *xbfree = MIN(*xbfree, *xbtotal < vol->v_tm_used ? 0 : *xbtotal - vol->v_tm_used);

        LOG(log_debug, logtype_afpd,
            "volparams: total: %" PRIu64 ", used: %" PRIu64 ", free: %" PRIu64 " bytes",
            *xbtotal, vol->v_tm_used, *xbfree);
    }

The latter is what outputs this in your logs, repeatedly. Basically, always telling the client that there is 2000MB available, and 0 bytes used.

volparams: total: 2097152000, used: 0, free: 2097152000 bytes
 

MacBrian

Member
If volsizelimit isn't there almost all files I want to copy to the share won't because it will tell me there is not enough space.
I have not tried removing limitsize. Do you want me to test and attach the output from the log?
 

slipperygrey

Well-known member
Yes, please! And I would also love a log from the error scenario when volsizelimit is unset, for comparison.

Also, this troubleshooting thread is getting long in the tooth, so may I ask you to create an issue ticket in the GitHub tracker instead? https://github.com/Netatalk/netatalk/issues

That is a more convenient venue for this kind of troubleshooting.
 

Mk.558

Well-known member
I'm trying to hunt down the exact Mac OS/AppleShare Client version that introduced AFP 2.2. Apple gives some information that AFP 2.1 can handle AFP over TCP, but I don't know much more than that. I believe AFP 2.2 was brought in to adapt to some things brought in by AppleShare IP 5.0, which suggest 7.6. Don't have much information about AFP 2.1 either.
 

slipperygrey

Well-known member
According to Apple's AFP Programming Guide, AFP 2.2 was the version of the protocol that officially introduced AFP over TCP. The same source suggests that AFP 2.1 was rolled out to support System 7.0 specifically.

The first AppleShare server version with System 7.0 support was AppleShare 3.0, so I think we can deduce that this server version introduced AFP 2.1. (Compare the release notes for AppleShare 3.0.)

Apple's AppleShare compatibility matrix (last updated in 2012) suggests that AFP 2.2 was first introduced with AppleShare 5.0 (the initial ASIP release). Additionally, the same source suggests that AppleShare Client 3.7.2 is the earliest client version that supports AFP 2.2.

Unless I'm mistaken, 3.7.2 was the very first stand-alone AppleShare Client release that we got from Apple. Does anyone know of an earlier version?

At a related note: AFP 2.2 is also the oldest version of the protocol that the TCP-only Netatalk 3.x supports. Netatalk 2.x can understand AFP 1.1, 2.0, and 2.1 in addition to the later versions.
 

slipperygrey

Well-known member
I found some pretty strong evidence in the documentation for AppleShare IP 5.0, specifically the text file named "AppleShare Client 3.7 Read Me":

Changes from AppleShare Workstation 3.6.5
* Support for TCP connections.
...

And, just above that paragraph, the readme also spells out the official AppleShare client compatibility matrix:

- System Software 7.5.0 or earlier -- 3.6
- System Software 7.5.1 or 7.5.2 -- 3.6.5
- System Software 7.5.3 or later -- 3.7

So to summarize, Apple's official System Software to AFP client support would break down to:

- AFP 2.1 -- System Software 7.0
- AFP 2.2 -- System Software 7.5.3
- AFP 3.0 -- Mac OS X 10.0
- AFP 3.1 -- Mac OS X 10.2
- AFP 3.2 -- Mac OS X 10.4
- AFP 3.3 -- Mac OS X 10.6
- AFP 3.4 -- Mac OS X 10.8

(I skipped the + revisions for simplicity)

Note that while the AppleShare Client 3.7.2 installer will refuse to run on pre 7.5.3 systems, I have manually copied the AppleShare extension to a System 7.1 system and gotten AFP-over-TCP working there. The same did not work on System 7.0, however. I think the network stack got a big bump between 7.0 and 7.1.
 

Mk.558

Well-known member
Thank you for your response. I found similar documentation (same thing actually besides release notes for ASS 3.0) yesterday but couldn't pin down to exact versions when it was released or updated.


Reason I'm asking in this thread is I know most of the people who worked on Netatalk would probably have more insight into this. :)

According to that PDF, AFP 1.0 was not released. I believe AFP 2.0 was first release, being described in Inside AppleTalk. There's 3 versions of Inside AppleTalk that I know of: a 1986 early release for developers, a 1989 "First Edition" and the 1990 "Second Edition". Not sure what they're referring to.

Untitled.png

AFP 1.1? With System 4.1/Finder 5.5? I'm not sure.
 

NJRoadfan

Well-known member
I believe AFP 1.1 and AFP 2.0 roughly follow what AppleShare 1.1 and 2.0 use in terms of over the wire protocols. The AppleShare WorkStation 1.1 disk has a AFP 1.1 client on it. It works fine with netatalk 2.x. I found a disk on the MacGUI claiming to be Workstation 1.0, but it still has a AFP 1.1 client on it.
 
Top