[OT] AFP Shares not disconnecting from server

ImAMacGuy
Valued Contributor II

Anybody else notice that AFP shares not disconnecting from the servers? Every day I logon to our JSS server and open Server.app and have to turn off/on the FileSharing service to boot connections...They have to be idle because they are 49min, 17h, 18h, 22h, 1d45m, etc... I have 13 idle connections at the moment..

It's been like this for a long time, but currently 10.9.1 w/ Server.app 3.0.2

2 REPLIES 2

corbinmharris
Contributor

Yes, this issue is also causing headaches with TimeMachine backups.

This page has some command line settings, including to force log off idle AFP connections.

http://krypted.com/mac-os-x/missing-server-app-settings-for-afp/

However, even after adding "serveradmin settings afp:idleDisconnectOnOff = yes" to the server, I'm still seeing folks logged in from 3-days ago multiple times. Giving up on OS X Server soon except for running Casper, and that might move to Linux later this year.

Corbin

ImAMacGuy
Valued Contributor II

from apple:

Advanced administration of the AFP service is performed via command line in 10.9. To view a list of custom settings available for the AFP service:
$ defaults read /Library/Preferences/AppleFileServer

The relevant variable is idleDisconnectOnOff. To set this variable use the serveradmin command:
$ sudo serveradmin settings afp:idleDisconnectOnOff=1

How long a user is allowed to remain idle is set in hours via the idleDisconnectTime variable.

Note that even if a user is disconnected, the server holds the connection ready for a user to reconnect. This means that even if the user has been disconnected, the session is held ready and listed in the server.app. Note that while these users are listed in the server.app, they are not actually connected and will not be counted in number presented via System Preferences -> File Sharing -> Options. This value is held by the reconnectTTLInMin variable and can be adjusted as desired as well. This feature is especially used to allow end users with network homes to put their unit to sleep without logging out and then reconnect to the share on wake. To adjust the reconnect timer to 2 hours:
$ sudo serveradmin settings afp:reconnectTTLInMin=120