felimwhiteley / libsrvrmgrd-osx

Automatically exported from code.google.com/p/libsrvrmgrd-osx
5 stars 2 forks source link

SyntaxError: invalid syntax #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to get the plugin working on Nagios 3.5.0 which is running on an OS 
X Tiger server. In Nagios itself it gives the usual generic message for when a 
plugin doesn't work of "(Return code of 127 is out of bounds - plugin may be 
missing)".

When attempting to run it from the command line to test it, it comes back with 
a syntax error, but can't see what is wrong. The output is below.

mrbenn:/usr/local/nagios/libexec lurch$ sudo 
/usr/local/nagios/libexec/check_osx_server afp 192.168.1.2 311 lurch *****
Traceback (most recent call last):
  File "/usr/local/nagios/libexec/check_osx_server", line 31, in ?
    import pickle, srvrmgrdIO, subprocess, sys, time
  File "/usr/local/nagios/libexec/srvrmgrdIO.py", line 143
    from urllib2 import (HTTPPasswordMgr, HTTPBasicAuthHandler, build_opener, install_opener, urlopen, HTTPError)
                        ^
SyntaxError: invalid syntax

Original issue reported on code.google.com by adam.cow...@gmail.com on 30 Jul 2013 at 2:28

GoogleCodeExporter commented 9 years ago
Discovered what the problem was. The server was running Python 2.3. Updated it 
to Python 2.7.5 and it now works :)

Original comment by adam.cow...@gmail.com on 30 Jul 2013 at 12:49

GoogleCodeExporter commented 9 years ago
Ah excellent :)

Original comment by felimwhiteley on 3 Aug 2013 at 11:24