New install. Client seems like it's working, but doesn't show up on website.

541 views
Skip to first unread message

clarkwg...@gmail.com

unread,
Feb 10, 2016, 6:43:48 PM2/10/16
to munkireport
I'm a new user who just setup MunkiReport today. I'm using OS X server (10.11) running the built-in web services and Munki 2.4.0. I installed the latest version of MunkiReport and configured according to the installer. My test client is also running 10.11 and Munki itself works fine on this client. Both are on the same subnet (192.168.X) and the server is using no authentication (for now). I had a problem earlier with /app/db not being writable, but that was easily fixed with chmod. Everything appears to be working fine on the command line, but I'm not getting any results in the dashboard after what appears to be successful testing. I've re-run the client test several times, and it looks like it's working:

Client:munki user$ sudo /bin/bash -c "$(curl -s http://osxserver.local:8080/index.php?/install)"

Password:

2016-02-10 15:40:49.416 defaults[34347:8433819] 

The domain/default pair of (/Library/Preferences/MunkiReport, UseMunkiAdditionalHttpHeaders) does not exist

Preparing /usr/local/munki/ and /Library/Preferences/MunkiReport

BaseURL is http://osxserver.local:8080/

Retrieving munkireport scripts

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100  1760  100  1760    0     0   217k      0 --:--:-- --:--:-- --:--:--  245k

Configuring munkireport

+ Installing munkireport

Setting preferences

Installation of MunkiReport v2.7.3 complete.

Running the preflight script for initialization

    Munkireport: # Executing scripts in preflight_abort.d

    Munkireport: # Executing scripts in preflight.d

    Munkireport: Running submit.preflight

Client:munki user$ 


When I run managedsoftwareupdate, the preflight and postflight operations look like they're working fine (some data anonymized):

Client:munki user$ sudo /usr/local/munki/managedsoftwareupdate 

Managed Software Update Tool

Copyright 2010-2014 The Munki Project

https://github.com/munki/munki


Starting...

    Performing preflight tasks...

Checking for available updates...

    Retrieving list of software for this machine...

WARNING: Could not process item BitTorrent Sync for optional install. No pkginfo found in catalogs: testing

    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...

Done.


Curl checks against the server also look okay:

Client:munki user$ curl -v http://OSXSERVER.LOCAL:8080/index.php?/report/hash_check --data "items=a%3A0%3A%7B%7D&serial=************"

*   Trying fe80::ca2a:14ff:fe1c:6064...

* Connected to OSXSERVER.LOCAL (fe80::ca2a:14ff:fe1c:6064) port 8080 (#0)

> POST /index.php?/report/hash_check HTTP/1.1

> Host: OSXSERVER.LOCAL:8080

> User-Agent: curl/7.43.0

> Accept: */*

> Content-Length: 40

> Content-Type: application/x-www-form-urlencoded

* upload completely sent off: 40 out of 40 bytes

< HTTP/1.1 200 OK

< Date: Wed, 10 Feb 2016 23:20:38 GMT

< Server: Apache

< X-Powered-By: PHP/5.5.30

< MS-Author-Via: DAV

< Content-Length: 43

< Content-Type: text/html

* Connection #0 to host OSXSERVER.LOCAL left intact

a:2:{s:5:"error";s:0:"";s:4:"info";s:0:"";}Client:munki user$


But I've still got 0 clients and 0 clients per hour shown on the MunkiReport website. Ideas?


 

A.E. van Bochoven

unread,
Feb 11, 2016, 1:44:55 AM2/11/16
to munki...@googlegroups.com
Your problem might be related to IPv6, I never tested that.
Could you run the client test against the IPv4 address?

-Arjen


--
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.

clarkwg...@gmail.com

unread,
Feb 12, 2016, 5:39:24 PM2/12/16
to munkireport

The results are the same. 192.168.10.19 is the IPv4 for the Munki (and MunkiReport) server:


Client:munki user$ sudo /bin/bash -c "$(curl -s http://192.168.10.19:8080/index.php?/install)"

Password:

2016-02-12 14:31:35.079 defaults[44772:12053663] 

The domain/default pair of (/Library/Preferences/MunkiReport, UseMunkiAdditionalHttpHeaders) does not exist

Preparing /usr/local/munki/ and /Library/Preferences/MunkiReport

Retrieving munkireport scripts

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100  1760  100  1760    0     0   918k      0 --:--:-- --:--:-- --:--:-- 1718k

Configuring munkireport

+ Installing munkireport

Setting preferences

Installation of MunkiReport v2.7.3 complete.

Running the preflight script for initialization

    Munkireport: # Executing scripts in preflight_abort.d

    Munkireport: # Executing scripts in preflight.d

    Munkireport: Running submit.preflight


A.E. van Bochoven

unread,
Feb 13, 2016, 10:02:19 AM2/13/16
to munki...@googlegroups.com

clarkwg...@gmail.com

unread,
Feb 18, 2016, 7:32:53 PM2/18/16
to munkireport
I added the debug line to config.php and reran both the curl install command and managedsoftwareupdate. I don't see any extra info in either one. Is the debug info only in the logs?

Client:munki user$ sudo /bin/bash -c "$(curl -s http://192.168.10.19:8080/index.php?/install)"
Password:
2016-02-18 16:28:38.947 defaults[78127:17791249] 
The domain/default pair of (/Library/Preferences/MunkiReport, UseMunkiAdditionalHttpHeaders) does not exist
Preparing /usr/local/munki/ and /Library/Preferences/MunkiReport
Retrieving munkireport scripts
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1760  100  1760    0     0   355k      0 --:--:-- --:--:-- --:--:--  429k
Configuring munkireport
+ Installing munkireport
Setting preferences
Installation of MunkiReport v2.7.3 complete.
Running the preflight script for initialization
    Munkireport: # Executing scripts in preflight_abort.d
    Munkireport: # Executing scripts in preflight.d
    Munkireport: Running submit.preflight
Client:munki user$ sudo /usr/local/munki/managedsoftwareupdate 
Managed Software Update Tool
Copyright 2010-2014 The Munki Project

Starting...
    Performing preflight tasks...
Checking for available updates...
    Retrieving list of software for this machine...
WARNING: Could not process item BitTorrent Sync for optional install. No pkginfo found in catalogs: testing
    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...
Done.

A.E. van Bochoven

unread,
Feb 19, 2016, 1:00:44 AM2/19/16
to munki...@googlegroups.com
Could you post the output of /usr/local/munki/postflight

Sent from my iPhone

clarkwg...@gmail.com

unread,
Feb 19, 2016, 8:03:22 PM2/19/16
to munkireport

#!/usr/bin/python

# encoding: utf-8

'''Postflight script'''


from munkilib import munkicommon

from munkilib import reportcommon

from munkilib import FoundationPlist

import hashlib

import sys

import os


def main():

    '''Main'''

    # get runtype

    if (len(sys.argv) > 1):

        runtype = sys.argv[1]

    else:

        runtype = 'custom'


    # Try to get the munki verbosity level

    verbosity = os.environ.get('MUNKI_VERBOSITY_LEVEL')

    if (verbosity):

        reportcommon.set_verbosity(int(verbosity))

    else:

        reportcommon.set_verbosity(3)


    scriptdir = os.path.realpath(os.path.dirname(sys.argv[0]))


    # Try to run postflight.d

    postflightscriptdir = os.path.join(scriptdir, "postflight.d")

    reportcommon.rundir(postflightscriptdir, runtype, False)


    # Get serial

    hardware_info = munkicommon.get_hardware_info()

    hardware_info['computer_name'] = reportcommon.get_computername()

    hardware_info['cpu'] = reportcommon.get_cpuinfo()

    hardware_info['cpu_arch'] = os.uname()[4]

    hardware_info['hostname'] = os.uname()[1]

    hardware_info['os_version'] = \

        munkicommon.getOsVersion(only_major_minor=False)

    hardware_info['buildversion'] = \

        reportcommon.get_buildversion()

    serial = hardware_info.get('serial_number', 'NO_SERIAL')

    hw_info_plist = FoundationPlist.writePlistToString(hardware_info)


    items = {} # item list

    report_info = {}

    report_info['console_user'] = "%s" % munkicommon.getconsoleuser()

    report_info['runtype'] = runtype

    report_info['runstate'] = 'done'

    report_info['uptime'] = reportcommon.get_uptime()

    report_info_plist = FoundationPlist.writePlistToString(report_info)

    items = {'machine': \

        {'hash':hashlib.md5(hw_info_plist).hexdigest(), 'data':hw_info_plist}, \

            'reportdata': \

        {'hash':hashlib.md5(report_info_plist).hexdigest(), \

            'data':report_info_plist}}

    

    # Read config file /Library/Preferences/Munkireport.plist

    config_items = reportcommon.pref('ReportItems') or {}


    for key, val in config_items.items():

        reportcommon.display_detail("Requesting %s" % key)

        items[key] = {'path':val}


    reportcommon.process(serial, items)


    exit(0)


if __name__ == '__main__':

    main()

Clayton Burlison

unread,
Feb 19, 2016, 9:35:37 PM2/19/16
to munkireport
Hey you posted the contents of the postflight script. The info to help debug this issue would be the output of the postflight script. Please run
sudo /usr/local/munki/postflight

and send us the output from that. It should have an issue of some kind as that is what is sending the data to Munkireport. 

clarkwg...@gmail.com

unread,
Feb 22, 2016, 12:31:35 PM2/22/16
to munkireport
Sorry about that. There's not much to see when running preflight. It seems as though it's running fine. No errors or anything:

Client:~ user$ sudo /usr/local/munki/preflight
Password:
    Munkireport: # Executing scripts in preflight_abort.d
    Munkireport: # Executing scripts in preflight.d
    Munkireport: Running submit.preflight

This is the only "test" client I have, but I'm going to try setting up another this week to see if I can get it to successfully show up on the report website.

A.E. van Bochoven

unread,
Feb 22, 2016, 1:32:19 PM2/22/16
to munki...@googlegroups.com
You're sending the output of the preflight script, but could you send the output of 

sudo /usr/local/munki/postflight


-Arjen

clarkwg...@gmail.com

unread,
Feb 22, 2016, 6:30:25 PM2/22/16
to munkireport
Dammit. Sorry about that. Not paying close enough attention and trying to work on ten things at once. Here's the post flight output:

Client:~ user$ sudo /usr/local/munki/postflight

Password:

    Munkireport: # Executing scripts in postflight.d

    Munkireport: Requesting munkireport

    Status: 200

    Headers: {u'Content-Length': u'65', u'X-Powered-By': u'PHP/5.5.30', u'Keep-Alive': u'timeout=15, max=100', u'MS-Author-Via': u'DAV', u'Server': u'Apache', u'Connection': u'Keep-Alive', u'Date': u'Mon, 22 Feb 2016 23:24:52 GMT', u'Content-Type': u'text/html'}

    Munkireport: Need to update reportdata

    Munkireport: Sending items

    Status: 200

    Headers: {u'Content-Length': u'34', u'X-Powered-By': u'PHP/5.5.30', u'Keep-Alive': u'timeout=15, max=99', u'MS-Author-Via': u'DAV', u'Server': u'Apache', u'Connection': u'Keep-Alive', u'Date': u'Mon, 22 Feb 2016 23:24:52 GMT', u'Content-Type': u'text/html'}

    Munkireport: Server info: starting: reportdata


I setup a second client machine and it's behaving exactly the same. Everything seems like it's fine when running the client setup command [sudo /bin/bash -c "$(curl -s http://example.com/index.php?/install)"], but the web page still shows 0 clients. The postflight output looks virtually the same as shown above:

Client2:~ user$ sudo /bin/bash -c "$(curl -s http://192.168.10.19:8080/index.php?/install)"

Password:

2016-02-22 14:59:36.913 defaults[11013:236351] 

The domain/default pair of (/Library/Preferences/MunkiReport, UseMunkiAdditionalHttpHeaders) does not exist

Preparing /usr/local/munki/ and /Library/Preferences/MunkiReport

BaseURL is http://192.168.10.19:8080/

Retrieving munkireport scripts

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100  1760  100  1760    0     0   369k      0 --:--:-- --:--:-- --:--:--  429k

Configuring munkireport

+ Installing munkireport

Setting preferences

Installation of MunkiReport v2.7.3 complete.

Running the preflight script for initialization

    Munkireport: # Executing scripts in preflight_abort.d

    Munkireport: # Executing scripts in preflight.d

    Munkireport: Running submit.preflight

Client2:~ user$ sudo /usr/local/munki/postflight

Password:

    Munkireport: # Executing scripts in postflight.d

    Munkireport: Requesting munkireport

    Status: 200

    Headers: {u'Content-Length': u'88', u'X-Powered-By': u'PHP/5.5.30', u'Keep-Alive': u'timeout=15, max=100', u'MS-Author-Via': u'DAV', u'Server': u'Apache', u'Connection': u'Keep-Alive', u'Date': u'Mon, 22 Feb 2016 23:26:25 GMT', u'Content-Type': u'text/html'}

    Munkireport: Need to update reportdata

    Munkireport: Need to update munkireport

    Munkireport: Sending items

    Status: 200

    Headers: {u'Content-Length': u'69', u'X-Powered-By': u'PHP/5.5.30', u'Keep-Alive': u'timeout=15, max=99', u'MS-Author-Via': u'DAV', u'Server': u'Apache', u'Connection': u'Keep-Alive', u'Date': u'Mon, 22 Feb 2016 23:26:25 GMT', u'Content-Type': u'text/html'}

    Munkireport: Server info: starting: reportdata

Server info: starting: munkireport

Will Docken

unread,
Sep 16, 2016, 9:22:38 AM9/16/16
to munkireport
Did you ever figure this out?  I'm having the same problem.

clarkwg...@gmail.com

unread,
Sep 16, 2016, 1:01:29 PM9/16/16
to munkireport
I did finally get it to work, but it's been several months. I don't recall exactly what the issue is, and I documented the fix in my ticketing system, but not the specific steps that I performed. Sorry I can't be more help. :-/
Reply all
Reply to author
Forward
0 new messages