The problem: something is listening on port 8080
- If I load the page with Safari I get a blank page (page is white but "Develop → Show Page Source" is greyed out)
If I telnet to port 8080 I get something answering
$ telnet 127.0.0.1 8080 Trying 127.0.0.1... Connected to localhost (127.0.0.1). Escape character is '^]'.
But
lsof
does not show any process listening on port 8080$ sudo lsof -iTCP -sTCP:LISTEN -P -n | grep 8080 $
netstat
does not show any process using port 8080$ netstat -n | grep 8080 $
I can open port 8080 programmatically (e.g., with a web server) without any error about the port being in use
nmap
does not list the port as usedsudo nmap 127.0.0.1 Starting Nmap 6.01 ( http://nmap.org ) at 2012-10-03 16:16 CEST Nmap scan report for localhost (127.0.0.1) Host is up (0.000081s latency). Not shown: 990 closed ports PORT STATE SERVICE 22/tcp open ssh 631/tcp open ipp 1023/tcp open netvenuechat 3283/tcp open netassistant 3306/tcp open mysql 3689/tcp open rendezvous 5001/tcp open commplex-link 5003/tcp open filemaker 5432/tcp open postgresql 50003/tcp open unknown Nmap done: 1 IP address (1 host up) scanned in 10.92 seconds
The same happens for port 80 but not for other ports (e.g., 81 or 8081).
Question Which process is answering to this ports when no other process is opening them? Which is the purpose of this behavior?
Edit
if I open the port with a program the port can then be used normally. Once the port is closed the strange behavior reappears. Example:
- access to port 8080 deliver a connection to an unknown process
- I open the port with tomcat
- accesses to port 8080 goes to tomcat and everything is OK
- I close the port (quit tomcat)
- the port is listed as not used (see above)
- access to port 8080 deliver a connection to an unknown process
the firewall rules just show that the port is not blocked
$ sudo ipfw show 00001 926004 100891783 allow ip from me to any dst-port 80,8080,3128,5001,5003,443 65535 125057043 94341114828 allow ip from any to any
Edit 2
- the listening program is not an HTTP server (i.e., does not react to a
GET index.html HTTP/1.0
request