Forum Discussion
Prakash_Krishna
Nimbostratus
May 03, 2014Providing right credential to connect the F5 device using RestAPI is always throwing 401 error
Hi All,
Here I am using RestAPI to connect to the device. I am always getting the http 401 error even my credentials are right and able to reach the same url using webbrowser.
Can anybody h...
Prakash_Krishna
Nimbostratus
May 03, 20142014-05-02 22:23:40,765 [main] DEBUG org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager - Get connection: HttpRoute[{s}->https://:443], timeout = 0
2014-05-02 22:23:40,765 [main] DEBUG org.apache.http.impl.conn.tsccm.ConnPoolByRoute - [HttpRoute[{s}->https://:443]] total kept alive: 0, total issued: 0, total allocated: 0 out of 20
2014-05-02 22:23:40,765 [main] DEBUG org.apache.http.impl.conn.tsccm.ConnPoolByRoute - No free connections [HttpRoute[{s}->https://:443]][null]
2014-05-02 22:23:40,843 [main] DEBUG org.apache.http.impl.conn.tsccm.ConnPoolByRoute - Available capacity: 2 out of 2 [HttpRoute[{s}->https://:443]][null]
2014-05-02 22:23:40,843 [main] DEBUG org.apache.http.impl.conn.tsccm.ConnPoolByRoute - Creating new connection [HttpRoute[{s}->https://:443]]
2014-05-02 22:23:40,859 [main] DEBUG org.apache.http.impl.conn.DefaultClientConnectionOperator - Connecting to /:443
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: best-match
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.impl.client.DefaultHttpClient - Attempt 1 to execute request
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.impl.conn.DefaultClientConnection - Sending request: POST /mgmt/tm/sys/software/volume/ HTTP/1.1
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.wire - >> "POST /mgmt/tm/sys/software/volume/ HTTP/1.1[\r][\n]"
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.wire - >> "Content-Type: application/json[\r][\n]"
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.wire - >> "Content-Length: 82[\r][\n]"
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.wire - >> "Host: :443[\r][\n]"
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.wire - >> "Connection: Keep-Alive[\r][\n]"
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.wire - >> "User-Agent: Apache-HttpClient/4.1 (java 1.5)[\r][\n]"
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.wire - >> "[\r][\n]"
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.headers - >> POST /mgmt/tm/sys/software/volume/ HTTP/1.1
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.headers - >> Content-Type: application/json
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.headers - >> Content-Length: 82
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.headers - >> Host: :443
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.headers - >> Connection: Keep-Alive
2014-05-02 22:23:45,625 [main] DEBUG org.apache.http.headers - >> User-Agent: Apache-HttpClient/4.1 (java 1.5)
2014-05-02 22:23:45,640 [main] DEBUG org.apache.http.wire - >> "{"username":"*****","password":"********","services":["platform","namespace"]}"
2014-05-02 22:23:45,640 [main] DEBUG org.apache.http.wire - << "HTTP/1.1 401 F5 Authorization Required[\r][\n]"
2014-05-02 22:23:45,640 [main] DEBUG org.apache.http.wire - << "Date: Sat, 03 May 2014 12:57:12 GMT[\r][\n]"
2014-05-02 22:23:45,640 [main] DEBUG org.apache.http.wire - << "Server: Apache[\r][\n]"
2014-05-02 22:23:45,640 [main] DEBUG org.apache.http.wire - << "WWW-Authenticate: Basic realm="Enterprise Manager"[\r][\n]"
2014-05-02 22:23:45,640 [main] DEBUG org.apache.http.wire - << "Vary: accept-language,accept-charset[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "X-Frame-Options: SAMEORIGIN[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "Accept-Ranges: bytes[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "X-Content-Type-Options: nosniff[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "X-XSS-Protection: 1; mode=block[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "Content-Security-Policy: default-src 'self' 'unsafe-inline' 'unsafe-eval'[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "Strict-Transport-Security: max-age=16070400; includeSubDomains[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "Keep-Alive: timeout=4, max=100[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "Connection: Keep-Alive[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "Transfer-Encoding: chunked[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "Content-Type: text/html; charset=iso-8859-1[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "Content-Language: en[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.wire - << "[\r][\n]"
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.impl.conn.DefaultClientConnection - Receiving response: HTTP/1.1 401 F5 Authorization Required
2014-05-02 22:23:45,656 [main] DEBUG org.apache.http.headers - << HTTP/1.1 401 F5 Authorization Required
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects