The package does not appear to be on the server (400). / line 1: syntax error

bentoms
Release Candidate Programs Tester

Hi All,

When trying to deploy packages via HTTPS from one of my distribution points i get the following error: "The package does not appear to be on the server (400)"

When trying to deploy scripts via HTTPS from the same point I get the following error: line 1: syntax error near unexpected token `newline'

Things works fine via AFP, also the URL given in the error log works fine copied into Safari on the same macs it fails on... ideas?

I've followed: https://jamfnation.jamfsoftware.com/article.html?id=158 & https://jamfnation.jamfsoftware.com/article.html?id=116 to no avail.

symlink looks good as do permissions (casperadmin owner rw, everyone r only & casperinstall cal r only).

10.7.3 server & client.

JSS 8.5

1 ACCEPTED SOLUTION

bentoms
Release Candidate Programs Tester

i think i've sorted it.. long version: http://macmule.com/2012/04/11/error-the-package-does-not-appear-to-be-on-the-server-400-line-1-synta...

Short version:

for some reason on my 10.7.3 server the document root for all SSL sites was set to /var/empty/ creating the symlink there as per the JAMF articles resolved!

View solution in original post

3 REPLIES 3

bentoms
Release Candidate Programs Tester

Working with JAMF support I think we've found the issue.

The server we're trying to use HTTPS downloads on is using an SSL cert signed by our internal CA.

Curl, doesn't seem to see the certificate trust. Anyway to make curl trust out internal ca?

Something like Ryan's comment in https://jamfnation.jamfsoftware.com/discussion.html?id=3761 should do it.

bentoms
Release Candidate Programs Tester

Ignore that.. seems that as of 10.6 cURL uses the Macs keychain.. so SSL handshaking is ok.. hmm..

curl -vv https://my-mac-server.mycompany.com:443/CasperShare/Scripts/020%20Change%20Auto%20Proxy%20URL.sh
* About to connect() to my-mac-server.mycompany.com port 443 (#0)
*   Trying 10.4.1.9... connected
* Connected to my-mac-server.mycompany.com (10.4.1.9) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*    subject: C=GB; CN=my-mac-server.mycompany.com
*    start date: 2012-04-03 17:17:05 GMT
*    expire date: 2012-10-05 19:59:09 GMT
*    common name: my-mac-server.mycompany.com (matched)
*    issuer: DC=com; DC=mycompany; CN=my-company-ca
*    SSL certificate verify ok.
> GET /CasperShare/Scripts/020%20Change%20Auto%20Proxy%20URL.sh HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: my-mac-server.mycompany.com
> Accept: */*
> 
< HTTP/1.1 400 Bad Request
< Date: Wed, 11 Apr 2012 09:06:17 GMT
< Server: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2
< Content-Length: 353
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
< 
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
<hr>
<address>Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 Server at my-mac-server.mycompany.com Port 443</address>
</body></html>
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

bentoms
Release Candidate Programs Tester

i think i've sorted it.. long version: http://macmule.com/2012/04/11/error-the-package-does-not-appear-to-be-on-the-server-400-line-1-synta...

Short version:

for some reason on my 10.7.3 server the document root for all SSL sites was set to /var/empty/ creating the symlink there as per the JAMF articles resolved!