MunkiReport 2.13.0 issues

588 views
Skip to first unread message

cashxx

unread,
Mar 30, 2017, 9:53:33 PM3/30/17
to munkireport
Having some issues and hoping someone can point me in the right direction!!  Upgraded to MunkiReport 2.13.0 and Munki 2.8.2.2855.  Server is running 10.6.8 and clients are running 10.11.6 mainly.  Three are 10.8.5 and 3 are 10.12.2.

1) If I run munki on a client I keep getting the following errors:
postflight stderr: WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/services.txt
WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/security.txt
WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/crashplan.txt

I did have these enabled in the server config file and removed them and recreated the client package.  Told the clients to forget the old package and had munki install this new client package and it all goes good.  But I keep getting these errors.

I also removed the clients from munkireports client page and uninstalled munkitreport on the clients with the following and then left munki reinstall the package after forgetting it on the clients again and still no luck.  Not sure what I am missing?
rm -rf /usr/local/munki/munkilib/phpserialize.py
rm -rf /usr/local/munki/munkilib/reportcommon.py
rm -rf /usr/local/munki/postflight.d
rm -rf /usr/local/munki/preflight_abort.d
rm -rf /usr/local/munki/preflight.d
rm -rf /usr/local/munki/postflight
rm -rf /usr/local/munki/preflight
rm -rf /usr/local/munki/report_broken_client
rm -rf /Library/Preferences/MunkiReport.plist
pkgutil --forget com.github.munkireport


All the modules I have enabled on the server in the config file are:
$conf['modules'] = array('ard','bluetooth','directory_service','disk_report','displays_info','fan_temps','fonts','gpu','gsx','homebrew','homebrew_info','installhistory','inventory','localadmin'
,'machine','munkiinfo','munkireport','munkireportinfo','network','printer','profile','security','softwareupdate','reportdata','warranty','wifi','managedinstalls');


2) In MunkiReports under Listings I have MunkiReport.  Only 3 clients are showing out of 54.  They are all setup the same way.  Not sure why only 3 decided to work?
Same goes for GPUs, the same 3 clients reported info back, but the rest didn't.  If you run munki on the client it looks as if its seeing this and sending it to the server on postflight.  Not sure what is going on here either as everything else works fine or so it seems to be?

Message has been deleted

cashxx

unread,
Mar 31, 2017, 8:39:35 AM3/31/17
to munkireport
If I run postflight on the client I get the following at the end:
Munkireport: Sending items (864KB)
    Status: 500
    Headers: {u'Content-Length': u'67', u'X-Powered-By': u'PHP/5.3.26', u'Expires': u'Fri, 31 Mar 2017 12:38:09 GMT', u'MS-Author-Via': u'DAV', u'Server': u'Apache/2.2.24 (Unix) PHP/5.3.26', u'Connection': u'close', u'Refresh': u'180;', u'Cache-Control': u'max-age=60', u'Date': u'Fri, 31 Mar 2017 12:37:09 GMT', u'Content-Type': u'text/html'}
ERROR: Munkireport: http://myserver.domain.com/munkireport-php/index.php?/report/check_in failed, HTTP returncode 500 (internal server error)

A.E. van Bochoven

unread,
Mar 31, 2017, 9:17:49 AM3/31/17
to munki...@googlegroups.com
An error 500 should show up in the server logs

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "munkireport" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munkireport...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cashxx

unread,
Mar 31, 2017, 10:37:59 AM3/31/17
to munkireport
I ripped out some more modules and recreated a client package, output is below.  On a client I uninstalled Munkireport.  After installing this package the client is still trying to report back crashplan, etc.  Where is it getting this from?  I completely uninstalled MunkiReport from the client and don't see it anywhere in the package either:

MacPro:~ myusername$ bash -c "$(curl http://myserver.domain.com/munkireport-php/index.php?/install)" bash -i ~/Desktop
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 24172    0 24172    0     0   151k      0 --:--:-- --:--:-- --:--:--  151k
Preparing /var/folders/r6/ygfwxrs10vzcp0rh0hs9znc50vsxvl/T/mrpkg.U5ccbQZN/install_root/usr/local/munki/ and $3/Library/Preferences/MunkiReport
BaseURL is http://myservername.domain.com/munkireport-php/
Retrieving munkireport scripts
Configuring munkireport
+ Installing ard
+ Installing bluetooth
+ Installing directory_service
+ Installing disk_report
+ Installing displays_info
+ Installing installhistory
+ Installing inventory
+ Installing localadmin
+ Installing managedinstalls
+ Installing munkiinfo
+ Installing munkireport
+ Installing munkireportinfo
+ Installing network
+ Installing printer
+ Installing profile
+ Installing security
+ Installing wifi
Building MunkiReport v2.13.0 package.
pkgbuild: Inferring bundle components from contents of /var/folders/r6/ygfwxrs10vzcp0rh0hs9znc50vsxvl/T/mrpkg.U5ccbQZN/install_root
pkgbuild: Adding top-level preinstall script
pkgbuild: Adding top-level postinstall script
pkgbuild: Wrote package to /Users/myusername/Desktop/munkireport-2.13.0.pkg
Cleaning up temporary directory /var/folders/r6/ygfwxrs10vzcp0rh0hs9znc50vsxvl/T/mrpkg.U5ccbQZN


Uninstall MunkiReport and then run Munki....looks clean.  Upload the new Package and run Munki Install and then run Munki again and get the following:
Starting...
    Performing preflight tasks...
Checking for available updates...
    Getting client resources...
    Getting client resources...
Finishing...
    Performing postflight tasks...
    postflight stderr: WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/warranty.txt
WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/homebrew_info.json
WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/gpuinfo.plist
WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/fan_temps.plist
WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/homebrew.json
WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/gsx.txt
WARNING: Munkireport: Can't open /usr/local/munki/preflight.d/cache/fonts.plist

ERROR: Munkireport: http://myserver.domain.com/munkireport-php/index.php?/report/check_in failed, HTTP returncode 500 (internal server error)
Done.


Don't get where it is getting the Warnings from as I don't see them in the package for homebrew, etc.

A.E. van Bochoven

unread,
Mar 31, 2017, 10:40:01 AM3/31/17
to munki...@googlegroups.com
Try if 

sudo killall cfprefsd

Helps

Sent from my iPhone
--

cashxx

unread,
Mar 31, 2017, 10:40:21 AM3/31/17
to munkireport
Postinstall script in package:

#!/bin/bash
defaults write $3/Library/Preferences/MunkiReport BaseUrl "http://myserver.domain.com/munkireport-php/"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add ard "/Library/Preferences/com.apple.RemoteDesktop.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add bluetooth "/usr/local/munki/preflight.d/cache/bluetoothinfo.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add directory_service "/usr/local/munki/preflight.d/cache/directoryservice.txt"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add disk_report "/usr/local/munki/preflight.d/cache/disk.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add displays_info "/usr/local/munki/preflight.d/cache/displays.txt"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add installhistory "/Library/Receipts/InstallHistory.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add inventory "/Library/Managed Installs/ApplicationInventory.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add localadmin "/usr/local/munki/preflight.d/cache/localadmins.txt"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add managedinstalls "/usr/local/munki/postflight.d/cache/managedinstalls.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add munkiinfo "/usr/local/munki/preflight.d/cache/munkiinfo.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add munkireport "/usr/local/munki/postflight.d/cache/munkireport.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add munkireportinfo "/Library/Preferences/MunkiReport.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add network "/usr/local/munki/preflight.d/cache/networkinfo.txt"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add printer "/usr/local/munki/preflight.d/cache/printer.txt"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add profile "/usr/local/munki/preflight.d/cache/profile.txt"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add security "/usr/local/munki/preflight.d/cache/security.plist"
defaults write $3/Library/Preferences/MunkiReport ReportItems -dict-add wifi "/usr/local/munki/preflight.d/cache/wifi.txt"
defaults write $3/Library/Preferences/MunkiReport Version 2.13.0.2657

cashxx

unread,
Mar 31, 2017, 10:48:52 AM3/31/17
to munkireport
SOB......that did it running sudo killall cfprefsd

Crossed my mind earlier and forgot to try it!

Thanks!

Henrik Bergalm

unread,
Apr 4, 2017, 8:26:12 AM4/4/17
to munkireport
I get the exact same error with munkireport 2.13.0 and it doesn't work with killall cfprefsd.
If I downgrade the server to 2.12.0 the error disappears.
If the client installs the new version the error doesn't show until I run defaults read /Library/Preferences/MunkiReport.plist BaseUrl
If I add $conf['debug'] = TRUE; do my config.php the error disappears.
I get nothing in the error log on the web server. 

What am I missing?

root# /usr/local/munki/postflight
    Munkireport: # Executing scripts in postflight.d
    Munkireport: Running inventory_add_plugins.py
    Munkireport: Adding 11 plugins
    Munkireport: Running managedinstalls.py
    Munkireport: Running munkireport.py
    Munkireport: Requesting ard
    Munkireport: Requesting appusage
    Munkireport: Requesting munkiinfo
    Munkireport: Requesting homebrew
    Munkireport: Requesting profile
    Munkireport: Requesting deploystudio
    Munkireport: Requesting location
    Munkireport: Requesting findmymac
    Munkireport: Requesting installhistory
    Munkireport: Requesting network
    Munkireport: Requesting fan_temps
    Munkireport: Requesting bluetooth
    Munkireport: Requesting fonts
    Munkireport: Requesting displays_info
    Munkireport: Requesting localadmin
    Munkireport: Requesting directory_service
    Munkireport: Requesting munkireport
    Munkireport: Requesting gpu
    Munkireport: Requesting disk_report
    Munkireport: Requesting power
    Munkireport: Requesting usb
    Munkireport: Requesting inventory
    Munkireport: Requesting softwareupdate
    Munkireport: Requesting managedinstalls
    Munkireport: Requesting sccm_status
    Munkireport: Requesting gsx
    Munkireport: Requesting security
    Munkireport: Requesting filevault_status
    Munkireport: Requesting wifi
    Munkireport: Requesting network_shares
    Munkireport: Requesting homebrew_info
    Munkireport: Requesting warranty
    Munkireport: Requesting timemachine
    Munkireport: Requesting crashplan
    Munkireport: Requesting munkireportinfo
    Munkireport: Requesting printer
    Munkireport: connection_willSendRequestForAuthenticationChallenge_
    Munkireport: Authentication challenge for Host: server.domain.se Realm: None AuthMethod: NSURLAuthenticationMethodServerTrust
    Munkireport: Allowing OS to handle authentication request
    Munkireport: Need to update reportdata (372B)
    Munkireport: Need to update softwareupdate (490B)
    Munkireport: Need to update power (4KB)
    Munkireport: Need to update homebrew (0B)
    Munkireport: Need to update inventory (141KB)
    Munkireport: Need to update fonts (531KB)
    Munkireport: Need to update gsx (30B)
    Munkireport: Need to update usb (4KB)
    Munkireport: Sending items (681KB)
    Status: 500
    Headers: {u'Content-Length': u'34', u'X-Powered-By': u'PHP/5.4.16', u'Server': u'Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16 mod_wsgi/3.4 Python/2.7.5', u'Connection': u'close', u'Date': u'Tue, 04 Apr 2017 12:21:51 GMT', u'Content-Type': u'text/html; charset=UTF-8'}
ERROR: Munkireport: https://server.domain.se/munkireport/index.php?/report/check_in failed, HTTP returncode 500 (internal server error)

root# managedsoftwareupdate 
Managed Software Update Tool
Copyright 2010-2016 The Munki Project

Starting...
    Performing preflight tasks...
    Completed creation of client keychain at /Library/Managed Installs/Keychains/munki.keychain
Checking for available updates...
    Retrieving list of software for this machine...
    Getting client resources...
    Getting client resources...
Checking Apple Software Update catalog...
    Skipping Apple Software Update check because sucatalog is unchanged, installed Apple packages are unchanged and we recently did a full check.
Finishing...
    Performing postflight tasks...
    postflight stderr: ERROR: Munkireport: https://server.domain.se/munkireport/index.php?/report/check_in failed, HTTP returncode 500 (internal server error)
Done.

Henrik Bergalm

unread,
Apr 4, 2017, 9:21:28 AM4/4/17
to munkireport
I noticed this message in the web server error log when I had debug on:
PHP Fatal error:  Call to undefined function array_column() in /var/www/html/munkireport/app/modules/softwareupdate/softwareupdate_model.php on line 106

I updated to php 5.5 and it solved the problem. Now it works fine again =)
Reply all
Reply to author
Forward
0 new messages