A new test project is created today. After the service is started, the service cannot be accessed using http: // 127.0.0.1: 8080. A message is displayed, indicating that the link is rejected. Then I found that I could access it via http: // localhost: 8080. So I searched the internet and sorted the notes as follows:
1. ping localhost address to: 1
: 1 is the IPv6 format
It indicates that the machine parses the localhost into the IPv6 format. If the IPv4 address is used, the processing method is to detach the IPv6 driver or directly access it using http: // [: 1]: 8080.
Www.2cto.com
2. Delete Apr local files
If the tomcat localization file tcnative-1.dll exists, I use 1.1.17, with http: // [: 1]: 8080 can not be accessed, delete this file, start tomcat can be.
Supplement: I asked my colleague this question today. If I changed the hosts file, it would solve the problem that localhost cannot be accessed and 127.0.0.1 can be accessed. This problem is the opposite.
From xingyu Xiaoyi