Tomcat startup gave the notorious
java.net.BindException: Cannot assign requested address. This usually means that another process is listening on the same port on this machine. I started with
ps -ef grep javato make sure that no other tomcat process was running on the machine. Nothing.
I suspected that maybe some other web server was holding the port, but
netstat -anshowed that nothing binds this address. Moreover,
telnet localhost 80showed that no one is listening.
Looking at the server.xml I found out that the connector was binding to the hostname "demoserver" on port 80.
acceptCount="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />
ping demoservergave me errors, but
nslookup demoservergave me the right ip address.
After a few minutes I noticed that some clown added demoserver to
/etc/hostswith the wrong ip address. Fixing /etc/hosts to have the right ip address for demoserver made tomcat work smooth and nice.