You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tuomas <wi...@mithlond.net> on 2006/11/02 19:00:42 UTC

forced to constantly restart Tomcat

Hi!

I have a problem that mystifies me. I have followed the instructions given
in <http://www.coreservlets.com/Apache-Tomcat-Tutorial/> to the tiniest
detail (in my opinion). And in fact, I have managed to get to the Tomcat's
welcome page, and I successfully "passed" the test "Test 1: A Servlet That
Does Not Use Packages" (referring to the URL above).

But this is my problem: In order to view any pages, I have to constantly
re-run the startup.sh script (I run Debian sarge). Otherwise Mozilla
complains that "the connection was refused while trying to connect to
localhost." If I rerun startup.sh, I can connect to localhost--once. What
could be the problem here?

desktop:/usr/local/bin/apache-tomcat-5.5.20/bin# ./startup.sh
Using CATALINA_BASE:   /usr/local/bin/apache-tomcat-5.5.20
Using CATALINA_HOME:   /usr/local/bin/apache-tomcat-5.5.20
Using CATALINA_TMPDIR: /usr/local/bin/apache-tomcat-5.5.20/temp
Using JRE_HOME:       /usr/local/java/jdk1.5.0_09
desktop:/usr/local/bin/apache-tomcat-5.5.20/bin#

Thanks for your help! I am sorry to ask such a "newbie question." However,
I googled, but couldn't find anything helpful.

Tuomas

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: forced to constantly restart Tomcat

Posted by Tuomas <wi...@mithlond.net>.
>  If you're getting a "connection refused" error, it may be that you're
> using
> the wrong local host IP address. check the sys/host file, it may have an
> entry in there that looks like this:
>
> your_user_name 127.0.1.1

desktop:/etc# cat /etc/hosts
127.0.0.1       localhost.localdomain   localhost       desktop

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

So I think localhost IP is OK. And it shouldn't be an issue with my
firewall configuration either, which is
desktop:/etc/network# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  127.0.0.0/8          127.0.0.0/8
ACCEPT     icmp --  anywhere             anywhere            state
ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state
ESTABLISHED
ACCEPT     udp  --  anywhere             anywhere            state
ESTABLISHED
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     icmp --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            limit: avg
3/sec burst 5 LOG level warning
DROP       all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  127.0.0.0/8          127.0.0.0/8
desktop:/etc/network#


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: forced to constantly restart Tomcat

Posted by EDMOND KEMOKAI <ek...@gmail.com>.
 If you're getting a "connection refused" error, it may be that you're using
the wrong local host IP address. check the sys/host file, it may have an
entry in there that looks like this:

your_user_name 127.0.1.1


That would indicate the localhost for your user account is 127.0.1.1 instead
of 127.0.0.1 .


On 11/2/06, Caldarale, Charles R <Ch...@unisys.com> wrote:
>
> > From: Tuomas [mailto:wilDEBeest@mithlond.net]
> > Subject: RE: forced to constantly restart Tomcat
> >
> > I didn't find anything "special" in the localhost file.
>
> The catalina files are more likely to have something of interest.  In
> particular, look during the time period right after you make the browser
> request.  See if anything like these messages is in there:
>
> Nov 2, 2006 1:00:42 AM org.apache.commons.logging.impl.Jdk14Logger info
> INFO: Pausing Coyote HTTP/1.1 on http-80
> Nov 2, 2006 1:00:43 AM org.apache.commons.logging.impl.Jdk14Logger info
> INFO: Stopping service Catalina
> Nov 2, 2006 1:00:44 AM org.apache.commons.logging.impl.Jdk14Logger info
> INFO: Stopping Coyote HTTP/1.1 on http-80
>
> If so, whatever caused Tomcat to terminate (assuming it did) may be
> recorded just in front of them.
>
> > Could this "restarting obligation" have something
> > to do with permissions etc?
>
> Not likely, but it wouldn't hurt to verify that everything in the Tomcat
> directory tree is owned by whatever userid you're running Tomcat under
> (presumably your own), and there are owner write permissions on all
> directories.
>
> > Why me? ;-)
>
> Why not?
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
"talk trash and carry a small stick."
PAUL KRUGMAN (NYT)

Re: forced to constantly restart Tomcat

Posted by EDMOND KEMOKAI <ek...@gmail.com>.
Is there a reason you can't use something like netbeans? which comes bundled
with tomcat, that way your don't have to fiddle with the settings. Looks
like you may be starting multiple instances of tomcat and the port is
already in use.

On 11/2/06, Tuomas <wi...@mithlond.net> wrote:
>
> > The catalina files are more likely to have something of interest.  In
> > particular, look during the time period right after you make the browser
> > request.  See if anything like these messages is in there:
>
> Here is it. I cannot decipher it. Sorry for the lengthy quotation.
>
> Nov 2, 2006 9:27:42 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 5679 ms
> Nov 2, 2006 9:27:42 PM org.apache.catalina.core.StandardServer await
> SEVERE: StandardServer.await: create[8005]:
> java.net.BindException: Address already in use
>         at java.net.PlainSocketImpl.socketBind(Native Method)
>         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>         at java.net.ServerSocket.bind(ServerSocket.java:319)
>         at java.net.ServerSocket.<init>(ServerSocket.java:185)
>         at org.apache.catalina.core.StandardServer.await(
> StandardServer.java:372)
>         at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> Nov 2, 2006 9:27:42 PM org.apache.coyote.http11.Http11BaseProtocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-80
> Nov 2, 2006 9:27:49 PM org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path:
>
> /usr/local/java/jdk1.5.0_09/jre/lib/i386/client:/usr/local/java/jdk1.5.0_09/jre/lib/i386:/usr/local/java/jdk1.5.0_09/jre/../lib/i386
> Nov 2, 2006 9:27:49 PM org.apache.coyote.http11.Http11BaseProtocol init
> SEVERE: Error initializing endpoint
> java.net.BindException: Permission denied:80
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(
> PoolTcpEndpoint.java:297)
>         at
> org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java
> :138)
>         at org.apache.catalina.connector.Connector.initialize(
> Connector.java:1016)
>         at
> org.apache.catalina.core.StandardService.initialize(StandardService.java
> :580)
>         at
> org.apache.catalina.core.StandardServer.initialize(StandardServer.java
> :791)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
> Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load
> SEVERE: Catalina.start
> LifecycleException:  Protocol handler initialization failed:
> java.net.BindException: Permission denied:80
>         at org.apache.catalina.connector.Connector.initialize(
> Connector.java:1018)
>         at
> org.apache.catalina.core.StandardService.initialize(StandardService.java
> :580)
>         at
> org.apache.catalina.core.StandardServer.initialize(StandardServer.java
> :791)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
> Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 3235 ms
> Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
> Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Nov 2, 2006 9:27:54 PM org.apache.coyote.http11.Http11BaseProtocol start
> SEVERE: Error starting endpoint
> java.net.BindException: Permission denied:80
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(
> PoolTcpEndpoint.java:297)
>         at
> org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(
> PoolTcpEndpoint.java:312)
>         at
> org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java
> :150)
>         at org.apache.coyote.http11.Http11Protocol.start(
> Http11Protocol.java:75)
>         at org.apache.catalina.connector.Connector.start(Connector.java
> :1089)
>         at org.apache.catalina.core.StandardService.start(
> StandardService.java:459)
>         at org.apache.catalina.core.StandardServer.start(
> StandardServer.java:709)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> Nov 2, 2006 9:27:54 PM org.apache.catalina.startup.Catalina start
> SEVERE: Catalina.start:
> LifecycleException:  service.getName(): "Catalina";  Protocol handler
> start failed: java.net.BindException: Permission denied:80
>         at org.apache.catalina.connector.Connector.start(Connector.java
> :1096)
>         at org.apache.catalina.core.StandardService.start(
> StandardService.java:459)
>         at org.apache.catalina.core.StandardServer.start(
> StandardServer.java:709)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
"talk trash and carry a small stick."
PAUL KRUGMAN (NYT)

Re: forced to constantly restart Tomcat

Posted by Tuomas <wi...@mithlond.net>.
> The server is most likely running a linux OS or similar.  Such systems
> don't allow non-root users to bind to ports below 1024.

I THINK it I have solved it, with your support.

http://www.coreservlets.com/Apache-Tomcat-Tutorial/ install Tomcat on
Windows and the author recommends editing conf/server.xml so that Tomcat
binds to the port 80. But since Tomcat runs non-root, that's not allowed.

So I re-edited conf/server.xml and changed the port to the original
value--8080. Things seem to work OK now.

I thank you for your help!

Best wishes,
Tuomas

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: forced to constantly restart Tomcat

Posted by David Smith <dn...@cornell.edu>.
Error 1:
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use

You most likely have another instance of tomcat running

Error 2:
SEVERE: Error initializing endpoint
java.net.BindException: Permission denied:80

The server is most likely running a linux OS or similar.  Such systems 
don't allow non-root users to bind to ports below 1024.  If you start 
tomcat with jsvc (see commons-daemon project on the jakarta apache 
site), you can get around this issue.

--David

Tuomas wrote:

>>The catalina files are more likely to have something of interest.  In
>>particular, look during the time period right after you make the browser
>>request.  See if anything like these messages is in there:
>>    
>>
>
>Here is it. I cannot decipher it. Sorry for the lengthy quotation.
>
>Nov 2, 2006 9:27:42 PM org.apache.catalina.startup.Catalina start
>INFO: Server startup in 5679 ms
>Nov 2, 2006 9:27:42 PM org.apache.catalina.core.StandardServer await
>SEVERE: StandardServer.await: create[8005]:
>java.net.BindException: Address already in use
>	at java.net.PlainSocketImpl.socketBind(Native Method)
>	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>	at java.net.ServerSocket.bind(ServerSocket.java:319)
>	at java.net.ServerSocket.<init>(ServerSocket.java:185)
>	at org.apache.catalina.core.StandardServer.await(StandardServer.java:372)
>	at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
>Nov 2, 2006 9:27:42 PM org.apache.coyote.http11.Http11BaseProtocol pause
>INFO: Pausing Coyote HTTP/1.1 on http-80
>Nov 2, 2006 9:27:49 PM org.apache.catalina.core.AprLifecycleListener
>lifecycleEvent
>INFO: The Apache Tomcat Native library which allows optimal performance in
>production environments was not found on the java.library.path:
>/usr/local/java/jdk1.5.0_09/jre/lib/i386/client:/usr/local/java/jdk1.5.0_09/jre/lib/i386:/usr/local/java/jdk1.5.0_09/jre/../lib/i386
>Nov 2, 2006 9:27:49 PM org.apache.coyote.http11.Http11BaseProtocol init
>SEVERE: Error initializing endpoint
>java.net.BindException: Permission denied:80
>	at
>org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
>	at
>org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138)
>	at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
>	at
>org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
>	at
>org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
>	at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
>	at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
>Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load
>SEVERE: Catalina.start
>LifecycleException:  Protocol handler initialization failed:
>java.net.BindException: Permission denied:80
>	at org.apache.catalina.connector.Connector.initialize(Connector.java:1018)
>	at
>org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
>	at
>org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
>	at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
>	at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
>Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load
>INFO: Initialization processed in 3235 ms
>Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardService start
>INFO: Starting service Catalina
>Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardEngine start
>INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
>Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardHost start
>INFO: XML validation disabled
>Nov 2, 2006 9:27:54 PM org.apache.coyote.http11.Http11BaseProtocol start
>SEVERE: Error starting endpoint
>java.net.BindException: Permission denied:80
>	at
>org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
>	at
>org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
>	at
>org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:150)
>	at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75)
>	at org.apache.catalina.connector.Connector.start(Connector.java:1089)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:459)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
>Nov 2, 2006 9:27:54 PM org.apache.catalina.startup.Catalina start
>SEVERE: Catalina.start:
>LifecycleException:  service.getName(): "Catalina";  Protocol handler
>start failed: java.net.BindException: Permission denied:80
>	at org.apache.catalina.connector.Connector.start(Connector.java:1096)
>	at org.apache.catalina.core.StandardService.start(StandardService.java:459)
>	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
>	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>	at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>	at java.lang.reflect.Method.invoke(Method.java:585)
>	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
>	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@tomcat.apache.org
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: forced to constantly restart Tomcat

Posted by Martin Gainty <mg...@hotmail.com>.
It appears someone mucked up your socket permissions 
inside %TOMCAT_HOME%/conf/catalina.policy check for this SocketPermission grant
grant
{
permission java.net.SocketPermission "localhost:80", "accept,connect,listen,resolve";
}
Martin --
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents

----- Original Message ----- 
From: "Tuomas" <wi...@mithlond.net>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, November 02, 2006 2:40 PM
Subject: RE: forced to constantly restart Tomcat


>> The catalina files are more likely to have something of interest.  In
>> particular, look during the time period right after you make the browser
>> request.  See if anything like these messages is in there:
> 
> Here is it. I cannot decipher it. Sorry for the lengthy quotation.
> 
> Nov 2, 2006 9:27:42 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 5679 ms
> Nov 2, 2006 9:27:42 PM org.apache.catalina.core.StandardServer await
> SEVERE: StandardServer.await: create[8005]:
> java.net.BindException: Address already in use
> at java.net.PlainSocketImpl.socketBind(Native Method)
> at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
> at java.net.ServerSocket.bind(ServerSocket.java:319)
> at java.net.ServerSocket.<init>(ServerSocket.java:185)
> at org.apache.catalina.core.StandardServer.await(StandardServer.java:372)
> at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> Nov 2, 2006 9:27:42 PM org.apache.coyote.http11.Http11BaseProtocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-80
> Nov 2, 2006 9:27:49 PM org.apache.catalina.core.AprLifecycleListener
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path:
> /usr/local/java/jdk1.5.0_09/jre/lib/i386/client:/usr/local/java/jdk1.5.0_09/jre/lib/i386:/usr/local/java/jdk1.5.0_09/jre/../lib/i386
> Nov 2, 2006 9:27:49 PM org.apache.coyote.http11.Http11BaseProtocol init
> SEVERE: Error initializing endpoint
> java.net.BindException: Permission denied:80
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
> at
> org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138)
> at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
> at
> org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
> at
> org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
> Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load
> SEVERE: Catalina.start
> LifecycleException:  Protocol handler initialization failed:
> java.net.BindException: Permission denied:80
> at org.apache.catalina.connector.Connector.initialize(Connector.java:1018)
> at
> org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
> at
> org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
> at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
> Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 3235 ms
> Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
> Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Nov 2, 2006 9:27:54 PM org.apache.coyote.http11.Http11BaseProtocol start
> SEVERE: Error starting endpoint
> java.net.BindException: Permission denied:80
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
> at
> org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:150)
> at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75)
> at org.apache.catalina.connector.Connector.start(Connector.java:1089)
> at org.apache.catalina.core.StandardService.start(StandardService.java:459)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> Nov 2, 2006 9:27:54 PM org.apache.catalina.startup.Catalina start
> SEVERE: Catalina.start:
> LifecycleException:  service.getName(): "Catalina";  Protocol handler
> start failed: java.net.BindException: Permission denied:80
> at org.apache.catalina.connector.Connector.start(Connector.java:1096)
> at org.apache.catalina.core.StandardService.start(StandardService.java:459)
> at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
>

RE: forced to constantly restart Tomcat

Posted by Tuomas <wi...@mithlond.net>.
> The catalina files are more likely to have something of interest.  In
> particular, look during the time period right after you make the browser
> request.  See if anything like these messages is in there:

Here is it. I cannot decipher it. Sorry for the lengthy quotation.

Nov 2, 2006 9:27:42 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5679 ms
Nov 2, 2006 9:27:42 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
	at java.net.ServerSocket.bind(ServerSocket.java:319)
	at java.net.ServerSocket.<init>(ServerSocket.java:185)
	at org.apache.catalina.core.StandardServer.await(StandardServer.java:372)
	at org.apache.catalina.startup.Catalina.await(Catalina.java:615)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:575)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Nov 2, 2006 9:27:42 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-80
Nov 2, 2006 9:27:49 PM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path:
/usr/local/java/jdk1.5.0_09/jre/lib/i386/client:/usr/local/java/jdk1.5.0_09/jre/lib/i386:/usr/local/java/jdk1.5.0_09/jre/../lib/i386
Nov 2, 2006 9:27:49 PM org.apache.coyote.http11.Http11BaseProtocol init
SEVERE: Error initializing endpoint
java.net.BindException: Permission denied:80
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
	at
org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138)
	at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
	at
org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
	at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed:
java.net.BindException: Permission denied:80
	at org.apache.catalina.connector.Connector.initialize(Connector.java:1018)
	at
org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
	at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Nov 2, 2006 9:27:49 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3235 ms
Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
Nov 2, 2006 9:27:50 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Nov 2, 2006 9:27:54 PM org.apache.coyote.http11.Http11BaseProtocol start
SEVERE: Error starting endpoint
java.net.BindException: Permission denied:80
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
	at
org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:150)
	at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75)
	at org.apache.catalina.connector.Connector.start(Connector.java:1089)
	at org.apache.catalina.core.StandardService.start(StandardService.java:459)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Nov 2, 2006 9:27:54 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  service.getName(): "Catalina";  Protocol handler
start failed: java.net.BindException: Permission denied:80
	at org.apache.catalina.connector.Connector.start(Connector.java:1096)
	at org.apache.catalina.core.StandardService.start(StandardService.java:459)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: forced to constantly restart Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tuomas [mailto:wilDEBeest@mithlond.net] 
> Subject: RE: forced to constantly restart Tomcat
> 
> I didn't find anything "special" in the localhost file.

The catalina files are more likely to have something of interest.  In
particular, look during the time period right after you make the browser
request.  See if anything like these messages is in there:

Nov 2, 2006 1:00:42 AM org.apache.commons.logging.impl.Jdk14Logger info
INFO: Pausing Coyote HTTP/1.1 on http-80
Nov 2, 2006 1:00:43 AM org.apache.commons.logging.impl.Jdk14Logger info
INFO: Stopping service Catalina
Nov 2, 2006 1:00:44 AM org.apache.commons.logging.impl.Jdk14Logger info
INFO: Stopping Coyote HTTP/1.1 on http-80

If so, whatever caused Tomcat to terminate (assuming it did) may be
recorded just in front of them.

> Could this "restarting obligation" have something
> to do with permissions etc?

Not likely, but it wouldn't hurt to verify that everything in the Tomcat
directory tree is owned by whatever userid you're running Tomcat under
(presumably your own), and there are owner write permissions on all
directories.

> Why me? ;-)

Why not?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: forced to constantly restart Tomcat

Posted by Tuomas <wi...@mithlond.net>.
> Didn't realize Tomcat was being used in Middle Earth...

Fighting Sauron... His shadow seems to have taken over my computer. :-/

> What's in the Tomcat log files?

desktop:/usr/local/bin/apache-tomcat-5.5.20/logs# ls -lh
total 112K
-rw-r--r--  1 tuope tuope   0 Nov  2 18:43 admin.2006-11-02.log
-rw-r--r--  1 tuope tuope 43K Nov  2 20:00 catalina.2006-11-02.log
-rw-r--r--  1 tuope tuope 44K Nov  2 20:00 catalina.out
-rw-r--r--  1 tuope tuope   0 Nov  2 18:43 host-manager.2006-11-02.log
-rw-r--r--  1 tuope tuope 21K Nov  2 20:00 localhost.2006-11-02.log
-rw-r--r--  1 tuope tuope   0 Nov  2 18:43 manager.2006-11-02.log

I didn't find anything "special" in the localhost file. But on the other
hand, I had no idea what I should be keeping an eye on. :-(

> What do you do in the session running the startup script after it's
> kicked off?

Having run the script, I will type in the test URL into Mozilla (or I
might reload it). That's basically it. Could this "restarting obligation"
have something to do with permissions etc?

desktop:/usr/local/bin# ls -ld apache-tomcat-5.5.20/
drwxr-sr-x  11 tuope tuope 4096 Nov  2 18:31 apache-tomcat-5.5.20/

tuope@desktop:/usr/local/bin$ export | grep -i java
declare -x JAVA_HOME="/usr/local/java/jdk1.5.0_09"
declare -x
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/java/jdk1.5.0_09/bin"

I have no clue. :-( Why me? ;-)

Tuomas

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: forced to constantly restart Tomcat

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Tuomas [mailto:wilDEBeest@mithlond.net] 
> Subject: forced to constantly restart Tomcat

Didn't realize Tomcat was being used in Middle Earth...

> "Test 1: A Servlet That Does Not Use Packages"

Probably not a good test, since packages are required for almost
everything these days - but it's not likely to be relevant to your
problem.

> In order to view any pages, I have to constantly
> re-run the startup.sh script (I run Debian sarge).

What's in the Tomcat log files?

What do you do in the session running the startup script after it's
kicked off?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org