error image I tried before link 1link 2 link 4 and Clear idea cache. There is no error when deleting tomcat. netstat -ano did not find 1099 I have run the code without any problems, this problem is sometimes sometimes not.
-
3Does this answer your question? [Error running 'Tomcat': Address localhost:1099 is already in use. Why?](https://stackoverflow.com/questions/60466736/error-running-tomcat-address-localhost1099-is-already-in-use-why) – Arsh Coder Oct 27 '21 at 06:16
-
I have tried to modify the port number, but whichever I change to is occupied,And mine is spring – YellowLife Oct 27 '21 at 06:19
-
Try restarting server. – Arsh Coder Oct 27 '21 at 06:21
-
I did not install tomcat and did not set up javahome I have restarted the computer several times – YellowLife Oct 27 '21 at 06:24
-
Tomcat does not set environment variables, directly use the idea in – YellowLife Oct 27 '21 at 06:25
2 Answers
This may be a bug in idea
You can try the following: Run cmd as an administrator netsh winsock reset Then restart the computer
Hope your problem can be solved

- 1
- 1
-
Thank you, I used the administrator to reset and restart, but it still doesn't work. – YellowLife Oct 27 '21 at 08:07
Okay, but I don't know what to do next time. I reinstalled jdk IDEA tomcat and it didn't work. I also reset the network, but it didn't work. After a while, I changed a project and it didn't work, but I changed it back and it was fine.
My solution is as follows:
Open powershell with administrator privileges
netsh int ipv4 set dynamic tcp start=49152 num=16384
netsh int ipv6 set dynamic tcp start=49152 num=16384
netsh int ipv4 show dynamicport tcp
Additional references:
WSL2, Hyper-V & Reserved Ports
The default dynamic port range for TCP/IP has changed since Windows Vista and in Windows Server 2008

- 34,072
- 23
- 111
- 129

- 1
- 3
-
This is not an answer to your question, you should post it as a comment. – Piotr P. Karwasz Oct 27 '21 at 16:46