OS X Caching Server

anverhousseini
Contributor II

Hi JAMF Nation

I struggle with the configuration of an OS X Caching server running on a Mac mini with Yosemite.

The situation:
- 172.57.0.1/22 Subnet
- Firewall with pfSense running DHCP and DNS (172.57.0.1)
- DNS lookup is correct (sudo changeip -checkhostname) on the server directly
- DNS lookup from clients with nslookup is correct
- APN certificate is installed on OS X Server
- There are no VLANs
- Yosemite and OS X Server up-to-date (10.10.5 and 5.0.4)
- DHCP Range 172.57.0.100 to 172.57.3.254

The issue:
The server is not caching anything downloaded by the clients. If you download an app on the server from the App Store the cache works. The Log files in /Library/Server/Caching/Logs do not give any useful information. Regarding Apple Business Support the public IP is registered at Apple. If you run "sudo serveradmin fullstatus caching" the output is:

caching:CacheStatus = "OK"
caching:state = "RUNNING"

The settings in OS X Server are set on default. I already deleted the settings in /Library/Server/Caching and reenabled the caching server. The server was even once reinstalled with a fresh Yosemite installation.

Any idea what could cause this issue? Thanks!

16 REPLIES 16

bcourtade
New Contributor III

First, if you utilize multiple public IP addresses, I would make sure that the public IP is the same on both client and server by going to something like http://whatismyip.com on both client and server. If they don't match, they either need to match or there is going to be some assembly required involving some DNS magic.

Second, Are you under the same public IP as another person using a caching server? We had this problem and the other site with the caching server was behind another firewall which made things not go so well. We set ours up like below to make sure it used ours:
e355102df8af4318b5cad72944bf2418

Third, enabling the LogClientIdentity option is helpful. It shows every connection to the caching service in the caching server log. This should show if it is making the connection at all.

sudo serveradmin settings caching:LogClientIdentity = true

anverhousseini
Contributor II

@bcourtade Thanks for your help!

The public IP is the same for the clients and the server. There is only one public IP. This server is the only one in this network.

I will check the logs. Thanks for that hint!

anverhousseini
Contributor II

@bcourtade

Just checked the logs. Nothing happens:

Cache manager initialized, cache contains 0 bytes of unlimited (including 0 bytes of unlimited personal [icloud])
2015-10-12 18:18:29.164 HTTPServer: Started HTTP server on all interfaces, port 63099
2015-10-12 18:18:29.166 Retrieving configuration
2015-10-12 18:18:29.653 Request for configuration from http://suconfig.apple.com/resource/registration/v1/config.plist succeeded
2015-10-12 18:18:29.778 Cleaning cache
2015-10-12 18:18:29.909 Cleanup succeeded.
2015-10-12 18:18:29.909 Registering for notifications
2015-10-12 18:18:29.913 Registering for service
2015-10-12 18:18:32.170 Registering with local address: 172.57.0.11 (1000 Mbit/sec wired); local subnet range only: 172.57.0.0-172.57.3.255; on AC power: yes; cache size: ~953 GB; capabilities: im,ns,pc,qp,sc; portable: no
2015-10-12 18:18:32.613 Request for registration from https://lcdn-registration.apple.com/lcdn/register succeeded
2015-10-12 18:18:32.613 Got back public IP xxx.xxx.xxx.xxx
2015-10-12 18:18:32.618 Registration succeeded.  Resuming server.
2015-10-12 18:18:32.618 This server has 0 peers

bpriscott
New Contributor

If your not seeing any logs from the cache I would delete the OSX Server app trash it. Then redownload and rerun it. Hope this does it. Does sounds like a permission issue.

anverhousseini
Contributor II

@bpriscott I made already a clean install.

bpriscott
New Contributor

Before or after the upgrade, sometimes the services get stuck; redoing that part doesn't harm services just takes them out momentarily.

Is the root user enabled, and did you setup the server as root?

If you do "sudo serveradmin settings caching", whats the output.

anverhousseini
Contributor II

I made a clean install without backup and import the settings. Root user is disabled and server was set up with a local administrator. Here the output:

caching:ReservedVolumeSpace = 25000000000
caching:LogClientIdentity = "true"
caching:CacheLimit = 0
caching:ServerRoot = "/Library/Server"
caching:ServerGUID = "E81CCA1F-C3B7-46E7-8092-92A493C2EB77"
caching:DataPath = "/Library/Server/Caching/Data"
caching:LocalSubnetsOnly = yes
caching:Port = 63099

AVmcclint
Honored Contributor

Was there ever any progress on this? I'm having a helluva time getting my caching server to work right. A few months ago I set it up and it did eventually start working. However, now when I run softwareupdate on any Macs on the network, the cache size does not change at all, there is zero activity in the log, and the activity graph doesn't show anything at all. I've done everything the same way @anverhousseini has done it and I also ran the sudo serveradmin settings caching:LogClientIdentity = true command, but it doesn't show any connections at all. It used to work and now it doesn't. I'm running Sierra 10.12.3 and Server.app 5.2. I can't say for sure but I think it broke when I upgraded from El Capitan to Sierra. I've Reset the cache, I've turned the service off and back on again. Since Apple doesn't give any tips other than "turn it on" for configuring it, I'm out of ideas.

AVmcclint
Honored Contributor

I also ran softwareupdate on the server itself because I've heard that also counts as a client request... still nothing cached.

anverhousseini
Contributor II

@AVmcclint What is your local network range?

AVmcclint
Honored Contributor

I have it set for All Networks because we don't share space with anyone.

anverhousseini
Contributor II

@AVmcclint No, I mean what is your local network range from the the caching server (e.g. 10.0.100.0/24)?

AVmcclint
Honored Contributor

10.x.x.0/24

anverhousseini
Contributor II

@AVmcclint Because I had a 172.57.0.1/22 subnet which is not a private IPv4 address space: https://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces

calumhunter
Valued Contributor

softwareupdate is broken in 10.12. it does not use any available caching servers this is why you are seeing this behaviour.

You should be able to see the caching server work though by downloading apps from the app store or updating using an iOS device

for reference here is one of many bug reports indicating this issue:
https://openradar.appspot.com/30311121

AVmcclint
Honored Contributor

Thanks for that info, but I've tried not only the softwareupdate command but also via the app store. The server behaves as if no connections at al are even being attempted. I installed updates on the server itself via the App Store hoping that might at least show some kind of self-reference in the logs... but nothing at all was logged. The client Macs are mostly 10.11 with a very small handful at 10.12. None of them are pulling from the caching service. I hope this is something Apple can fix.