LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-21-2008, 02:24 PM   #1
theofb
LQ Newbie
 
Registered: Apr 2007
Location: OH
Distribution: Slack
Posts: 16

Rep: Reputation: 0
Tomcat port 8080 stuck open


I have a working installation of apache tomcat, except I downloaded a webapp that is causing some kind of problem when I restart tomcat. (I think it's choking on a malconfigured jdbc file, but that's beside the point.)

So the startup is failing, but only AFTER it opens 8080 for listening. Of course the shutdown is failing also, because there is no process to shutdown, so 8080 never closes and tomcat will never start again regardless because its port is already taken.

My only workaround is to reboot, because I don't have tomcat configured on startup yet. But this is annoying and I'd just like to force that port closed.

Everything I find so far is just people telling me to turn off my startup services...duh that doesn't help me.

Is there a command to directly close a port when you know there's no daemon behind it?

slack 12
 
Old 03-23-2008, 03:30 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
Use lsof to find the process that is holding the port open, then kill it.
 
Old 01-02-2009, 08:25 PM   #3
scotthill
LQ Newbie
 
Registered: Jan 2009
Posts: 25

Rep: Reputation: 15
Which lsof

Quote:
Originally Posted by datopdog View Post
Use lsof to find the process that is holding the port open, then kill it.

I have Fedora 9 and I'm not finding lsof. Any suggestions?

Last edited by scotthill; 01-03-2009 at 03:59 PM.
 
Old 01-03-2009, 11:15 AM   #4
scotthill
LQ Newbie
 
Registered: Jan 2009
Posts: 25

Rep: Reputation: 15
[QUOTE=scotthill;3395210]I have Fedora 9 and I'm not finding lsof. Any suggestions?

Nevermind, I found it.

Last edited by scotthill; 01-03-2009 at 03:58 PM.
 
Old 01-03-2009, 05:13 PM   #5
malaprop
LQ Newbie
 
Registered: Dec 2008
Location: TX
Distribution: Ubuntu 8.10
Posts: 26

Rep: Reputation: 16
Does
Code:
netstat -tanp |grep 8080
reveal the PID?

If so, you can just kill the PID IF it has it there.

I only offer this because sometimes lsof won't reveal a listening port, at least that's been my experience.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
access 8080 web server port through squid running on 8080 sunethj Linux - Networking 11 05-18-2007 02:38 AM
cannot open port 8080 on ubuntu 6.06 kafnir Linux - Security 1 11-22-2006 05:58 PM
Tomcat: Refused localhost:8080 manudath Linux - Software 1 03-31-2005 03:32 AM
Tomcat, cannot connect to 8080 briansy Linux - Software 2 03-03-2004 06:22 AM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration