a question about tomcat thread

2017-08-22 Thread ophusky
Server version: Apache Tomcat/8.0.35
Server built:   May 11 2016 21:57:08 UTC
Server number:  8.0.35.0
OS Name:Linux
OS Version: 3.2.35
Architecture:   amd64
JVM Version:1.8.0_45-b14
JVM Vendor: Oracle Corporation
_
1.
[root@app41 manager]# curl -s http://127.0.0.1/manager/status |grep -P -o 'Max 
threads:.*? '
Max threads: 700 Current thread count: 478 Current thread busy: 17 Keeped alive 
sockets count: 5
2.
[root@app41 manager]# pgrep jsvc
25446
25447
[root@app41 manager]# ps -Lf 25447 | wc -l
541

I want to figure out the meaning of "Current thread count"  "Current thread 
busy" "Keeped alive sockets count"   and  relationship between 1 and 2.
I have read the document 
http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html#Server_Status  
if "Current thread busy" mean  "Parse and Prepare Request"  and  "Service" , 
"Keeped alive sockets count" mean  "Keep-Alive"?


please help me  thx~

Re: Re: a question about Realm config

2017-06-01 Thread ophusky
Thank you very much! I according to what you said it and solved the problem. 
I have modified  CATALINA_HOME/conf/server.xml to :



  

 


Everything is all right,thanks again!

2017-06-01 

ophusky 



发件人:Mark Thomas 
发送时间:2017-06-01 15:50
主题:Re: a question about Realm config
收件人:"Tomcat Users List"
抄送:

This time to the list... 

On 01/06/17 08:02, ophusky wrote: 
> Tomcat version:8.0.43.0 
> Nginx  version:openresty/1.11.2.2 
> OS:CentOS Linux release 7.3.1611 (Core) 
>  
> I have already configure tomcat to use the DIGEST certification, 
> When I have direct access to Tomcat  all normal, 
> http://192.168.122.130:8080/sample/test/test.html  can trigger the 
> certification and passed. 
> But when I through the nginx proxy access, 
> http://192.168.122.130/tomcat/sample/test/test.html   have a few 
> problems,can trigger the certification but can't passed ,repeated 
> authentication dialog. 

 

> nginx.conf 
>  
> location ~ /tomcat/ { 
> rewrite ^/tomcat/(.*) /$1 break; 
> proxy_pass http://192.168.122.130:8080; 
> } 
>  
> Why cannot be accessed through the nginx and certified ? please help me 
> ,thanks! 

The request URL forms part of the DIGEST authentication process. By 
changing it in the reverse proxy, you are breaking the authentication 
process. 

You can disable the URI validation. See the validateUri attribute in 
http://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Digest_Authenticator_Valve/Attributes
 

Mark 

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

a question about Realm config

2017-06-01 Thread ophusky
Tomcat version:8.0.43.0
Nginx  version:openresty/1.11.2.2
OS:CentOS Linux release 7.3.1611 (Core)


I have already configure tomcat to use the DIGEST certification,
When I have direct access to Tomcat  all normal,
http://192.168.122.130:8080/sample/test/test.html  can trigger the 
certification and passed.
But when I through the nginx proxy access,
http://192.168.122.130/tomcat/sample/test/test.html   have a few problems,can 
trigger the certification but can't passed ,repeated authentication dialog.
CATALINA_HOME/conf/server.xml:


  




CATALINA_HOME/conf/tomcat-users.xml :

  


CATALINA_HOME/webapps_exp/sample/WEB-INF/web.xml :

   
 
 my sample webapp
 
 /test/*
   
   
   testuser
   




 DIGEST
 webapp




  testuser



nginx.conf


location ~ /tomcat/ {
rewrite ^/tomcat/(.*) /$1 break;
proxy_pass http://192.168.122.130:8080;
}


Why cannot be accessed through the nginx and certified ? please help me ,thanks!