MAC Intellij Idea can not run Web Project On port 80
<p>I have a Web application project with J2EE , and I want to run my web application on port 80 with apache tomcat, i give this error : </p>

<blockquote>
  <p>4:31:34 PM Error running Test: Address localhost:80 is already in use
  4:31:37 PM Error running Test: Unable to open debugger port : java.net.SocketException "Socket closed"</p>
</blockquote>

<p>i use this command to show all process </p>

<pre><code>Meysams-MacBook-Pro:~ meysamfatheepanah$ lsof -Pn -i4
COMMAND    PID              USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
UserEvent  309 meysamfatheepanah    4u  IPv4 0x680181e2905eeb01      0t0  UDP *:*
SystemUIS  341 meysamfatheepanah    9u  IPv4 0x680181e2905ed559      0t0  UDP *:*
SystemUIS  341 meysamfatheepanah   10u  IPv4 0x680181e2905f00a9      0t0  UDP *:*
SystemUIS  341 meysamfatheepanah   13u  IPv4 0x680181e2905ed2f1      0t0  UDP *:57792
SystemUIS  341 meysamfatheepanah   15u  IPv4 0x680181e2905ed089      0t0  UDP *:*
sharingd   366 meysamfatheepanah   24u  IPv4 0x680181e2905edc91      0t0  UDP *:*
sharingd   366 meysamfatheepanah   28u  IPv4 0x680181e28eeb3fd1      0t0  UDP *:*
WiFiAgent  444 meysamfatheepanah    7u  IPv4 0x680181e2905ec219      0t0  UDP *:*
Telegram   584 meysamfatheepanah   23u  IPv4 0x680181e29016bba1      0t0  TCP 192.168.1.61:49367-&gt;91.108.4.170:443 (ESTABLISHED)
idea      1236 meysamfatheepanah   21u  IPv4 0x680181e2944c39b1      0t0  TCP 127.0.0.1:51541 (LISTEN)
idea      1236 meysamfatheepanah   35u  IPv4 0x680181e29f19aba1      0t0  TCP 127.0.0.1:51541-&gt;127.0.0.1:51670 (ESTABLISHED)
idea      1236 meysamfatheepanah   95u  IPv4 0x680181e292c33ba1      0t0  TCP 127.0.0.1:6942 (LISTEN)
idea      1236 meysamfatheepanah  164u  IPv4 0x680181e2905ec6e9      0t0  UDP 192.168.1.61:53244
idea      1236 meysamfatheepanah  165u  IPv4 0x680181e2905f0a49      0t0  UDP *:9876
idea      1236 meysamfatheepanah  624u  IPv4 0x680181e2939c30b9      0t0  TCP 127.0.0.1:63342 (LISTEN)
idea      1236 meysamfatheepanah  625u  IPv4 0x680181e2936275d1      0t0  TCP *:2864 (LISTEN)
idea      1236 meysamfatheepanah  626u  IPv4 0x680181e2905bb709      0t0  UDP *:2863
idea      1236 meysamfatheepanah  770u  IPv4 0x680181e29361b9b1      0t0  TCP 192.168.1.61:51539-&gt;208.68.163.218:5222 (ESTABLISHED)
java      1329 meysamfatheepanah  123u  IPv4 0x680181e293619ec9      0t0  TCP 127.0.0.1:51670-&gt;127.0.0.1:51541 (ESTABLISHED)
firefox   1331 meysamfatheepanah   37u  IPv4 0x680181e29325b7c1      0t0  TCP 192.168.1.61:51739-&gt;172.217.18.226:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   41u  IPv4 0x680181e2944862a9      0t0  TCP 192.168.1.61:51692-&gt;198.252.206.25:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   42u  IPv4 0x680181e29325dba1      0t0  TCP 192.168.1.61:51736-&gt;74.125.206.94:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   43u  IPv4 0x680181e2929fc2a9      0t0  TCP 192.168.1.61:51804-&gt;50.31.164.173:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   44u  IPv4 0x680181e2939c42a9      0t0  TCP 192.168.1.61:51737-&gt;216.58.208.238:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   50u  IPv4 0x680181e29f06d9b1      0t0  TCP 192.168.1.61:51733-&gt;172.217.19.131:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   54u  IPv4 0x680181e2929f9ec9      0t0  TCP 192.168.1.61:51682-&gt;216.58.208.238:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   59u  IPv4 0x680181e294498ba1      0t0  TCP 192.168.1.61:51738-&gt;216.58.208.238:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   61u  IPv4 0x680181e29362a2a9      0t0  TCP 192.168.1.61:51686-&gt;216.58.211.100:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   71u  IPv4 0x680181e29448a9b1      0t0  TCP 192.168.1.61:51673-&gt;104.16.112.18:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   74u  IPv4 0x680181e29f0a75d1      0t0  TCP 192.168.1.61:51791-&gt;64.233.167.95:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   75u  IPv4 0x680181e2944d79b1      0t0  TCP 192.168.1.61:51753-&gt;198.252.206.25:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   79u  IPv4 0x680181e2929fb0b9      0t0  TCP 192.168.1.61:51798-&gt;216.58.208.200:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   82u  IPv4 0x680181e2929fcba1      0t0  TCP 192.168.1.61:51799-&gt;23.235.43.175:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   87u  IPv4 0x680181e294482ba1      0t0  TCP 192.168.1.61:51800-&gt;50.31.164.172:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   88u  IPv4 0x680181e2932997c1      0t0  TCP 192.168.1.61:51774-&gt;216.58.208.227:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   92u  IPv4 0x680181e29f13c7c1      0t0  TCP 192.168.1.61:51767-&gt;198.252.206.25:443 (ESTABLISHED)
firefox   1331 meysamfatheepanah   93u  IPv4 0x680181e292c305d1      0t0  TCP 192.168.1.61:51802-&gt;23.51.123.27:80 (ESTABLISHED)
firefox   1331 meysamfatheepanah   95u  IPv4 0x680181e2944c30b9      0t0  TCP 192.168.1.61:51785-&gt;23.51.123.27:80 (ESTABLISHED)
firefox   1331 meysamfatheepanah  101u  IPv4 0x680181e296a4f7c1      0t0  TCP 192.168.1.61:51768-&gt;172.217.20.42:443 (ESTABLISHED)
</code></pre>

<p>and for this command i give this output</p>

<pre><code>Meysams-MacBook-Pro:~ meysamfatheepanah$ sudo lsof -nP -iTCP -sTCP:LISTEN
COMMAND  PID              USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
idea    1236 meysamfatheepanah   21u  IPv4 0x680181e2944c39b1      0t0  TCP 127.0.0.1:51541 (LISTEN)
idea    1236 meysamfatheepanah   95u  IPv4 0x680181e292c33ba1      0t0  TCP 127.0.0.1:6942 (LISTEN)
idea    1236 meysamfatheepanah  624u  IPv4 0x680181e2939c30b9      0t0  TCP 127.0.0.1:63342 (LISTEN)
idea    1236 meysamfatheepanah  625u  IPv4 0x680181e2936275d1      0t0  TCP *:2864 (LISTEN)


Meysams-MacBook-Pro:~ meysamfatheepanah$ netstat -atp tcp | grep -i "listen"
tcp4       0      0  localhost.51541        *.*                    LISTEN     
tcp4       0      0  *.astromed-main        *.*                    LISTEN     
tcp4       0      0  localhost.63342        *.*                    LISTEN     
tcp4       0      0  localhost.6942         *.*                    LISTEN 
</code></pre>

<p>i think another process from osx or etc use from port 80 .
have any idea about it?</p>