Declan Moriarty wrote:

Hello,

I met a weird problem with my LFS:
the 'netstat' command can not list ports
listened by java code,such as Tomcat.

following commands were issued:

#netstat -t and
#netstat -a |grep tcp

none of the above commands shows that port 8080
was listened by some process.
but if I enter "http://localhost:8080/"; in firefox,
the welcome page of tomcat appears successfully.


Then I wrote a small java program which simplly listnes
on tcp port 4000, and waiting for incoming connections.
the 'netstat' can not see the port ether, but I can
telnet to the port.

all established connections through the ports
can be listed by netstat.

and even the listening ports(tcp) can be seen with
command 'fuser -uv -n tcp xxxx', (xxxx is the tcp port
to be checked, the command line sholud be issued by root).


I installed LFS6.0, kernel updated to 2.6.12.2, and udev
to udev-058. other packages remain same as LFS6.0.
oh,I also install gcc-3.3.4 in /opt.


If someone met this problem too, please tell me your solution,
thanks in advance.
I had doubted whether my computer was infected by virus or
root kit, but I am not sure on that.



thanks



Netstat doesn't do it for me either, but then I didn't really expect it
to. From 'man netstat'

/Proving I actually read _something_.


NAME
        netstat - Print network connections, routing tables, interface
        statistics, masquerade connections, and multicast memberships


A daemon that is listening on a port is not necessarily connected, or routed, just listening. Why should netstat list it?

Hello,

netstat has a couple of options, that should do the expected:

#netstat -lntp
for example shows all tcp-ports any process is listening as number and with the appropriate process. note, that port 8080 is interpreted as 'http-old' if the 'n'-options is not given

see manpages for further explanations

ciao

ulf
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to