Client not reporting properly (config error? also HTTP returncode 500)

32 views
Skip to first unread message

Matthias

unread,
Aug 9, 2023, 6:21:12 AM8/9/23
to munkireport
Hi all,
we've set up munkireport on Apache 2.4.55 running on a Windows machine, with PHP 8.2.7.
Munkireport System Status looks fine, PHP and database seem to be working.
I've installed the MacAdmins Python package on the first test client. The client shows up in the Client Report with its serial number, but no further information. Clicking on the item results in a error message saying "Client with serial number "KXXXXXXX3" does not exist.

Here's what I've tried/looked at:

Output of sudo munkireport-runner --show-config on the client:
Traceback (most recent call last):
  File "/usr/local/munkireport/munkireport-runner", line 225, in <module>
    main()
  File "/usr/local/munkireport/munkireport-runner", line 80, in main
    receipt_info = get_receipt_info()
  File "/usr/local/munkireport/munkireport-runner", line 26, in get_receipt_info
    mr_receipt = FoundationPlist.readPlist("/private/var/db/receipts/com.github.munkireport.plist")
  File "/usr/local/munkireport/munkilib/FoundationPlist.py", line 85, in readPlist
    raise NSPropertyListSerializationException(errmsg)
munkilib.FoundationPlist.NSPropertyListSerializationException: b'stream had too few bytes' in file /private/var/db/receipts/com.github.munkireport.plist

So something's not right there.

Running sudo /usr/local/munkireport/munkireport-runner works fine at first, but ends with
(…)
Sending items (591KB)
    Status: 500
    Headers: {'Transfer-Encoding': 'Identity', 'Content-Type': 'text/html; charset=UTF-8', 'Connection': 'close', 'Server': 'Apache/2.4.55 (Win64) OpenSSL/1.1.1s PHP/8.2.7', 'Date': 'Wed, 09 Aug 2023 09:03:56 GMT'}
ERROR: http://192.168.45.244/munkireport/index.php?/report/check_in failed, HTTP returncode 500 (internal server error)
    ## Finished run


According to previous posts, I've looked at the server logs. There's nothing in Apache's error.log. The access.log shows the following:
192.168.45.54 - - [09/Aug/2023:11:27:12 +0200] "GET /munkireport/index.php?/module/managedinstalls/get_pending_installs/applesus HTTP/1.1" 200 2
192.168.45.54 - - [09/Aug/2023:11:27:12 +0200] "GET /munkireport/index.php?/module/disk_report/get_stats HTTP/1.1" 200 85
192.168.45.54 - - [09/Aug/2023:11:27:12 +0200] "GET /munkireport/index.php?/module/managedinstalls/get_pending_installs/munki HTTP/1.1" 200 2
192.168.45.54 - - [09/Aug/2023:11:27:12 +0200] "GET /munkireport/index.php?/module/reportdata/get_lastseen_stats HTTP/1.1" 200 138
192.168.45.54 - - [09/Aug/2023:11:27:12 +0200] "GET /munkireport/index.php?/module/munkireport/get_stats/168 HTTP/1.1" 200 29
192.168.45.54 - - [09/Aug/2023:11:27:12 +0200] "GET /munkireport/index.php?/module/reportdata/getUptimeStats HTTP/1.1" 200 49
192.168.45.54 - - [09/Aug/2023:11:27:12 +0200] "GET /munkireport/index.php?/module/reportdata/get_lastseen_stats HTTP/1.1" 200 138
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "GET /munkireport/index.php?/show/listing/reportdata/clients HTTP/1.1" 200 26631
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "GET /munkireport/index.php?/module/reportdata/js/reportdata HTTP/1.1" 200 1241
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "POST /munkireport/index.php?/settings/theme HTTP/1.1" 200 8
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "GET /munkireport/index.php?/locale/get/en HTTP/1.1" 200 76354
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "GET /munkireport/assets/images/favicons/favicon-32x32.png HTTP/1.1" 200 2534
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "GET /munkireport/assets/images/favicons/apple-touch-icon.png HTTP/1.1" 200 17323
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "GET /munkireport/assets/locales/dataTables/en.json HTTP/1.1" 200 768
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "GET /munkireport/assets/themes/fonts/glyphicons-halflings-regular.woff2 HTTP/1.1" 200 18028
192.168.45.54 - - [09/Aug/2023:11:27:14 +0200] "POST /munkireport/index.php?/datatables/data HTTP/1.1" 200 691
192.168.45.54 - - [09/Aug/2023:11:27:58 +0200] "GET /munkireport/index.php?/clients/detail/K6CX6P9D43 HTTP/1.1" 200 19556
192.168.45.54 - - [09/Aug/2023:11:27:59 +0200] "POST /munkireport/index.php?/settings/theme HTTP/1.1" 200 8
192.168.45.54 - - [09/Aug/2023:11:27:59 +0200] "GET /munkireport/index.php?/locale/get/en HTTP/1.1" 200 76354

I’ve tried to get error logs from PHP, but so far haven’t managed. Not sure whether I’ve just not set the php.ini correctly, or PHP just not throwing errors. How could I force an error in PHP to check if something ends up in php_errors.log?

Any help on getting this configured properly would be appreciated!

Matthias

unread,
Sep 20, 2023, 3:14:29 AM9/20/23
to munkireport
Nobody? Wish someone could give me some clues which direction to look next...

Mike Solin

unread,
Sep 21, 2023, 12:46:02 AM9/21/23
to munki...@googlegroups.com
Hey Matthias -

Sorry, I think most of us focus our efforts in the #munkireport channel in the Mac Admins Slack. Join at: macadmins.org

From the logs you posted, it looks like the issue might be related to Python. Did you install the latest release version?


If you've installed the prerelease version of 3.11 instead, things might not work. Give the one above a try instead.

If you don't have any success with that, try joining the Slack channel I mentioned above and we can probably help you in realtime. :)

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/munkireport/309b4884-9348-4338-aa21-f833eebeba96n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages