You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nuno Manuel Martins <nu...@sonae.com> on 2008/04/01 13:28:03 UTC

status worker

Hello,

I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing.

Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing:

worker.properties file:

worker.list=lb1 , lb2 , jkstatus
[...]
jkstatus.host=rh02
jkstatus.port=10001
jkstatus.username=manager
jkstatus.password=tomcat
jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus
jkstatus.testlb=lb1
jkstatus.testworker=worker42

uriworkermap.properties file:
/jkmanager=jkstatus

Apache httpd.conf file:
JkWorkersFile /usr/local/apache2/conf/workers.properties
JkMountFile /usr/local/apache2/conf/uriworkermap.properties

Include /usr/local/apache2/conf/tomcat-55.conf
Include /usr/local/apache2/conf/tomcat-50.conf

Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :(

Regards,
Nuno

Re: An error occurred at line: -1, Unable to compile class for JSP(Netware)

Posted by Howard Watson <ho...@esgw.org>.
Thanks. I did not find the bug listed when I searched.

>>> Rainer Jung <ra...@kippdata.de> 4/1/2008 11:33 AM >>>
It's a known bug, which has beend discussed on the developers list only 
very recently. See

http://marc.info/?t=120667098200003&r=1&w=2 

Your workaround (using ant 1.5) seems fine. The final solution is still 
pending, but it's quite possible, that Mark does a fix for the future 
4.1.38. This still needs some clarification though.

Regards,

Rainer

Howard Watson schrieb:
> This is an upgrade from Apache2.0.59/Tomcat4.1.31/mod_jk 1.2.15 to Apache2.0.63/Tomcat4.1.37/mod_jk 1.2.36 on Netware 6.5 sp7. Except for JSP compiles, everything including HTML, servlets and precompiled JSPs works.
>  
> Ant.jar is there in CATALINA_HOME\common\lib. The problem is with Ant v1.7 introduced in Tomcat4.1.36. If I use Ant v1.5 from Tomcat4.1.34 all works for me including JSP compiles. The current functioning environment Apache2.0.63/Tomcat4.1.37/Ant1.5/mod_jk1.2.26. I use configuration as here: http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.3/bin/netware/i386/Tomcat-on-NetWare-HowTo.html 
> As an experiment:
> 
> When using Tomcat4.1.37 and Ant v1.7 without an explicit envset (default) CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get error: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. 
> 
> When using Tomcat4.1.36/.37 and Ant v1.7 with an explicit envset CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get NoClassDefFoundError: org/apache/tools/ant/launch/AntMain 
> Short story:  Ant.jar from Tomcat4.1.34 compiles JSPs in Tomcat4.1.37. Ant.jar included with Tomcat4.1.37 errors. I saw this with Tomcat4.1.36 also. I am simply copying .conf files from older Apache/Tomcat to current versions.
>  
> How would I troubleshoot this further?
> 

---------------------------------------------------------------------
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 


Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Employees of Easter Seals-Goodwill Northern Rocky Mountain are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy and outside the scope of the employment of the individual concerned. The company will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising. 
If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. 
Please report any inappropriate or abusive use of this email system to abuse@esgw.org

Re: An error occurred at line: -1, Unable to compile class for JSP(Netware)

Posted by Rainer Jung <ra...@kippdata.de>.
It's a known bug, which has beend discussed on the developers list only 
very recently. See

http://marc.info/?t=120667098200003&r=1&w=2

Your workaround (using ant 1.5) seems fine. The final solution is still 
pending, but it's quite possible, that Mark does a fix for the future 
4.1.38. This still needs some clarification though.

Regards,

Rainer

Howard Watson schrieb:
> This is an upgrade from Apache2.0.59/Tomcat4.1.31/mod_jk 1.2.15 to Apache2.0.63/Tomcat4.1.37/mod_jk 1.2.36 on Netware 6.5 sp7. Except for JSP compiles, everything including HTML, servlets and precompiled JSPs works.
>  
> Ant.jar is there in CATALINA_HOME\common\lib. The problem is with Ant v1.7 introduced in Tomcat4.1.36. If I use Ant v1.5 from Tomcat4.1.34 all works for me including JSP compiles. The current functioning environment Apache2.0.63/Tomcat4.1.37/Ant1.5/mod_jk1.2.26. I use configuration as here: http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.3/bin/netware/i386/Tomcat-on-NetWare-HowTo.html 
> As an experiment:
> 
> When using Tomcat4.1.37 and Ant v1.7 without an explicit envset (default) CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get error: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. 
> 
> When using Tomcat4.1.36/.37 and Ant v1.7 with an explicit envset CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get NoClassDefFoundError: org/apache/tools/ant/launch/AntMain 
> Short story:  Ant.jar from Tomcat4.1.34 compiles JSPs in Tomcat4.1.37. Ant.jar included with Tomcat4.1.37 errors. I saw this with Tomcat4.1.36 also. I am simply copying .conf files from older Apache/Tomcat to current versions.
>  
> How would I troubleshoot this further?
> 
> Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Employees of Easter Seals-Goodwill Northern Rocky Mountain are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy and outside the scope of the employment of the individual concerned. The company will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising. 
> If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. 
> Please report any inappropriate or abusive use of this email system to abuse@esgw.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


An error occurred at line: -1, Unable to compile class for JSP (Netware)

Posted by Howard Watson <ho...@esgw.org>.
This is an upgrade from Apache2.0.59/Tomcat4.1.31/mod_jk 1.2.15 to Apache2.0.63/Tomcat4.1.37/mod_jk 1.2.36 on Netware 6.5 sp7. Except for JSP compiles, everything including HTML, servlets and precompiled JSPs works.
 
Ant.jar is there in CATALINA_HOME\common\lib. The problem is with Ant v1.7 introduced in Tomcat4.1.36. If I use Ant v1.5 from Tomcat4.1.34 all works for me including JSP compiles. The current functioning environment Apache2.0.63/Tomcat4.1.37/Ant1.5/mod_jk1.2.26. I use configuration as here: http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.3/bin/netware/i386/Tomcat-on-NetWare-HowTo.html 
As an experiment:

When using Tomcat4.1.37 and Ant v1.7 without an explicit envset (default) CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get error: [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. 

When using Tomcat4.1.36/.37 and Ant v1.7 with an explicit envset CATALINA_CLASSPATH=$CATALINA_HOME;\common\lib\ant.jar in Tomcat.conf I get NoClassDefFoundError: org/apache/tools/ant/launch/AntMain 
Short story:  Ant.jar from Tomcat4.1.34 compiles JSPs in Tomcat4.1.37. Ant.jar included with Tomcat4.1.37 errors. I saw this with Tomcat4.1.36 also. I am simply copying .conf files from older Apache/Tomcat to current versions.
 
How would I troubleshoot this further?

Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Employees of Easter Seals-Goodwill Northern Rocky Mountain are expressly required not to make defamatory statements and not to infringe or authorize any infringement of copyright or any other legal right by email communications. Any such communication is contrary to company policy and outside the scope of the employment of the individual concerned. The company will not accept any liability in respect of such communication, and the employee responsible will be personally liable for any damages or other liability arising. 
If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. 
Please report any inappropriate or abusive use of this email system to abuse@esgw.org

RE: status worker

Posted by Nuno Manuel Martins <nu...@sonae.com>.
Thank you.

It was related with the virtual hosts and it Works now.

Regards,
Nuno

-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@kippdata.de]
Sent: terça-feira, 1 de Abril de 2008 16:08
To: Tomcat Users List
Subject: Re: status worker

Nuno Manuel Martins wrote:
> Hi,
>
> I tried before to do as you said and it did not work. I guess this is because when I make the request the one answering is Apache httpd and not Tomcat, and I don't think httpd has any clue of what a status worker is.

Sure it has. It asks mod_jk and mod_jk knows all about worker statistics
etc. and generates an HTML page.

> I tried to simplify it with just these 3 lines:
> worker.jkstatus.type=status
> worker.jkstatus.host=rh02
> worker.jkstatus.port=10002

host/port not needed (but doesn't harm either)

> So that it knows where to find Tomcat but still the same problem as with the other 2 previous configurations:
>         The requested URL /jkmanager was not found on this server.

Do you have any virtual hosts? If so, you need to put the JkMountFile
into the virtual host, which handles your /jkmanager request.

If it doesn't work at all, set JkLogLevel to debug, restart httpd and
send a single request for /jkmanager. After that, post the contents of
the JkLogFile.

Regards,

Rainer

> -----Original Message-----
> From: Rainer Jung [mailto:rainer.jung@kippdata.de]
> Sent: terça-feira, 1 de Abril de 2008 13:20
> To: Tomcat Users List
> Subject: Re: status worker
>
> Nuno Manuel Martins wrote:
>> Hello,
>>
>> I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing.
>>
>> Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing:
>>
>> worker.properties file:
>>
>> worker.list=lb1 , lb2 , jkstatus
>> [...]
>> jkstatus.host=rh02
>> jkstatus.port=10001
>> jkstatus.username=manager
>> jkstatus.password=tomcat
>> jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus
>> jkstatus.testlb=lb1
>> jkstatus.testworker=worker42
>>
>> uriworkermap.properties file:
>> /jkmanager=jkstatus
>>
>> Apache httpd.conf file:
>> JkWorkersFile /usr/local/apache2/conf/workers.properties
>> JkMountFile /usr/local/apache2/conf/uriworkermap.properties
>>
>> Include /usr/local/apache2/conf/tomcat-55.conf
>> Include /usr/local/apache2/conf/tomcat-50.conf
>>
>> Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :(
>>
>> Regards,
>> Nuno
>
> Correct your workers.properties
>
> Remove all of the above lines of the form
>
> jkstatus.attribute=value
>
> because none of the attributes you are using makes much sense.
>
> Add:
>
> worker.jkstatus.type=status
>
> to let mod_jk know, when it tries to send a request to the worker with
> name jkstatus, that there is not host/port/Tomcat behind it, but instead
> it should generate its own status page.
>
> If it works, then you should add an authentication/authorization
> mechanism inside httpd to the URL /jkmanager (e.g. a Location directive
> and inside a required user/password; this can be done with usual httpd
> procedures, nothing mod_jk specific).
>
> Regards,
>
> Rainer

---------------------------------------------------------------------
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: status worker

Posted by Rainer Jung <ra...@kippdata.de>.
Nuno Manuel Martins wrote:
> Hi,
> 
> I tried before to do as you said and it did not work. I guess this is because when I make the request the one answering is Apache httpd and not Tomcat, and I don't think httpd has any clue of what a status worker is.

Sure it has. It asks mod_jk and mod_jk knows all about worker statistics 
etc. and generates an HTML page.

> I tried to simplify it with just these 3 lines:
> worker.jkstatus.type=status
> worker.jkstatus.host=rh02
> worker.jkstatus.port=10002

host/port not needed (but doesn't harm either)

> So that it knows where to find Tomcat but still the same problem as with the other 2 previous configurations:
>         The requested URL /jkmanager was not found on this server.

Do you have any virtual hosts? If so, you need to put the JkMountFile 
into the virtual host, which handles your /jkmanager request.

If it doesn't work at all, set JkLogLevel to debug, restart httpd and 
send a single request for /jkmanager. After that, post the contents of 
the JkLogFile.

Regards,

Rainer

> -----Original Message-----
> From: Rainer Jung [mailto:rainer.jung@kippdata.de]
> Sent: terça-feira, 1 de Abril de 2008 13:20
> To: Tomcat Users List
> Subject: Re: status worker
> 
> Nuno Manuel Martins wrote:
>> Hello,
>>
>> I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing.
>>
>> Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing:
>>
>> worker.properties file:
>>
>> worker.list=lb1 , lb2 , jkstatus
>> [...]
>> jkstatus.host=rh02
>> jkstatus.port=10001
>> jkstatus.username=manager
>> jkstatus.password=tomcat
>> jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus
>> jkstatus.testlb=lb1
>> jkstatus.testworker=worker42
>>
>> uriworkermap.properties file:
>> /jkmanager=jkstatus
>>
>> Apache httpd.conf file:
>> JkWorkersFile /usr/local/apache2/conf/workers.properties
>> JkMountFile /usr/local/apache2/conf/uriworkermap.properties
>>
>> Include /usr/local/apache2/conf/tomcat-55.conf
>> Include /usr/local/apache2/conf/tomcat-50.conf
>>
>> Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :(
>>
>> Regards,
>> Nuno
> 
> Correct your workers.properties
> 
> Remove all of the above lines of the form
> 
> jkstatus.attribute=value
> 
> because none of the attributes you are using makes much sense.
> 
> Add:
> 
> worker.jkstatus.type=status
> 
> to let mod_jk know, when it tries to send a request to the worker with
> name jkstatus, that there is not host/port/Tomcat behind it, but instead
> it should generate its own status page.
> 
> If it works, then you should add an authentication/authorization
> mechanism inside httpd to the URL /jkmanager (e.g. a Location directive
> and inside a required user/password; this can be done with usual httpd
> procedures, nothing mod_jk specific).
> 
> Regards,
> 
> Rainer

---------------------------------------------------------------------
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: status worker

Posted by Nuno Manuel Martins <nu...@sonae.com>.
Hi,

I tried before to do as you said and it did not work. I guess this is because when I make the request the one answering is Apache httpd and not Tomcat, and I don't think httpd has any clue of what a status worker is.

I tried to simplify it with just these 3 lines:
worker.jkstatus.type=status
worker.jkstatus.host=rh02
worker.jkstatus.port=10002

So that it knows where to find Tomcat but still the same problem as with the other 2 previous configurations:
        The requested URL /jkmanager was not found on this server.

-----Original Message-----
From: Rainer Jung [mailto:rainer.jung@kippdata.de]
Sent: terça-feira, 1 de Abril de 2008 13:20
To: Tomcat Users List
Subject: Re: status worker

Nuno Manuel Martins wrote:
> Hello,
>
> I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing.
>
> Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing:
>
> worker.properties file:
>
> worker.list=lb1 , lb2 , jkstatus
> [...]
> jkstatus.host=rh02
> jkstatus.port=10001
> jkstatus.username=manager
> jkstatus.password=tomcat
> jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus
> jkstatus.testlb=lb1
> jkstatus.testworker=worker42
>
> uriworkermap.properties file:
> /jkmanager=jkstatus
>
> Apache httpd.conf file:
> JkWorkersFile /usr/local/apache2/conf/workers.properties
> JkMountFile /usr/local/apache2/conf/uriworkermap.properties
>
> Include /usr/local/apache2/conf/tomcat-55.conf
> Include /usr/local/apache2/conf/tomcat-50.conf
>
> Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :(
>
> Regards,
> Nuno

Correct your workers.properties

Remove all of the above lines of the form

jkstatus.attribute=value

because none of the attributes you are using makes much sense.

Add:

worker.jkstatus.type=status

to let mod_jk know, when it tries to send a request to the worker with
name jkstatus, that there is not host/port/Tomcat behind it, but instead
it should generate its own status page.

If it works, then you should add an authentication/authorization
mechanism inside httpd to the URL /jkmanager (e.g. a Location directive
and inside a required user/password; this can be done with usual httpd
procedures, nothing mod_jk specific).

Regards,

Rainer

---------------------------------------------------------------------
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: status worker

Posted by Rainer Jung <ra...@kippdata.de>.
Nuno Manuel Martins wrote:
> Hello,
> 
> I am new to tomcat in general and I am trying to setup jk_mod (using 1.2.25) and I have already successfully installed it and put workers serving dynamic content from the tomcat server with load balancing.
> 
> Now I wanted to setup the status worker to get some statistics. I am using the default configuration for it but probably something basic is missing:
> 
> worker.properties file:
> 
> worker.list=lb1 , lb2 , jkstatus
> [...]
> jkstatus.host=rh02
> jkstatus.port=10001
> jkstatus.username=manager
> jkstatus.password=tomcat
> jkstatus.url=http://${jkstatus.host}:${jkstatus.port}/jkstatus
> jkstatus.testlb=lb1
> jkstatus.testworker=worker42
> 
> uriworkermap.properties file:
> /jkmanager=jkstatus
> 
> Apache httpd.conf file:
> JkWorkersFile /usr/local/apache2/conf/workers.properties
> JkMountFile /usr/local/apache2/conf/uriworkermap.properties
> 
> Include /usr/local/apache2/conf/tomcat-55.conf
> Include /usr/local/apache2/conf/tomcat-50.conf
> 
> Apache httpd is on host rh01 and Tomcat server is on host rh02. When I try to access http://rh01/jkmanager it just says it can't find the document... can someone say what am I missing? The documentation doesn't provide much troubleshoot :(
> 
> Regards,
> Nuno

Correct your workers.properties

Remove all of the above lines of the form

jkstatus.attribute=value

because none of the attributes you are using makes much sense.

Add:

worker.jkstatus.type=status

to let mod_jk know, when it tries to send a request to the worker with 
name jkstatus, that there is not host/port/Tomcat behind it, but instead 
it should generate its own status page.

If it works, then you should add an authentication/authorization 
mechanism inside httpd to the URL /jkmanager (e.g. a Location directive 
and inside a required user/password; this can be done with usual httpd 
procedures, nothing mod_jk specific).

Regards,

Rainer

---------------------------------------------------------------------
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