trouble getting list of nodes via PE 3.7 Rest API
I am trying out the PE 3.7 Rest API and I am unfamiliar with
I think I need to execute this ...
# /usr/bin/curl -X GET \ > --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem \ > --cert /etc/puppetlabs/puppet/ssl/certs/puppetmaster-1.example.com.pem \ > --key /etc/puppetlabs/puppet/ssl/private_keys/puppetmaster-1.example.com.pem > --insecure https://puppetmaster-1:443/v1/nodes
... but this results in this timeout response:
curl: (56) Received HTTP code 504 from proxy after CONNECT
What am I doing wrong here?
Update: I am using proxy since I am in a lab environment so I found I can connect now if I do this ...
# unset no_proxy # unset http_proxy # unset https_proxy
... but I still do not get a list of nodes. So I added
-v to my curl command so now I am getting this:
/usr/bin/curl -v -X GET --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem --cert /etc/puppetlabs/puppet/ssl/certs/puppetmaster-1.example.com.pem --key /etc/puppetlabs/puppet/ssl/private_keys/puppetmaster-1.example.com.pem --insecure https://puppetmaster-1:443/v2/nodes * About to connect() to puppetmaster-1 port 443 (#0) * Trying 10.29.120.143... connected * Connected to puppetmaster-1 (10.29.120.143) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * warning: ignoring value of ssl.verifyhost * skipping SSL peer certificate verification * SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA * Server certificate: * subject: CN=puppetmaster-1.example.com * start date: Dec 14 20:36:42 2014 GMT * expire date: Dec 14 20:36:42 2019 GMT * common name: puppetmaster-1.example.com * issuer: CN=Puppet CA generated on puppetmaster-1.example.com at 2014-12-15 12:... > GET /v2/nodes HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/22.214.171.124 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: puppetmaster-1 > Accept: */* > < HTTP/1.1 303 See Other < Date: Mon, 15 Dec 2014 23:08:41 GMT < Server: Jetty(9.1.z-SNAPSHOT) < Location: /auth/login?redirect=%2Fv2%2Fnodes < Content-Length: 0 < Connection: close < * Closing connection #0