LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-27-2009, 02:13 PM   #1
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
A lot of Listening ports....WHY?


using netstat -tln | wc -l I see over 9,000 listening ports on one of my DB servers.
On another DB server the same command shows 4500 listening ports. Both DB servers are running Oracle.

Why so many listening ports and why the huge difference in two servers both serving the same function. Any ideas? TIA!!!!

Last edited by DotHQ; 01-27-2009 at 02:24 PM.
 
Old 01-27-2009, 06:59 PM   #2
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
I doubt that you really need 9000 ports unless you run a really popular db, maybe one of the apps is forgetting to close the connection after use.

Run netstat -tlnp and see if it's oracle or lsnrctl.
 
Old 01-29-2009, 07:17 AM   #3
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Original Poster
Rep: Reputation: 33
Thanks for the reply. I had ice issues yesterday and lost the internet.

Indeed we know we do not need all those ports. I've built 6 servers all from a kickstart network install. Exactly the same. Yet one of the servers only had 39 open ports while the others have 4k or 3 of them have 9k. All doing the same function running an oracle DB.

Thanks for your suggestion, Running with the -p shows a - (dash) in the pid field 99% of the time. A few pid's show up but for the most part it is blank. Is this a clue that something is not closing the port after the process has died?
 
Old 01-29-2009, 06:18 PM   #4
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
You need to run netstat as root or else it won't show you the pids of the processes that you don't have access to.
 
Old 01-30-2009, 08:14 AM   #5
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Original Poster
Rep: Reputation: 33
I am running it as root. Suspicion is that these are zombie processes that are not being killed off properly. We've found some CLOSE_WAIT processes still listening waiting for the ack that whatever was being closed indeed closed. But that is only a small percentage and I've added a variable to sys.config that should fix that issue.

I think we have a memory overflow or something going on but I can't figure out what the heck it is.

Last edited by DotHQ; 01-30-2009 at 08:55 AM.
 
Old 02-04-2009, 01:31 PM   #6
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Original Poster
Rep: Reputation: 33
How many listener processes do you see if you do a:
netstat -tlnp | wc -l

On most servers I see 27 or 35. But I'm seeing 9000+ on some servers.

Any ideas why?
 
Old 02-04-2009, 07:06 PM   #7
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
Quote:
Originally Posted by DotHQ View Post
How many listener processes do you see if you do a:
netstat -tlnp | wc -l

On most servers I see 27 or 35. But I'm seeing 9000+ on some servers.

Any ideas why?
On my computer, ubuntu 8.10, 22 ports

You can run "tcpdump -i eth0 -nl" to see which which computer requested those ports to be opened or run...

while sleep 1; netstat -tlnp >>/tmp/listen.log; done

To get a continuous dump of the netstat. Take a look at the ports that are still opened at the end and search for them in the listen log to see which app had opened it.
 
Old 02-24-2009, 02:12 PM   #8
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Original Poster
Rep: Reputation: 33
Good stuff Niknah .... I'm just now getting back to this issue. I'll work with what you posted and reply with the output info.
Thanks!
 
  


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
listening ports cornish Linux - Networking 4 02-03-2008 07:36 AM
I have too much active/listening ports... Xeratul Linux - Networking 1 12-17-2006 01:06 AM
Listening to Com ports in java MRMadhav Programming 3 05-18-2006 03:21 AM
how to minimize listening ports johnnydangerous Fedora 19 02-13-2005 03:15 PM
Ports listening? dareino Linux - Networking 2 03-31-2004 08:40 AM

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

All times are GMT -5. The time now is 05:19 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