rob Copeland

Q: Problems with iOS File Sharing on Server 5.1

Problems with iOS File Sharing on Server 5.1

 

I am attempting to use iOS File Sharing on my server running El Capitan (10.11.4) and OS X Server 5.1. For a variety of other reasons, I wiped the machine and did a clean install of El Capitan (after erasing the partition) and then installed Server. Here is what I'm seeing:

 

I can create the shares on the server just fine, and set the AFP, SMB, and iOS check boxes in the Share Point's settings. Then, on an iOS device, I can go to “Settings -> Mail, Contacts, Calendars -> Add Account -> Other -> Add OS X Server Account “ and select the server and successfully log in.

 

Once that’s done, things works as expected for a little while. That is, on the iOS device, from the document picker, I can choose “Locations”, select the server, and see the share points. But, after a while (usually a couple hours), the iOS device will no longer connect. It “spins” for quite a while and comes back with either “Request Timed Out” or "Unable to Download" errors.

 

On the Server, I’ve checked the iOS File Sharing logs and see quite a few of these types of messages:

 

Apr  7 08:03:06 Server sdhd[4848] <Error>: #diupfiPPfIa0@diupfiPPfIa0: Could not connect to Postgres. Please make sure it is running and has the correct access.
Apr  7 10:42:30 Server sdmd[3352] <Error>: #@com.apple.root.default-qos: Could not connect to Postgres. Please make sure it is running and has the correct access.

 

And, even when it’s working, the logs show many of these types of messages:

 

Apr  6 23:03:07 Server sdmd[3352] <Error>: #8622B8F1-15EA-443B-B09C-A8E4DEFE1267@8622B8F1-15EA-443B-B09C-A8E4DEFE1267: Failed to set extended attributes on '/Library/Server/ServerDocs/Data/d079b9.app': No such file or directory
Apr  6 23:07:23 Server sdhd[4848] <Error>: #E0PXhD6VywmU@E0PXhD6VywmU: failed allocating documentID for path:'/Volumes/Shares/Shared/Public/.apdisk' parentFileID:79704 fileID:79705 size:292 mtime:1347727570 mode:-rw-r--r-- documentID:0 generationID:2 fd:5 refs:2147483647

 

I’ve looked at permissions (both file-level and share-level) of the share points, which seem fine. I’ve run “first aid” on the disks, which comes back fine. I even resorted to wiping the machine again, and reinstalling everything again, in case I inadvertently messed something up. The same problem occurs.

 

Any ideas as to what might be causing this or ways to fix and/or work around it? Or, perhaps other troubleshooting ideas?

 

(as an aside, I’ve been also seeing intermittent bonjour issues, where the server will stop showing up in Finder on Macs on the network, and even also stop accepting connection from a Mac trying to access the shares. This often just starts working again on its own. Not sure if it’s related.)

 

Thanks.

Posted on Apr 7, 2016 11:18 AM

Close

Q: Problems with iOS File Sharing on Server 5.1

  • All replies
  • Helpful answers

  • by rob Copeland,

    rob Copeland rob Copeland Apr 7, 2016 1:30 PM in response to rob Copeland
    Level 1 (10 points)
    Servers Enterprise
    Apr 7, 2016 1:30 PM in response to rob Copeland

    The bonjour issue seems to be related to an IPV6 configure issue, which I've fixed (it seems). The other issue remains, so any help would be appreciated.

  • by T-J-N,

    T-J-N T-J-N May 2, 2016 10:52 AM in response to rob Copeland
    Level 1 (4 points)
    Servers Enterprise
    May 2, 2016 10:52 AM in response to rob Copeland

    Hi Rob

     

    I have the same problem with Postgres running for a bit and then shutting down to never come up again for the iOS file sharing.

    Some log file research leads me to believe that the log rotate job shuts down postgres which causes problems and hinders it from restarting. I found the below in /Library/Server/Logs/ServerDocsPostgreSQL/postgres-xpg.log. It shows one cycle, before the 18:15 block the same entries as from 2:18 are in the log, so it seems to be self-repairing sometimes.

     

     

    2016-05-01 18:15:21 XPG.23943:  Executing pg_ctl ['/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl', '-p', '/Applications/Server.app/Contents/ServerRoot/usr/bin/xpostgres', 'start', '

    -w', '-t', '86400', '-D', '/Library/Server/ServerDocs/Database.xpg/cluster.pg', '-l', '/Library/Server/Logs/ServerDocsPostgreSQL/postgres-xpg.log', '-o', ' -c log_connections=on -c log_min_error_

    statement=WARNING -c listen_addresses= -c max_connections=200 -c log_rotation_size=10MB -c unix_socket_group=_xserverdocs -c log_statement=ddl -c log_line_prefix=%m  -c log_lock_waits=on -c unix_

    socket_permissions=0770 -c log_rotation_age=1440 -c unix_socket_directories=/Library/Server/ServerDocs/Database.xpg/sockets -c log_min_messages=WARNING -c logging_collector=on -c log_filename=pos

    tgres-%%a.log  -c log_truncate_on_rotation=on -c log_directory=/Library/Server/Logs/ServerDocsPostgreSQL']

    2016-05-01 18:15:21 XPG.23943:  Spawning... ['/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl', '-p', '/Applications/Server.app/Contents/ServerRoot/usr/bin/xpostgres', 'start', '-w',

    '-t', '86400', '-D', '/Library/Server/ServerDocs/Database.xpg/cluster.pg', '-l', '/Library/Server/Logs/ServerDocsPostgreSQL/postgres-xpg.log', '-o', ' -c log_connections=on -c log_min_error_state

    ment=WARNING -c listen_addresses= -c max_connections=200 -c log_rotation_size=10MB -c unix_socket_group=_xserverdocs -c log_statement=ddl -c log_line_prefix=%m  -c log_lock_waits=on -c unix_socke

    t_permissions=0770 -c log_rotation_age=1440 -c unix_socket_directories=/Library/Server/ServerDocs/Database.xpg/sockets -c log_min_messages=WARNING -c logging_collector=on -c log_filename=postgres-%%a.log  -c log_truncate_on_rotation=on -c log_directory=/Library/Server/Logs/ServerDocsPostgreSQL']

    waiting for server to start..... done

    server started

    G.23947:  Process parent is PID 1

    2016-05-01 18:15:22 XPG.23947:  Excluding data directory.

    2016-05-01 18:15:22 XPG.23947:  Turning on archive logging.

    2016-05-01 18:15:22 XPG.23947:  Cleaning up any existing postmaster.pid file

    2016-05-01 18:15:22 XPG.23947:  Cleaning up any existing socket lock file

    2016-05-01 18:15:22 XPG.23947:  Starting postgres.

    2016-05-01 18:15:22 XPG.23947:  Waiting for data directory: /Library/Server/ServerDocs/Database.xpg/cluster.pg

    2016-05-01 18:15:22 XPG.23947:  Data directory exists.

    2016-05-01 18:15:22 XPG.23947:  Spawning postgres now.

    2016-05-01 18:15:22 XPG.23947:  Waiting for socket to appear in socket directory: /Library/Server/ServerDocs/Database.xpg/sockets

    2016-05-01 18:15:22.579 CESTLOG:  redirecting log output to logging collector process

    2016-05-01 18:15:22.579 CESTHINT:  Future log output will appear in directory "/Library/Server/Logs/ServerDocsPostgreSQL".

    2016-05-01 18:15:23 XPG.23947:  Socket available; starting should now be complete.

    2016-05-01 18:15:23 XPG.23947:  log receiver: pg_receivexlog: starting log streaming at 0/36000000 (timeline 1)

    2016-05-01 18:15:23 XPG.23947:  Starting backup heartbeat.

    2016-05-02 02:18:07 XPG.49904:  Error locking for pid 23947

    2016-05-02 02:18:07 XPG.23947:  Incremented reference count. Count is now: 2

    2016-05-02 02:18:08 XPG.23947:  Decremented reference count. Count is now: 1

    2016-05-02 02:18:09 XPG.23947:  Decremented reference count. Count is now: 0

    2016-05-02 02:18:09 XPG.23947:  Reference count reached zero.  Shutting down.

    2016-05-02 02:18:09 XPG.23947:  Killing idle connections...

    2016-05-02 02:18:09 XPG.23947:  Spawning... ('/Applications/Server.app/Contents/ServerRoot/usr/bin/psql', '-q', '-h', '/Library/Server/ServerDocs/Database.xpg/sockets', '-d', 'postgres', '-c', "SELECT pid, (SELECT pg_terminate_backend(pid)) as killed from pg_stat_activity WHERE state LIKE 'idle';")

    pid | killed

    -----+--------

    (0 rows)

     

     

    2016-05-02 02:18:09 XPG.23947:  log receiver: pg_receivexlog: finished segment at 0/37000000 (timeline 1)

    2016-05-02 02:18:09 XPG.23947:  log receiver: pg_receivexlog: could not send feedback packet: server closed the connection unexpectedly

            This probably means the server terminated abnormally

            before or while processing the request.

    2016-05-02 02:18:09 XPG.23947:  log receiver: pg_receivexlog: disconnected; waiting 5 seconds to try again

    2016-05-02 02:18:09 XPG.23947:  Postgres exited.

    2016-05-02 02:18:09 XPG.23947:  pg_receivexlog still running; terminating.

    2016-05-02 02:18:09 XPG.23947:  log receiver: pg_receivexlog: could not connect to server: could not connect to server: No such file or directory

            Is the server running locally and accepting

            connections on Unix domain socket "/Library/Server/ServerDocs/Database.xpg/sockets/.s.PGSQL.5432"?