Re: Problem with shutting down tomcat5.5.29

2012-04-05 Thread Konstantin Kolinko
2012/4/5 Petr Hracek phrac...@gmail.com:
 Dear all,

 I now that I am using pretty old version of tomcat5, but I have a
 tricky problem.
 On the server is run apache2.2.21 and tomcat5 together. tomcat5 is
 used only as servlet container and not web server.
 Both are connected together over AJP1.3 interface.

 In configuration file of apache2 is mentioned:
 ProxyPass /appl1 ajp://localhost:8009/appl1
 ProxyPassReverse /appl1 ajp://localhost:8009/appl1

 During the stopping of tomcat5 I can see in log files:
 /var/log/tomcat5/base/catalina.out:
 2012-04-05 11:56:17,492 [main] INFO
 org.apache.coyote.http11.Http11BaseProtocol - Pausing Coyote HTTP/1.1
 on http-8080
 2012-04-05 11:56:18,495 [main] INFO
 org.apache.catalina.core.StandardService - Stopping service Catalina
 2012-04-05 11:56:18,520 [main] INFO
 org.apache.coyote.http11.Http11BaseProtocol - Stopping Coyote HTTP/1.1
 on http-8080
 2012-04-05 11:56:18,521 [main] INFO
 org.apache.catalina.core.AprLifecycleListener - Failed shutdown of
 Apache Portable Runtime

Tomcat-Native shared library failed to shut down.
I do not know why. Did it start? Do you use Apr versions of Tomcat
connectors? (You will see that when Tomcat starts).  If you no not
need it you can comment away the AprLifecycleListener in server.xml.
I do not remember whether there were some specific issues in 5.5.29 -
you may look at the changelog.

The message really does not matter much if you shut down Tomcat as a whole.


 /var/log/tomcat5/base/stop.log
  Using CATALINA_BASE:   /srv/www/tomcat5/base/
 Using CATALINA_HOME:   /usr/share/tomcat5
 Using CATALINA_TMPDIR: /srv/www/tomcat5/base//temp
 Using JRE_HOME:       /usr/lib/jvm/java
 2012-04-05 11:56:19,282 [main] ERROR
 org.apache.catalina.startup.Catalina - Catalina.stop:
 java.net.ConnectException: Connection refused

Attempt to stop Tomcat that is already stopped (and thus do not listen
on the shutdown port anymore).

        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.init(Unknown Source)
        at java.net.Socket.init(Unknown Source)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

 in server.xml file are used tags:
  Listener className=org.apache.catalina.core.AprLifecycleListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener /
  Listener 
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener
 /
  Listener 
 className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/

  Connector port=8080 maxHttpHeaderSize=8192
              maxThreads=150 minSpareThreads=25 maxSpareThreads=75
               enableLookups=false redirectPort=8443 acceptCount=100
               connectionTimeout=2 disableUploadTimeout=true /
  Connector port=8009
               enableLookups=false redirectPort=8443
 protocol=AJP/1.3 address=127.0.0.1 /

 Where I could have a problem?

Any other problem besides those two messages that I commented?


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with shutting down tomcat5.5.29

2012-04-05 Thread Petr Hracek
What I see in the start.log file is:
2012-04-05 15:28:04,557 [main] INFO
org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote
HTTP/1.1 on http-8080
2012-04-05 15:28:04,560 [main] INFO
org.apache.catalina.startup.Catalina - Initialization processed in
1062 ms
2012-04-05 15:28:04,727 [main] INFO
org.apache.catalina.core.StandardService - Starting service Catalina
2012-04-05 15:28:04,731 [main] INFO
org.apache.catalina.core.StandardEngine - Starting Servlet Engine:
Apache Tomcat/5.5.27
2012-04-05 15:28:04,743 [main] INFO
org.apache.catalina.core.StandardHost - XML validation disabled
2012-04-05 15:28:06,229 [main] INFO
org.apache.catalina.loader.WebappClassLoader -
validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not
loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
2012-04-05 15:28:06,312 [main] INFO
org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/1.1
on http-8080
2012-04-05 15:28:06,423 [main] INFO
org.apache.jk.common.ChannelSocket - JK: ajp13 listening on
/127.0.0.1:8009
2012-04-05 15:28:06,425 [main] INFO  org.apache.jk.server.JkMain - Jk
running ID=0 time=0/15  config=null
2012-04-05 15:28:06,453 [main] INFO
org.apache.catalina.storeconfig.StoreLoader - Find registry
server-registry.xml at classpath resource
2012-04-05 15:28:06,514 [main] INFO
org.apache.catalina.startup.Catalina - Server startup in 1954 ms

Here is mention ajp13. It is not correct one, right?

Is it possible that during the shutting down of tomcat5 stopping
operation will take more then 2 minutes?
When I am commented out Listener section then during the stopping
tomcat5 Failed is not mentioned
but in stop.log file Exception is still there. How to avoid that
Exception message will not be there?

best reagrds
Petr

Dne 5. dubna 2012 14:19 Konstantin Kolinko knst.koli...@gmail.com napsal(a):
 2012/4/5 Petr Hracek phrac...@gmail.com:
 Dear all,

 I now that I am using pretty old version of tomcat5, but I have a
 tricky problem.
 On the server is run apache2.2.21 and tomcat5 together. tomcat5 is
 used only as servlet container and not web server.
 Both are connected together over AJP1.3 interface.

 In configuration file of apache2 is mentioned:
 ProxyPass /appl1 ajp://localhost:8009/appl1
 ProxyPassReverse /appl1 ajp://localhost:8009/appl1

 During the stopping of tomcat5 I can see in log files:
 /var/log/tomcat5/base/catalina.out:
 2012-04-05 11:56:17,492 [main] INFO
 org.apache.coyote.http11.Http11BaseProtocol - Pausing Coyote HTTP/1.1
 on http-8080
 2012-04-05 11:56:18,495 [main] INFO
 org.apache.catalina.core.StandardService - Stopping service Catalina
 2012-04-05 11:56:18,520 [main] INFO
 org.apache.coyote.http11.Http11BaseProtocol - Stopping Coyote HTTP/1.1
 on http-8080
 2012-04-05 11:56:18,521 [main] INFO
 org.apache.catalina.core.AprLifecycleListener - Failed shutdown of
 Apache Portable Runtime

 Tomcat-Native shared library failed to shut down.
 I do not know why. Did it start? Do you use Apr versions of Tomcat
 connectors? (You will see that when Tomcat starts).  If you no not
 need it you can comment away the AprLifecycleListener in server.xml.
 I do not remember whether there were some specific issues in 5.5.29 -
 you may look at the changelog.

 The message really does not matter much if you shut down Tomcat as a whole.


 /var/log/tomcat5/base/stop.log
  Using CATALINA_BASE:   /srv/www/tomcat5/base/
 Using CATALINA_HOME:   /usr/share/tomcat5
 Using CATALINA_TMPDIR: /srv/www/tomcat5/base//temp
 Using JRE_HOME:       /usr/lib/jvm/java
 2012-04-05 11:56:19,282 [main] ERROR
 org.apache.catalina.startup.Catalina - Catalina.stop:
 java.net.ConnectException: Connection refused

 Attempt to stop Tomcat that is already stopped (and thus do not listen
 on the shutdown port anymore).

        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.init(Unknown Source)
        at java.net.Socket.init(Unknown Source)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at 
 org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435)

 in server.xml file are used tags:
  Listener className=org.apache.catalina.core.AprLifecycleListener /
  Listener 

Re: Problem with shutting down tomcat5.5.29

2012-04-05 Thread Konstantin Kolinko
2012/4/5 Petr Hracek phrac...@gmail.com:
 What I see in the start.log file is:
 2012-04-05 15:28:04,557 [main] INFO
 org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote
 HTTP/1.1 on http-8080
 2012-04-05 15:28:04,560 [main] INFO
 org.apache.catalina.startup.Catalina - Initialization processed in
 1062 ms
 2012-04-05 15:28:04,727 [main] INFO
 org.apache.catalina.core.StandardService - Starting service Catalina
 2012-04-05 15:28:04,731 [main] INFO
 org.apache.catalina.core.StandardEngine - Starting Servlet Engine:
 Apache Tomcat/5.5.27
 2012-04-05 15:28:04,743 [main] INFO
 org.apache.catalina.core.StandardHost - XML validation disabled
 2012-04-05 15:28:06,229 [main] INFO
 org.apache.catalina.loader.WebappClassLoader -
 validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not
 loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
 javax/servlet/Servlet.class

The above is bad. (Though not related to your original question).
You should not have servlet.jar in your application. Servlet API is
provided by Tomcat only. Tomcat had to ignore your jar.

 2012-04-05 15:28:06,312 [main] INFO
 org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/1.1
 on http-8080
 2012-04-05 15:28:06,423 [main] INFO
 org.apache.jk.common.ChannelSocket - JK: ajp13 listening on
 /127.0.0.1:8009
 2012-04-05 15:28:06,425 [main] INFO  org.apache.jk.server.JkMain - Jk
 running ID=0 time=0/15  config=null
 2012-04-05 15:28:06,453 [main] INFO
 org.apache.catalina.storeconfig.StoreLoader - Find registry
 server-registry.xml at classpath resource
 2012-04-05 15:28:06,514 [main] INFO
 org.apache.catalina.startup.Catalina - Server startup in 1954 ms

 Here is mention ajp13. It is not correct one, right?


The above logs mean that you do not have Tomcat-Native library, so
plain java (non-Apr) implementations of connectors are used.

Thus you are better to remove/comment the following line in server.xml
  Listener className=org.apache.catalina.core.AprLifecycleListener /

( When Tomcat-Native is used, startup of 5.5 would look like the following:
[[[
05.04.2012 18:47:22 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.22.
05.04.2012 18:47:22 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters
[false], random [true].
05.04.2012 18:47:23 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
05.04.2012 18:47:23 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
05.04.2012 18:47:23 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1578 ms
05.04.2012 18:47:23 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
05.04.2012 18:47:23 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.35
05.04.2012 18:47:23 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
05.04.2012 18:47:24 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
05.04.2012 18:47:24 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
05.04.2012 18:47:24 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
05.04.2012 18:47:24 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1484 ms
]]]

Note that protocol implementation names are Http11AprProtocol and
AjpAprProtocol )



 Is it possible that during the shutting down of tomcat5 stopping
 operation will take more then 2 minutes?

It is possible, but you better take a thread dump (3 dumps separated
by several seconds) to look what Tomcat is actually doing.

How to do thread dumps is mentioned in the FAQ


 When I am commented out Listener section then during the stopping
 tomcat5 Failed is not mentioned
 but in stop.log file Exception is still there. How to avoid that
 Exception message will not be there?


You mean java.net.ConnectException: Connection refused  exception?

It means that shutdown script cannot connect to Tomcat shutdown port
to send it the shutdown command,  regardless of the reason.

If it is because Tomcat is already stopped (e.g. you tried to shut it
down twice in a row) then it is normal and is OK.  If it is because of
any other reason then it is bad.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem with shutting down tomcat5.5.29

2012-04-05 Thread Terence M. Bandoian

 On 1:59 PM, Konstantin Kolinko wrote:

2012/4/5 Petr Hracekphrac...@gmail.com:

What I see in the start.log file is:
2012-04-05 15:28:04,557 [main] INFO
org.apache.coyote.http11.Http11BaseProtocol - Initializing Coyote
HTTP/1.1 on http-8080
2012-04-05 15:28:04,560 [main] INFO
org.apache.catalina.startup.Catalina - Initialization processed in
1062 ms
2012-04-05 15:28:04,727 [main] INFO
org.apache.catalina.core.StandardService - Starting service Catalina
2012-04-05 15:28:04,731 [main] INFO
org.apache.catalina.core.StandardEngine - Starting Servlet Engine:
Apache Tomcat/5.5.27
2012-04-05 15:28:04,743 [main] INFO
org.apache.catalina.core.StandardHost - XML validation disabled
2012-04-05 15:28:06,229 [main] INFO
org.apache.catalina.loader.WebappClassLoader -
validateJarFile(/opt/repgen/servlet/WEB-INF/lib/servlet.jar) - jar not
loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class

The above is bad. (Though not related to your original question).
You should not have servlet.jar in your application. Servlet API is
provided by Tomcat only. Tomcat had to ignore your jar.


2012-04-05 15:28:06,312 [main] INFO
org.apache.coyote.http11.Http11BaseProtocol - Starting Coyote HTTP/1.1
on http-8080
2012-04-05 15:28:06,423 [main] INFO
org.apache.jk.common.ChannelSocket - JK: ajp13 listening on
/127.0.0.1:8009
2012-04-05 15:28:06,425 [main] INFO  org.apache.jk.server.JkMain - Jk
running ID=time=0/15  config=null
2012-04-05 15:28:06,453 [main] INFO
org.apache.catalina.storeconfig.StoreLoader - Find registry
server-registry.xml at classpath resource
2012-04-05 15:28:06,514 [main] INFO
org.apache.catalina.startup.Catalina - Server startup in 1954 ms

Here is mention ajp13. It is not correct one, right?


The above logs mean that you do not have Tomcat-Native library, so
plain java (non-Apr) implementations of connectors are used.

Thus you are better to remove/comment the following line in server.xml
   Listener className=rg.apache.catalina.core.AprLifecycleListener /

( When Tomcat-Native is used, startup of 5.5 would look like the following:
[[[
05.04.2012 18:47:22 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.22.
05.04.2012 18:47:22 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters
[false], random [true].
05.04.2012 18:47:23 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
05.04.2012 18:47:23 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
05.04.2012 18:47:23 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1578 ms
05.04.2012 18:47:23 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
05.04.2012 18:47:23 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.35
05.04.2012 18:47:23 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
05.04.2012 18:47:24 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
05.04.2012 18:47:24 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
05.04.2012 18:47:24 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
05.04.2012 18:47:24 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1484 ms
]]]

Note that protocol implementation names are Http11AprProtocol and
AjpAprProtocol )




Is it possible that during the shutting down of tomcat5 stopping
operation will take more then 2 minutes?

It is possible, but you better take a thread dump (3 dumps separated
by several seconds) to look what Tomcat is actually doing.

How to do thread dumps is mentioned in the FAQ



When I am commented out Listener section then during the stopping
tomcat5 Failed is not mentioned
but in stop.log file Exception is still there. How to avoid that
Exception message will not be there?


You mean java.net.ConnectException: Connection refused  exception?

It means that shutdown script cannot connect to Tomcat shutdown port
to send it the shutdown command,  regardless of the reason.

If it is because Tomcat is already stopped (e.g. you tried to shut it
down twice in a row) then it is normal and is OK.  If it is because of
any other reason then it is bad.


Best regards,
Konstantin Kolinko



This may not be related to the shutdown problem but, if httpd is 
providing the connectivity to the user, is the Connector on port 8080 
necessary?


-Terence Bandoian


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



problem in shutting down Tomcat server

2011-02-08 Thread James Godrej
I am using apache-tomcat-5.5.31
on a Ubuntu server.My services websites were running perfectly fine until today 
morning.
I see it down.
Here is a link http://sakai.openitup.in

It is running in a reverse proxy situation and I see following log 
[Tue Feb 08 12:55:15 2011] [error] proxy: AJP: disabled connection for 
(192.168.1.4)
[Tue Feb 08 12:55:46 2011] [error] proxy: AJP: disabled connection for 
(192.168.1.4)
[Tue Feb 08 12:56:33 2011] [error] (111)Connection refused: proxy: AJP: attempt 
to connect to 192.168.1.4:8009 (192.168.1.4) failed
[Tue Feb 08 12:56:33 2011] [error] ap_proxy_connect_backend disabling worker 
for 
(192.168.1.4)
[Tue Feb 08 12:56:33 2011] [error] proxy: AJP: failed to make connection to 
backend: 192.168.1.4
~   
   

Here is the log from /opt/apache-tomcat-5.5.31/logs/catalina.out 
on server where it is actually hosted 

INFO Unregistered entity provider 
(org.sakaiproject.poll.tool.entityproviders.PollEntityProvider) and 17 
capabilities
2011-02-04 14:54:26,664  INFO Thread-16 org.sakaiproject.spring.util.SpringTool 
- destroy
2011-02-04 14:54:26,664  INFO Thread-16 org.sakaiproject.spring.util.SpringTool 
- destroy
2011-02-04 14:54:26,664  INFO Thread-16 org.sakaiproject.spring.util.SpringTool 
- destroy
2011-02-04 14:54:26,665  INFO Thread-16 org.sakaiproject.spring.util.SpringTool 
- destroy
2011-02-04 14:54:26,665  INFO Thread-16 org.sakaiproject.jsf.util.JsfTool - 
destroy
2011-02-04 14:54:26,681  INFO Thread-16 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/osp-matrix-tool]
 
- Closing Spring root WebApplicationContext
2011-02-04 14:54:26,682  INFO Thread-16 
org.sakaiproject.util.ContextLoaderListener - Destroying Components in 
osp-matrix
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

Upon seeing the last 3 lines I verified in the folder
/usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
exists which it complains as not found.

The vhost configuration for this site is as follows


VirtualHost *:80 
ServerName sakai.openitup.in
ServerAdmin webmaster@localhost
ProxyRequests off
Proxy *
Order deny,allow
Allow from all
/Proxy
ProxyPass / ajp://192.168.1.4:8009/
ProxyPassReverse / ajp://192.168.1.4:8009/
/VirtualHost

The machine on which my application (sakai 2.7 binary 
  http://sakaiproject.org/ ) is actually hosted has following also defined as
 $JAVA_HOME is set to /usr/lib/jvm/java-6-sun-1.6.0.20
$CATALINA_HOME is set to /opt/apache-tomcat-5.5.31

So now I have no clue as what is causing this error can some one point to right 
direction as what more should I look now?
Each time when I try to restart the Tomcat server I am getting the following 
error

./shutdown.sh 
Using CATALINA_BASE:   /opt/apache-tomcat-5.5.31
Using CATALINA_HOME:   /opt/apache-tomcat-5.5.31
Using CATALINA_TMPDIR: /opt/apache-tomcat-5.5.31/temp
Using JRE_HOME:/usr/lib/jvm/java-6-sun-1.6.0.20
Using CLASSPATH:   /opt/apache-tomcat-5.5.31/bin/bootstrap.jar
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

which is not correct.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread André Warnier

The title says problem in shutting down.., but this seems more about starting 
up.
Are you hijacking another thread ?

Apart from that, regarding :
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

There seems to be something funny with that path.
In catalina.sh, this path is in the content of the variable $_RUNJAVA.
This variable is set in setclasspath.sh, to $JRE_HOME/bin/java.

Are you sure that when you are the same user as the one under which Tomcat normally runs, 
you can find that java, by walking each component of the above path one after the other ?

Like :
su - tomcat55
cd /usr
cd lib
cd jvm
.. and so on



James Godrej wrote:

I am using apache-tomcat-5.5.31
on a Ubuntu server.My services websites were running perfectly fine until today 
morning.

I see it down.
Here is a link http://sakai.openitup.in

It is running in a reverse proxy situation and I see following log 
[Tue Feb 08 12:55:15 2011] [error] proxy: AJP: disabled connection for 
(192.168.1.4)
[Tue Feb 08 12:55:46 2011] [error] proxy: AJP: disabled connection for 
(192.168.1.4)
[Tue Feb 08 12:56:33 2011] [error] (111)Connection refused: proxy: AJP: attempt 
to connect to 192.168.1.4:8009 (192.168.1.4) failed
[Tue Feb 08 12:56:33 2011] [error] ap_proxy_connect_backend disabling worker for 
(192.168.1.4)
[Tue Feb 08 12:56:33 2011] [error] proxy: AJP: failed to make connection to 
backend: 192.168.1.4
~   
   

Here is the log from /opt/apache-tomcat-5.5.31/logs/catalina.out 
on server where it is actually hosted 

INFO Unregistered entity provider 
(org.sakaiproject.poll.tool.entityproviders.PollEntityProvider) and 17 
capabilities
2011-02-04 14:54:26,664  INFO Thread-16 org.sakaiproject.spring.util.SpringTool 
- destroy
2011-02-04 14:54:26,664  INFO Thread-16 org.sakaiproject.spring.util.SpringTool 
- destroy
2011-02-04 14:54:26,664  INFO Thread-16 org.sakaiproject.spring.util.SpringTool 
- destroy
2011-02-04 14:54:26,665  INFO Thread-16 org.sakaiproject.spring.util.SpringTool 
- destroy
2011-02-04 14:54:26,665  INFO Thread-16 org.sakaiproject.jsf.util.JsfTool - 
destroy
2011-02-04 14:54:26,681  INFO Thread-16 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/osp-matrix-tool] 
- Closing Spring root WebApplicationContext
2011-02-04 14:54:26,682  INFO Thread-16 
org.sakaiproject.util.ContextLoaderListener - Destroying Components in 
osp-matrix

./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

Upon seeing the last 3 lines I verified in the folder
/usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
exists which it complains as not found.

The vhost configuration for this site is as follows


VirtualHost *:80 
ServerName sakai.openitup.in
ServerAdmin webmaster@localhost
ProxyRequests off
Proxy *
Order deny,allow
Allow from all
/Proxy
ProxyPass / ajp://192.168.1.4:8009/
ProxyPassReverse / ajp://192.168.1.4:8009/
/VirtualHost

The machine on which my application (sakai 2.7 binary 
  http://sakaiproject.org/ ) is actually hosted has following also defined as

 $JAVA_HOME is set to /usr/lib/jvm/java-6-sun-1.6.0.20
$CATALINA_HOME is set to /opt/apache-tomcat-5.5.31

So now I have no clue as what is causing this error can some one point to right 
direction as what more should I look now?
Each time when I try to restart the Tomcat server I am getting the following 
error


./shutdown.sh 
Using CATALINA_BASE:   /opt/apache-tomcat-5.5.31

Using CATALINA_HOME:   /opt/apache-tomcat-5.5.31
Using CATALINA_TMPDIR: /opt/apache-tomcat-5.5.31/temp
Using JRE_HOME:/usr/lib/jvm/java-6-sun-1.6.0.20
Using CLASSPATH:   /opt/apache-tomcat-5.5.31/bin/bootstrap.jar
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

which is not correct.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread James Godrej



On Tue, Feb 8, 2011 at 2:20 PM, Konstantin Kolinko knst.koli...@gmail.com 
wrote:
 2011/2/8 James Godrej jamesgod...@yahoo.in:
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

 Upon seeing the last 3 lines I verified in the folder
 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
 exists which it complains as not found.

 What does the following command print:

 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java -version
 /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -version
java version 1.6.0_22
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)


 Do you have executable permissions for the java file there?

ls -l /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java 
lrwxrwxrwx 1 root root 15 2011-02-04 12:52 
/usr/lib/jvm/java-6-sun-1.6.0.22/bin/java - ../jre/bin/java


On Tue, Feb 8, 2011 at 2:22 PM, André Warnier a...@ice-sa.com wrote:
 The title says problem in shutting down.., but this seems more about
 starting up.
 Are you hijacking another thread ?
No
 Apart from that, regarding :
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

 There seems to be something funny with that path.
 In catalina.sh, this path is in the content of the variable $_RUNJAVA.
 This variable is set in setclasspath.sh, to $JRE_HOME/bin/java.

 Are you sure that when you are the same user as the one under which Tomcat
 normally runs, you can find that java, by walking each component of the
 above path one after the other ?
 Like :
 su - tomcat55
 cd /usr
 cd lib
 cd jvm
 .. and so on
I have not changed on my server every thing was happening as root only.
Last week I have done a system update which went on smoothly without any error.

-- 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread André Warnier

James Godrej wrote:

...


I repeat :


Are you sure that when you are *the same user as the one under which Tomcat
normally runs*, you can find that java, by walking each component of the
above path one after the other ?
Like :
su - tomcat55
cd /usr
cd lib
cd jvm
.. and so on

I have not changed on my server every thing was happening as root only.
Last week I have done a system update which went on smoothly without any error.



Under Ubuntu, it is very unlikely that Tomcat would run as root (at least if you have 
used the standard package manager apt-get etc..)

So really look at each of the directory components in turn, and check their 
permissions.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread Konstantin Kolinko
2011/2/8 James Godrej jamesgod...@yahoo.in:

 On Tue, Feb 8, 2011 at 2:20 PM, Konstantin Kolinko knst.koli...@gmail.com
 wrote:
 2011/2/8 James Godrej jamesgod...@yahoo.in:
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

 Upon seeing the last 3 lines I verified in the folder
 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
 exists which it complains as not found.

 What does the following command print:

 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java -version
  /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -version

The above two paths are different. Have you noted it?

BTW, your catalina.sh apparently differs from the default one. (373 is
not the line number that I would expect to see here).

 java version 1.6.0_22
 Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
 Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)


 Do you have executable permissions for the java file there?

 ls -l /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java
 lrwxrwxrwx 1 root root 15 2011-02-04 12:52
 /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java - ../jre/bin/java


Those are permissions of the symlink, not of the actual file.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread James Godrej



On Tue, Feb 8, 2011 at 2:51 PM, Konstantin Kolinko knst.koli...@gmail.com 
wrote:
 2011/2/8 James Godrej jamesgod...@yahoo.in:

 On Tue, Feb 8, 2011 at 2:20 PM, Konstantin Kolinko knst.koli...@gmail.com
 wrote:
 2011/2/8 James Godrej jamesgod...@yahoo.in:
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

 Upon seeing the last 3 lines I verified in the folder
 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
 exists which it complains as not found.

 What does the following command print:

 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java -version
  /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -version

 The above two paths are different. Have you noted it?
Thanks for pointing that out I have done an update of server and since then I 
think this has been a problem which went un
noticed.
 BTW, your catalina.sh apparently differs from the default one. (373 is
 not the line number that I would expect to see here).

 java version 1.6.0_22
 Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
 Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)


 Do you have executable permissions for the java file there?

 ls -l /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java
 lrwxrwxrwx 1 root root 15 2011-02-04 12:52
 /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java - ../jre/bin/java


 Those are permissions of the symlink, not of the actual file.
When I type ls -l for this I get only that output.
I do not know how can I check the permissions other than this way.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread James Godrej




- Original Message 
From: James Godrej jamesgod...@yahoo.in
To: Tomcat Users List users@tomcat.apache.org
Sent: Tue, 8 February, 2011 3:59:32 PM
Subject: Re: problem in shutting down Tomcat server




On Tue, Feb 8, 2011 at 2:51 PM, Konstantin Kolinko knst.koli...@gmail.com 
wrote:
 2011/2/8 James Godrej jamesgod...@yahoo.in:

 On Tue, Feb 8, 2011 at 2:20 PM, Konstantin Kolinko knst.koli...@gmail.com
 wrote:
 2011/2/8 James Godrej jamesgod...@yahoo.in:
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

 Upon seeing the last 3 lines I verified in the folder
 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
 exists which it complains as not found.

 What does the following command print:

 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java -version
  /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -version

 The above two paths are different. Have you noted it?
Hi Konstantin you are absolutely right I think that my updates to Ubuntu have 
over written my Java Installations 
because Sakai needs 1.6.20 to run as their doc here
https://confluence.sakaiproject.org/display/DOC/Sakai+2.7 (binary version)
says and it appears that my environment above has been over written.
I checked JAVA_HOME in .bashrc had that old value only and not to 1.6.22 which 
is what this one is pointing.
Thanks for your message.




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread André Warnier

James Godrej wrote:




- Original Message 
From: James Godrej jamesgod...@yahoo.in
To: Tomcat Users List users@tomcat.apache.org
Sent: Tue, 8 February, 2011 3:59:32 PM
Subject: Re: problem in shutting down Tomcat server




On Tue, Feb 8, 2011 at 2:51 PM, Konstantin Kolinko knst.koli...@gmail.com 
wrote:

2011/2/8 James Godrej jamesgod...@yahoo.in:

On Tue, Feb 8, 2011 at 2:20 PM, Konstantin Kolinko knst.koli...@gmail.com
wrote:

2011/2/8 James Godrej jamesgod...@yahoo.in:

./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found
./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not found

Upon seeing the last 3 lines I verified in the folder
/usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
exists which it complains as not found.

What does the following command print:

/usr/lib/jvm/java-6-sun-1.6.0.20/bin/java -version

 /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -version

The above two paths are different. Have you noted it?
Hi Konstantin you are absolutely right I think that my updates to Ubuntu have 
over written my Java Installations 
because Sakai needs 1.6.20 to run as their doc here

https://confluence.sakaiproject.org/display/DOC/Sakai+2.7 (binary version)
says and it appears that my environment above has been over written.
I checked JAVA_HOME in .bashrc had that old value only and not to 1.6.22 which 
is what this one is pointing.

Thanks for your message.



To avoid this same issue in the future, maybe you should set JAVA_HOME or JRE_HOME to a 
higher-level link to the Java installation directory.  Usually, Ubuntu/Debian set this 
as /usr/lib/jvm/java-6-sun for example, and this link gets updated automatically when you 
update sun-java.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread James Godrej



On Tue, Feb 8, 2011 at 6:18 PM, André Warnier a...@ice-sa.com wrote:
 James Godrej wrote:



 - Original Message 
 From: James Godrej jamesgod...@yahoo.in
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Tue, 8 February, 2011 3:59:32 PM
 Subject: Re: problem in shutting down Tomcat server




 On Tue, Feb 8, 2011 at 2:51 PM, Konstantin Kolinko
 knst.koli...@gmail.com wrote:

 2011/2/8 James Godrej jamesgod...@yahoo.in:

 On Tue, Feb 8, 2011 at 2:20 PM, Konstantin Kolinko
 knst.koli...@gmail.com
 wrote:

 2011/2/8 James Godrej jamesgod...@yahoo.in:

 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not
 found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not
 found
 ./catalina.sh: 373: /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java: not
 found

 Upon seeing the last 3 lines I verified in the folder
 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java
 exists which it complains as not found.

 What does the following command print:

 /usr/lib/jvm/java-6-sun-1.6.0.20/bin/java -version

  /usr/lib/jvm/java-6-sun-1.6.0.22/bin/java -version

 The above two paths are different. Have you noted it?

 Hi Konstantin you are absolutely right I think that my updates to Ubuntu
 have over written my Java Installations because Sakai needs 1.6.20 to run as
 their doc here
 https://confluence.sakaiproject.org/display/DOC/Sakai+2.7 (binary version)
 says and it appears that my environment above has been over written.
 I checked JAVA_HOME in .bashrc had that old value only and not to 1.6.22
 which is what this one is pointing.
 Thanks for your message.


 To avoid this same issue in the future, maybe you should set JAVA_HOME or
 JRE_HOME to a higher-level link to the Java installation directory.
  Usually, Ubuntu/Debian set this as /usr/lib/jvm/java-6-sun for example, and
 this link gets updated automatically when you update sun-java.


 -
I could not understand your suggestion completely.
Sakai needs JAVA_HOME in a particular fashion.
https://confluence.sakaiproject.org/display/DOC/Sakai+2.7
see the binary version on the link I mentioned
i.e. if I have 
JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.22
then as per what you said what should I be doing to avoid it.
Do you mean I make some thing as
JAVA_HOME=/usr/lib/jvm/
then what next to link it?
Because in case of Ubuntu upgrade that still might break the link
Let me know.
-
Thanks


-- 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: problem in shutting down Tomcat server

2011-02-08 Thread James Godrej



On Tue, Feb 8, 2011 at 8:05 PM, André Warnier a...@ice-sa.com wrote:
 On Tue, Feb 8, 2011 at 6:18 PM, André Warnier a...@ice-sa.com wrote:

 James Godrej wrote:


 To avoid this same issue in the future, maybe you should set JAVA_HOME or
 JRE_HOME to a higher-level link to the Java installation directory.
  Usually, Ubuntu/Debian set this as /usr/lib/jvm/java-6-sun for example,
 and
 this link gets updated automatically when you update sun-java.


 -

 I could not understand your suggestion completely.
 Sakai needs JAVA_HOME in a particular fashion.
 https://confluence.sakaiproject.org/display/DOC/Sakai+2.7
 see the binary version on the link I mentioned

 No, it does not.  It says :

 1.1 Set Java environment variables
 ...
 Set the JAVA_HOME environment variable to point to the base directory of
 your Java installation...

 So if you set JAVA_HOME=/usr/lib/jvm/java-6-sun
 and /usr/lib/jvm/java-6-sun is a link which points to
 /usr/lib/jvm/java-6-sun-1.6.0.22 (which is the base of your Java
 installation), then it will work fine.

 And the day that you run an update, and the Ubuntu package manager replaces
 java-6-sun-1.6.0.22 by java-6-sun-1.6.0.36, it will also update the link
 /usr/lib/jvm/java-6-sun to point to this new directory, and it will /still/
 work.

 And the same for Tomcat's JAVA_HOME.
 Both Tomcat and the sakai package care only about one thing : that the
 JAVA_HOME variable points to a valid Java directory, under which they will
 find a bin/java executable to run.

 But this is getting us a bit far from pure Tomcat support, and entering the
 area of OS'es and filesystems and package setup tactics.

Andre thanks for this message this was really useful.


-- 




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



problem with shutting down

2009-05-24 Thread vijay sankar
I have recently downloaded the 6.0.18 binary distribution and I am running
it in vista.

I have started the server by running bootstrap.jar and it is working fine.
I tried to stop the server by running the shutdown.bat, but it is not
stopping.

Can any one help me regarding this