Return Error code: 401 unauthorized

Source: Internet
Author: User
Zookeeper Return Error code: 401 unauthorized indicates that the HTTP return code is unauthorized, And the account and password are not entered. Therefore, the solution is to directly carry the password in the http package. Use shell to generate base64 encoding for user and password
Encode the account admin and password admin information with base64 as ywrtaw46ywrtaw4 =.
$ echo -n admin:admin | base64YWRtaW46YWRtaW4=
You can also use the results to verify whether the account is admin and the password is admin.
$ echo -n YWRtaW46YWRtaW4= | base64 -d
admin:admin 
After obtaining the base64 encoded result, add the following in the HTTP format of the GET request:
Authorization: Basic YWRtaW46YWRtaW4=
The 401 error code problem can be solved.
 
Attach the HTTP Error code table:
All HTTP status codes and definitions. The Code indicates that 2XX is successful and 200 is normal. The request has been completed. 201 normal; followed by the POST command. 202 normal; accepted for processing, but not completed. 203 normal; partial information-only part of the returned information. 204 normal; no response-received request, but no information to send back. 3xx redirection 301 moved-the requested data has a new location and the change is permanent. 302 found-the requested data temporarily has different Uris. 303 refer to others-you can find the response to the request under another Uri and use the get method to retrieve the response. 304 not modified-the document was not modified as expected. 305 use proxy-the requested resource must be accessed through the proxy provided in the location field. 306 not used-no longer used; keep this code for future use. 4xx client error 400 Error request-the request has a syntax problem or cannot meet the request. 401 unauthorized-unauthorized client access to data. 402 payment required-the billing system is in effect. 403 forbidden-access is not required even if authorized. 404 Not found-the server cannot find the specified resource; the document does not exist. 407 proxy authentication request-the client must first use proxy authentication itself. 415 the media type is not supported-the server rejects service requests because the Request Entity format is not supported. 5xx Server Error 500 internal error-the server cannot complete the request due to exceptions. 501 not executed-the server does not support the requested tool. 502 error gateway-the server receives an invalid response from the upstream server. 503 unable to obtain services-the server cannot process requests due to temporary overload or maintenance.
Zookeeper

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.