CasperAPI.py is not working
Hi I am trying to run CasperAPI.py to unmanage macs and perform other tasks. However when i run this i get below error message I am running this as admin, i have also remove and re-setup this on my Mac however stil giving me issues.
LAxxxxxxxxx:CasperAPI username$ python CasperAPI_CLI.py unmanagecomputer xxxx
Unmanaging computer xxxx...
Traceback (most recent call last):
File "CasperAPI_CLI.py", line 2006, in
Hi @hpanwar2 - what version of macOS are you using? That could be an error related to an old TLS version on your version of macOS.
You'll probably need TLS version 1.2 to be able to connect to your JSS.
Thanks for your quick reply. I am running Mac OS High Sierra 10.13.6 Regarding the TLS version i believe its TLS V1.2 as when i run "curl https://google.com/ --tlsv1.2 --verbose" command in terminal i get below result.
curl https://google.com/ --tlsv1.2 --verbose
- Trying 216.58.210.46...
- TCP_NODELAY set
- Connected to google.com (216.58.210.46) port 443 (#0)
- ALPN, offering h2
- ALPN, offering http/1.1
- Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
- successfully set certificate verify locations:
- CAfile: /etc/ssl/cert.pem CApath: none
- TLSv1.2 (OUT), TLS handshake, Client hello (1):
- TLSv1.2 (IN), TLS handshake, Server hello (2):
- TLSv1.2 (IN), TLS handshake, Certificate (11):
- TLSv1.2 (IN), TLS handshake, Server finished (14):
- TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
- TLSv1.2 (OUT), TLS change cipher, Client hello (1):
- TLSv1.2 (OUT), TLS handshake, Finished (20):
- TLSv1.2 (IN), TLS change cipher, Client hello (1):
- TLSv1.2 (IN), TLS handshake, Finished (20):
- SSL connection using TLSv1.2 / AES256-GCM-SHA384
- ALPN, server did not agree to a protocol
- Server certificate:
- subject: C=US; ST=California; L=Mountain View; O=Google LLC; CN=*.google.com
- start date: Mar 1 09:43:57 2019 GMT
- expire date: May 24 09:25:00 2019 GMT
- subjectAltName: host "google.com" matched cert's "google.com"
- issuer: C=US; ST=MN; L=Plymouth; O=OptumIT Web Proxy HTTPS Proxy; CN=UHGIntwebproxy2018.uhc.com; [email protected]
- SSL certificate verify ok.
GET / HTTP/1.1 Host: google.com User-Agent: curl/7.54.0 Accept: /
< HTTP/1.1 301 Moved Permanently < Location: https://www.google.com/ < Date: Mon, 11 Mar 2019 17:28:47 GMT < Expires: Wed, 10 Apr 2019 17:28:47 GMT < Cache-Control: public, max-age=2592000 < Server: gws < X-XSS-Protection: 1; mode=block < X-Frame-Options: SAMEORIGIN < Alt-Svc: quic=":443"; ma=2592000; v="46,44,43,39" < Content-Length: 220 < Content-Type: text/html; charset=UTF-8 < Via: 1.1 proxy-ii500-ip2.uhc.com:80 (Cisco-WSA/9.0.1-162) < Connection: keep-alive <
301 Moved
The document has moved here. * Connection #0 to host google.com left intact
It looks like Ben had a similar issue, and had to explicitly enter the port number in the url during the setup for this to work. (I have it working on Jamf Cloud).
https://github.com/eventbrite/Casper-API-Tools/issues/1
Maybe try that?
Thanks.
Thanks for the update, i did follow the steps suggested to ben, nothing really work i can run python CasperAPI_CLI.py -h however nothing apart from this. i have reset up the whole process and used :8443 after the JSS url also put sudo in bash_profile. I am getting the same error