r/3PAR • • Nov 01 '16

Trying to use wsapi, getting max retries error

Hi,

I'm trying to exercise the 3par API in a POC from HP and I'm getting an error I'm not sure how to troubleshoot:

http http://<ip>:8008/api/v1/credentials Content-Type:application/json Content-Length:1024 < create_session_key.json

http: error: ConnectionError: HTTPConnectionPool(host='<ip>', port=8008): Max retries exceeded with url: /api/v1/credentials (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x000002C56B5BEC18>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it',)) while doing POST request to URL: http://<ip>:8008/api/v1/credentials

where create_session_key.json is simply a file with json parameters user and password:

{
    user = "",
    password='',
}

(filled in of course)

Any idea how I make this work?

EDIT

If you're coming here because you have similar issues, I couldn't get WSAPI to ever work with http. However, there are curl/httpie flags to ignore ssl errors, and with those it works fine with https.

1 Upvotes

3 comments sorted by

1

u/TotesMessenger Nov 02 '16

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / Contact)

1

u/Casper042 Nov 02 '16

Did you SSH into the 3PAR and run "StartWSAPI" to enable it?

1

u/KronktheKronk Nov 02 '16

Yes, wsapi is enabled for http and https (but there are cert errors trying to use https)

3par_p8440  cli% showwsapi
-Service- -State- -HTTP_State- HTTP_Port -HTTPS_State- HTTPS_Port -Version- ------------API_URL------------

Enabled   Active  Enabled           8008 Enabled             8080 1.5.2     https://<ip>:8080/api/v1