To sum up the unauthorized: 401 error encountered for the first time, in fact, a very simple error:
When running tomcat, when I enter localhost: 8080, a prompt box pops up:
requires a user name and password to log in, that is, I do not have access rights. When clicking cancel:
error 401: unauthorized
analysis
Any client (such as your browser) needs to pass the following cycle: obtain an IP address from the IP name of the site (i.e. your site URL, without the initial ‘http://’). This correspondence (i.e. the correspondence from IP name to IP address translation) is provided by domain name servers (dnss).
Open an IP socket to connect to the IP address. Write HTTP data stream through this socket. The HTTP data stream that receives the response from the web server. The data stream includes a status code whose value depends on the HTTP protocol. Parse the data stream to get state code and other useful information.
The error is generated in the last step described above, that is, when the client receives the HTTP status code and identifies it as 401. After the browser receives the 401 error message, it explains it and provides a dialog box for entering user name/password. Send to the server after completion. After the server verifies, it sends the requested resources to the browser when the verification passes, otherwise it may send 401 error messages.
Solution:
My error at that time was that the port number was occupied: so release the port or redefine the new port number
extension
HTTP 400 – the request is invalid;
Http 401.1 – unauthorized: login failed;
Http 401.2 – unauthorized: login failed due to server configuration problems;
Http 401.3 – ACL prohibits access to resources;
Http 401.4 – unauthorized: authorization is rejected by the filter;
Http 401.5 – unauthorized: ISAPI or CGI authorization failed
Read More:
- [Solved] ClientError.Security.Unauthorized: The client is unauthorized due to authentication failure.
- [Solved] Error running tomcat8: Address localhost:80 is already in use
- [Solved] Error running Tomcat8: Address localhost:8080 is already in use
- [Solved] k8s error retrieving resource lock default/fuseim.pri-ifs: Unauthorized
- [Solved] Springboot Connect MongoDB Error: UncategorizedMongoDbException: Command failed with error 13 (Unauthorized)
- HTTP Error 401.3 – Unauthorized Error – While creating IIS 7.0 web site on Windows 7
- IDEA Start Tomcat Error: Error running ‘start Tomcat‘: Can‘t find catalina.jar
- [Solved] Neo4j error: Import-Module & neo4j Neo.ClientError.Security.Unauthorized
- [Solved] Spring cloud load balancing, error: no instances available for localhost
- [Solved] k8s kubeadmin init Error: http://localhost:10248/healthz‘ failed
- Rabbitmq failed to stop normally: ERROR: node with name “rabbit” already running on “localhost”
- Running the test front-end project, Google browser accesses localhost with err_SSL_PROTOCOL_ERROR
- Tomcat startup error: Failed to start component [StandardServer[8005]] solution
- [Solved] Ubuntu 20.04 LTS Install k8s Error: The connection to the server localhost:8080 was refused
- [Solved] failed to req API:localhost:8848/nacos/v1/ns/instance. code:500 msg: java.net.ConnectException
- [Solved] K8s Initialize Error: failed with error: Get “http://localhost:10248/healthz“
- [Solved] Postman Error: Error: NETERR: getaddrinfo ENOTFOUND localhost
- Kill Tomcat process in windows and Linux environment (solve the problem of other ports being occupied)
- Springcloud configuration center client 3355 startup Error: error on get request for“ http://localhost:8761/eureka/apps/ “: Connection
- It can be opened with localhost, but not with IP address. The request host name is invalid