Randy Schmidt on 3 Aug 2006 14:21:40 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] determining what programs are using what ports


What's funny is, I think the apache install is messed up. Last night
at the meeting someone said they were having issues with ubuntu and
apache...but I thought nothing of it until this morning when I got
here and apache wasn't working.

It appears I have a rogue apache on my hands...

The one listening on port 80 doesn't have php installed, so it works
but it asks me to download the files

When I start another process on 81, php works (looks like this is the
one I configured)

I can't get the one on port 80 to stop! I used /etc/init.d/apache2
stop; killall, and removing with rc-update.d and rebooting...but it's
still there!

Any thoughts?

Thanks!
Randy
On 8/3/06, TuskenTower <tuskentower@gmail.com> wrote:
On 8/3/06, Randy Schmidt <x@altorg.com> wrote:
> Thanks! I used it and it gave me the info I was looking to get...but I
> didn't see anything listening on port 80. When I try to start up
> Apache, it says it can't bind to port 80, is that different from
> another program using that port? I tried port 81 and everything
> worked...
>
> Thanks,
> Randy
>
> On 8/3/06, Jeff Abrahamson <jeff@purple.com> wrote:
> > On Thu, Aug 03, 2006 at 09:28:54AM -0400, Randy Schmidt wrote:
> > >   [18 lines, 87 words, 727 characters]  Top characters: _nieaolr
> > >
> > > Hello:
> > >
> > > I recently set up a ubuntu box and turned it into a server to serve
> > > php and rails applications. Apache was working fine until yesterday
> > > when it stopped working. When I went to restart it, I found that
> > > apparently port 80 was being used by some other application. Is there
> > > an application or command I can use to figure out what programs are
> > > using different ports?
> >
> > netstat -a
> >
> > --
> >  Jeff
> >
> >  Jeff Abrahamson  <http://jeff.purple.com/>          +1 215/837-2287
> >  GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B
> >


Randy, Just an off-hand thought, check for TIME_WAIT in the netstat ouput for port 80. I believe that one often shows up when you stop and start a service too quickly. The program using the port is gone, but the OS is waiting for all communication to end (or something like that). netstat -a | grep 80

The man page says:
 TIME_WAIT
              The socket is waiting after close to handle packets
still in the network.

Also, the man page says using "netstat -l" will give you only the
ports that are being listened on (heh, I learned something by reading
the man pages).

HTH
Amul
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug



--
Randy Schmidt
x@altorg.com
267.334.6833
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug