I'm not sure why this is happening.. so here is whats happening:
I rebuild the whole server from scratch including the OSX and reconfigured munki again, am not even using the server app, I only started apache and I got the message "It works" on safari when I browse to the server hostname.
Everything works fine with munki, but when I leave the munki server untouched for few hours.. then it dies again but for some reason it doesn't talk to munki server, here is the output:
sudo /usr/local/munki/managedsoftwareupdate -v
Managed Software Update Tool
Copyright 2010-2019 The Munki Project
https://github.com/munki/munki
Starting...
Checking for available updates...
Getting manifest lab_client...
Download error -1001: The request timed out.
Headers: None
ERROR: Could not retrieve managed install primary manifest.
Checking Apple Software Update catalog...
Caching CatalogURL https://swscan.apple.com/content/catalogs/others/index-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
Skipping Apple Software Update check because sucatalog is unchanged, installed Apple packages are unchanged and we recently did a full check.
Finishing...
Done.
Here is the strange thing, as soon I remote in to the server.. munki works fine and starts pulling the packages with no errors, its like it was in a sleep mode.. I have already checked energy saver settings under the server.. no sleep or power nap is enabled.
Keep in mind, when munki isn't working.. I can ping the server fine also can browse to the webpage and shows the message "It works", also I can browse to the manifest page.
And here is also the output of managed install plist:
sudo defaults read /Library/Preferences/ManagedInstalls
{
AppleSoftwareUpdatesOnly = 0;
ClientIdentifier = "lab_client";
DaysBetweenNotifications = 1;
FollowHTTPRedirects = none;
IgnoreSystemProxies = 0;
InstallAppleSoftwareUpdates = 1;
InstalledApplePackagesChecksum = 553740fd5993ba17d88cefd26c5b41aa31ac8030dbcfedd056cfd09b4e7a330c;
LastAppleSoftwareUpdateCheck = "2020-12-08 02:01:20 +0000";
LastCheckDate = "2020-12-08 05:37:12 +0000";
LastCheckResult = 0;
LogFile = "/Library/Managed Installs/Logs/ManagedSoftwareUpdate.log";
LogToSyslog = 0;
LoggingLevel = 1;
ManagedInstallDir = "/Library/Managed Installs";
OldestUpdateDays = 0;
PackageVerificationMode = hash;
PendingUpdateCount = 0;
PerformAuthRestarts = 0;
ShowOptionalInstallsForHigherOSVersions = 0;
SoftwareRepoURL = "
http://xserver.company.com/repo";
SuppressAutoInstall = 0;
SuppressLoginwindowInstall = 0;
SuppressStopButtonOnInstall = 1;
SuppressUserNotification = 0;
UseClientCertificate = 0;