Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 46997  / 3 Years ago, sun, july 4, 2021, 1:38:48

I have problem in shutting down tomcat server. When I type localhost://8080, it keeps on showing me tomcat homepage. I restarted the system also but did not help. I have already tried following commands and it did not show any process which might be running on port 8080 (Following commands did not output anything.)



netstat -anp|grep :8080[[:blank:]]

fuser -n tcp 8080

lsof -w -n -i tcp:8080

netstat | grep 8080


I also tried netstat -tulpn which shows following. I dont see any process running on port 8080 there.



Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:17500 0.0.0.0:* LISTEN 2091/dropbox
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1046/mysqld
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 7657/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 901/cupsd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 5704/postgres
tcp6 0 0 ::1:631 :::* LISTEN 901/cupsd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 869/avahi-daemon: r
udp 0 0 0.0.0.0:46045 0.0.0.0:* 869/avahi-daemon: r
udp 0 0 127.0.0.1:53 0.0.0.0:* 7657/dnsmasq
udp 0 0 0.0.0.0:17500 0.0.0.0:* 2091/dropbox
udp6 0 0 :::51917 :::* 869/avahi-daemon: r
udp6 0 0 :::5353 :::* 869/avahi-daemon: r


Could someone please tell me how to free port 8080. I tried to run ./shutdown of tomcat but it shoed java.net.ConnectException: Connection refused



I guess it is because of already running instant on port8080.



Thanks.


More From » tomcat

 Answers
3

If you installed tomcat from Software Center (or via apt-get command line), then it should be running from the standard ubuntu installation directory. Starting and stopping Tomcat should be as easy as



/etc/init.d/tomcat5.5 start
/etc/init.d/tomcat5.5 stop


Maybe 5.5 needs to be replaced by the version you are using.



If you just downloaded tomcat and are running from your custom unzipped directory, the startup and shutdown scripts provided by Apache should work. Assuming your tomcat is in $TOMCAT_HOME:



$TOMCAT_HOME/bin/startup.sh
$TOMCAT_HOME/bin/shutdown.sh


If all fails, you can always manually kill all java processes



killall java


or, if something is REALLY stuck



killall -9 java


These last ones will kill ALL java processes currently running.


[#35198] Monday, July 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cisccla

Total Points: 66
Total Questions: 134
Total Answers: 115

Location: Croatia
Member since Fri, Sep 11, 2020
4 Years ago
;