Weird Error

90 views
Skip to first unread message

Chris Whittle

unread,
Oct 8, 2015, 1:54:56 PM10/8/15
to simian-...@googlegroups.com
Any ideas on this one?   I have a laptop that hasn't postflighted in over a month, here is the error i get when I run it manually.


Managed Software Update Tool
Copyright 2010-2014 The Munki Project
https://github.com/munki/munki
Starting...
Performing preflight tasks...
preflight return code: 1
preflight stderr: /usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/client/gae_client.zip/google/appengine/tools/dev_appserver_login.py:33: DeprecationWarning: the md5 module is deprecated; use hashlib instead
/usr/local/munki/simian/lib/python2.6/site-packages/tlslite-0.3.8-py2.6.egg/tlslite/utils/cryptomath.py:9: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
WARNING:root:Root CA Cert Chain was EMPTY!
WARNING:root:Root CA Cert Chain was EMPTY!
Traceback (most recent call last):
File "/usr/local/munki/simian_client.py", line 87, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/munki/simian_client.py", line 73, in main
preflight.RunPreflight(runtype, server_url=server_url)
File "/usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/mac/client/preflight.py", line 437, in RunPreflight
flight_common.UploadClientLogFiles(client)
File "/usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/mac/client/flight_common.py", line 778, in UploadClientLogFiles
client.UploadFile(log_file_path, 'log')
File "/usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/client/client.py", line 1809, in UploadFile
self.Do('PUT', url, file_handle)
File "/usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/client/client.py", line 718, in Do
method, url, body=body, headers=headers, output_file=output_file)
File "/usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/client/client.py", line 669, in _DoRequestResponse
self._Request(method, conn, url, body=body, headers=headers)
File "/usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/client/client.py", line 643, in _Request
conn.request(method, str(url), body=body, headers=headers)
File "/usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/client/client.py", line 291, in request
self.send(buf)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 759, in send
self.sock.sendall(str)
File "build/bdist.macosx-10.9-x86_64/egg/M2Crypto/SSL/Connection.py", line 217, in write
File "build/bdist.macosx-10.9-x86_64/egg/M2Crypto/SSL/Connection.py", line 202, in _write_nbio
M2Crypto.SSL.SSLError: (32, 'Broken pipe')
managedsoftwareupdate run aborted by preflight script: 1

Thanks! 

Justin McWilliams

unread,
Oct 9, 2015, 3:41:00 PM10/9/15
to Simian Discuss
The only things I can think of are:
- if there are any configured proxies, confirm settings with other functional devices; potentially reset/reconfigure them.
- try a different network (though presumably this device is not alone on the network)
- reinstall Simian (perhaps OS X was updated but Simian and thus M2Crypto was not?  you can check for existence of the right egg in /usr/local/munki/simian/VE/Python/lib ... or something similar to that, I'm not on a Mac at the moment)


I can't find the thread in history, but someone else had an isolated error ~similar to this (maybe not exactly the same error, but at the same layer) in the past and resorted to reimaging the machine.  IIRC, they couldn't even reach App Engine using curl (can you?).  There's probably an easier fix, (albeit still a hammer) such as reinstalling network interface configurations, but it's hard to say. 

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

Chris Whittle

unread,
Oct 12, 2015, 10:20:00 AM10/12/15
to Simian Discuss
hmmm, 
We don't have any proxies unless it's on their residential internet upstream.
Working on the different network...
The reinstall simian doesn't seem to change anything (error persisted afterwards)

Can you give me a test url to try the curl to Google App Engine?
Thanks Jason!

Justin McWilliams

unread,
Oct 12, 2015, 10:46:09 AM10/12/15
to Simian Discuss
If it works on a different network, then it definitely seems related to whatever network configuration is unique to that connection.  I'd suggest working with the network admin there.

You can simply try to curl to your Simian server (from the affected network):  curl -v https://<your-app>.appspot.com

- Justin

Chris Whittle

unread,
Oct 12, 2015, 10:59:37 AM10/12/15
to simian-...@googlegroups.com
It's their house so there isn't a network admin or really anything in between them unless the IP is doing something weird...

I curl'd it and it connected just fine so back to the drawing board for me.

Thanks for your help (and work on the project), I really appreciate it.

--
You received this message because you are subscribed to a topic in the Google Groups "Simian Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simian-discuss/3i856k3Ug9E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simian-discus...@googlegroups.com.

Chris Whittle

unread,
Oct 27, 2015, 3:58:58 PM10/27/15
to Simian Discuss
We're down to 2 machines with this issue (fixed by reinstalls) .... 
They are remote and a reinstall isn't possible...  
Does anyone have any ideas on what I could do to try to fix?

Thanks


On Monday, October 12, 2015 at 9:59:37 AM UTC-5, Chris Whittle wrote:
It's their house so there isn't a network admin or really anything in between them unless the IP is doing something weird...

I curl'd it and it connected just fine so back to the drawing board for me.

Thanks for your help (and work on the project), I really appreciate it.
On Mon, Oct 12, 2015 at 9:45 AM, 'Justin McWilliams' via Simian Discuss <simian-discuss@googlegroups.com> wrote:
If it works on a different network, then it definitely seems related to whatever network configuration is unique to that connection.  I'd suggest working with the network admin there.

You can simply try to curl to your Simian server (from the affected network):  curl -v https://<your-app>.appspot.com

- Justin
To unsubscribe from this group and stop receiving emails from it, send an email to simian-discuss+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Simian Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simian-discuss/3i856k3Ug9E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simian-discuss+unsubscribe@googlegroups.com.

Justin McWilliams

unread,
Oct 27, 2015, 4:07:27 PM10/27/15
to Simian Discuss
So some cases were fixed by reinstalling OS X?  Wild!  I'm stretching here, but you could try to delete/recreate the network interface in hopes that resets some state potentially causing issues, i.e. https://kb.wisc.edu/helpdesk/page.php?id=26681

On Tue, Oct 27, 2015 at 3:58 PM, Chris Whittle <chrisw...@collectivebias.com> wrote:
We're down to 2 machines with this issue (fixed by reinstalls) .... 
They are remote and a reinstall isn't possible...  
Does anyone have any ideas on what I could do to try to fix?

Thanks


On Monday, October 12, 2015 at 9:59:37 AM UTC-5, Chris Whittle wrote:
It's their house so there isn't a network admin or really anything in between them unless the IP is doing something weird...

I curl'd it and it connected just fine so back to the drawing board for me.

Thanks for your help (and work on the project), I really appreciate it.
On Mon, Oct 12, 2015 at 9:45 AM, 'Justin McWilliams' via Simian Discuss <simian-...@googlegroups.com> wrote:
If it works on a different network, then it definitely seems related to whatever network configuration is unique to that connection.  I'd suggest working with the network admin there.

You can simply try to curl to your Simian server (from the affected network):  curl -v https://<your-app>.appspot.com

- Justin

--
You received this message because you are subscribed to a topic in the Google Groups "Simian Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simian-discuss/3i856k3Ug9E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simian-discus...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Chris Whittle

unread,
Oct 27, 2015, 4:16:08 PM10/27/15
to simian-...@googlegroups.com
Hmmm, so potentially if they switched to whatever alternative Internet connections from they are using (Wifi switch to Ethernet or vice versa) to test?

Thanks!

Justin McWilliams

unread,
Oct 27, 2015, 4:22:10 PM10/27/15
to Simian Discuss
Possibly.  If reinstall the OS is fixing this issue on other clients, it seems the problem is a config/etc. local to the device, not a config/etc. on the network infrastructure.  So, different interfaces may behave differently, and removing/recreating an interface *may* reset the config in some way (I'm not sure; stabbing in the dark a bit).  Perhaps toggle off the OS firewall, if it's on, as a test too...  

fredrik....@scilifelab.se

unread,
Dec 7, 2015, 10:52:48 AM12/7/15
to Simian Discuss
I just had the exact same error on a machine and I managed to somewhat solve it (or workaround perhaps) by commenting a few rows in:
/usr/local/munki/simian/lib/python2.6/site-packages/simian-2.4-py2.6.egg/simian/mac/client/preflight.py

  #if feedback.get('upload_logs'):
  #  # write new token/client_id headers to secure plist and upload logs.
  #  flight_common.UploadClientLogFiles(client)

  #if feedback.get('pkill_installd'):
  #  # terminate any pending installations, like misbehaving Apple updates.
  #  flight_common.Pkill(process='installd', waitfor=2)

  #if feedback.get('repair'):
  #  # write new token/client_id headers to secure plist and repair client.
  #  try:
  #    logging.info('Reinstalling Munki client....')
  #    flight_common.RepairClient()
  #    logging.info('Client successfully reinstalled.')
  #  except flight_common.RepairClientError, e:
  #    logging.exception('RepairClientError: %s', str(e))

  #if feedback.get('logging_level'):
  #  regular_config['LoggingLevel'] = feedback.get('logging_level')
  #else:
  regular_config['LoggingLevel'] = 1  # default to 1 if not set by server.

  #if feedback.get('exit'):
  #  logging.warning('preflight received EXIT feedback from server; exiting....')
  #  sys.exit(STATUS_SERVER_EXIT_FEEDBACK[0])

After that managedsoftwareupdate worked again.

I possibly only had to comment the top block, the one with upload_logs, but I was in a hurry so I commented all logging I could find.
I also removed the comments after running managedsoftwareupdate and the client still worked.


/Fredrik

Justin McWilliams

unread,
Dec 7, 2015, 11:13:33 AM12/7/15
to Simian Discuss
Can you try to uncomment lines (perhaps one-by-one) to see which actually break the client?   I see upload_logs and repair as the only potential culprits (though, repair is not much different than a standard pkg download).

fredrik....@scilifelab.se

unread,
Dec 8, 2015, 3:26:36 AM12/8/15
to Simian Discuss
I actually uncommented all lines after I ran managedsoftwareupdate once and managedsoftwareupdate still worked after that.
Unfortunately I didn't have time to do any more tests as the user was standing around waiting for me to finish so she could go home..

It's the first time I see this problem in several years but if I ever encounter it again I will do more testing.

/Fredrik

fredrik....@scilifelab.se

unread,
Mar 7, 2017, 6:32:54 AM3/7/17
to Simian Discuss
I encountered this issue again today and this time I only commented the lines about upload_logs:
  #if feedback.get('upload_logs'):
  #  # write new token/client_id headers to secure plist and upload logs.
  #  flight_common.UploadClientLogFiles(client)

And again after running managedsoftwareupdate once with those lines commented I uncommented and it still works.

/Fredrik
Reply all
Reply to author
Forward
0 new messages