Question about "Error count" field in manager application

2006-03-13 Thread Igor
Hello!

In manager application in the "applications list" section there is a place, 
where detailed statistics is listed:

Processing time: 0 s Max time: 5 ms Request count: 60 Error count: 0 Load time: 
1 ms Classloading time: 0 ms

What kind of errors are mentioned in "Error count" field?
This number increases, but I cannot find corresponding entries in log files

Thank you,
Igor

Re: Socket accept failed: The specified network name is no longer available.

2018-04-16 Thread Igor
If this is really such a simple problem then how can I get rid of its output
into error log?



--
Sent from: http://tomcat.10.x6.nabble.com/Tomcat-User-f1968778.html

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



Re: Socket accept failed: The specified network name is no longer available.

2018-04-26 Thread Igor
I'm trying to find the reason for this problem-
I've installed Wireshark on the instance and have captured the packets in
the moments that we see a problem.
Tomcat's error log has millisecond precision (.000), but Wireshark's log has
microsecond precision (.00).
Tomcat's error log has no additional details, so I can't find a match
between the Wireshark capture result and Tomcat's log.

I try to find out:
1. how to print out into Tomcat's log ip:port of the socket that wasn't
accepted?
2. is the timestamp that Tomcat writes to the log set on the event
occurrence or on writing to the file?




--
Sent from: http://tomcat.10.x6.nabble.com/Tomcat-User-f1968778.html

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



TomCat 9 service failed to start on Windows after TomCat 9 update

2021-01-15 Thread Igor Sluge

 
Hello,
I updated TomCat for my app to the latest TomCat 9.0.41 and after update TomCat 
service failed to start successfully as Windows service. I just see 404 error 
when trying to open the TomCat app. Also there are no logs at all in the log 
directory! If I start TomCat locally by the command   tomcat9.exe" //TS//MyApp  
 it started successfully.
OS: Windows 7 and Server 2012
Does anybody have any ideas of how to troubleshoot this issue?
 
 

Re[2]: TomCat 9 service failed to start on Windows after TomCat 9 update

2021-01-17 Thread Igor Sluge

Hello,
Thanks for your answer. Do you know is anyway to specify «Local System» user 
for «tomcat9.exe" //IS//» command 
via cmd? 
>Пятница, 15 января 2021, 16:34 +03:00 от Robert Turner :
> 
>I would check permissions on the folders/files. The account running the 
>windows service may not have permissions to execute the programs or maybe 
>access the directories. That's the first thing I would check. (Also check 
>Event Viewer for any related messages).  
>On Fri, Jan 15, 2021 at 8:24 AM Igor Sluge < sl...@mail.ru.invalid > wrote:
>  
>> 
>>Hello,
>>I updated TomCat for my app to the latest TomCat 9.0.41 and after update 
>>TomCat service failed to start successfully as Windows service. I just see 
>>404 error when trying to open the TomCat app. Also there are no logs at all 
>>in the log directory! If I start TomCat locally by the command   tomcat9.exe" 
>>//TS//MyApp   it started successfully.
>>OS: Windows 7 and Server 2012
>>Does anybody have any ideas of how to troubleshoot this issue?
>> 
>>  
 
 
Bye, Igor
 

Re[3]: TomCat 9 service failed to start on Windows after TomCat 9 update

2021-01-19 Thread Igor Sluge

Hello,
For all who is interested in how to do that: the following 
«--ServiceUser=LocalSystem» should be added to the «//IS//» command
  
>Понедельник, 18 января 2021, 7:40 +03:00 от Igor Sluge :
> 
>
>Hello,
>Thanks for your answer. Do you know is anyway to specify «Local System» user 
>for «tomcat9.exe" //IS//» command 
>via cmd?
>>Пятница, 15 января 2021, 16:34 +03:00 от Robert Turner < rtur...@e-djuster.ca 
>>>:
>> 
>>I would check permissions on the folders/files. The account running the 
>>windows service may not have permissions to execute the programs or maybe 
>>access the directories. That's the first thing I would check. (Also check 
>>Event Viewer for any related messages).  
>>On Fri, Jan 15, 2021 at 8:24 AM Igor Sluge <  sl...@mail.ru.invalid > wrote:
>> 
>>> 
>>>Hello,
>>>I updated TomCat for my app to the latest TomCat 9.0.41 and after update 
>>>TomCat service failed to start successfully as Windows service. I just see 
>>>404 error when trying to open the TomCat app. Also there are no logs at all 
>>>in the log directory! If I start TomCat locally by the command   
>>>tomcat9.exe" //TS//MyApp   it started successfully.
>>>OS: Windows 7 and Server 2012
>>>Does anybody have any ideas of how to troubleshoot this issue?
>>> 
>>>   
> 
>Bye, Igor
>  
 
 
Bye, Igor
 

Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Igor Borovkov
Hello!

I have a standalone java program permanently running on a server. I need to
communicate with that java program from servlets.

Could you suggest me a simplest solution how to do that. I think I should use
RMI. But there is one requirement – apache tomcat should be embedded to that
program. Will this requirement bring difficulties or not?

Thanks in advance.



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



Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Igor Borovkov

> I don't know of anything that requires you to embed Tomcat in your app. They
> should be able to communicate just find as separate entities. You could also

Thanks for your reply.

We thought about embedding tomcat (to startup it from the java program) to
simplify whole application and improve its portability, cause it is more
convient for us and our system to have all logic both of the java program and
the servlets in one place.
But perhaps it is not really good idea.




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



Re[2]: Communication with a standalone java program from servlets (embedded tomcat). RMI?

2006-11-03 Thread Igor Borovkov
> Igor-

> when you say 'tomcat' should be embedded ..does this imply that  of
> these tomcat constructs should be embedded?
> Servlet?
> Manager?
> MBean?
> Internals?


Sorry. I am not perfectly familiar with embedding tomcat server at present time
I just ment starting tomcat server from the java program and to stop it with 
closing
that standalone java program.
Perhaps bad idea.  But may be it is good to have all application logic in one 
place cause
we wouldn't need tomcat server for other purposes rather than for serving 
servlets that control
the external java program.


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



Re: Is jsp designed for use by large websites

2006-11-25 Thread Igor Borovkov
Hello!

If you want to develop a small or medium webapplication
and you or your programmers is familiar with PHP I think
it is no doubt use PHP.

Two years ago when I was in online ecommerce industry I used only
PHP. These days I was not familiar with Java. Now I am
a Java Developer. Nowadays I develop medium and large
enterprise applications mostly. And anyway
I think I will not use JSP for developing a small application.

If you don't have a dedicated server It is hardly to find
hosting with JSP supports. 99,99% hosting companies
supports PHP by default.


> Hello all,

> I am a beginner and I am considering whether to use
> jsp or php to develop a web application. I prefer jsp
> since i am familiar with java. But i found that many
> web hosting companies either do not support jsp or
> only support jsp in their expensive dedicated server
> plans. In contrast, php is well-supported by almost
> all web hosting companies. Is jsp designed for use by
> large websites that require dedicated servers? Do you
> think php is a better choice for small and medium
> sized websites that don't require dedicated servers?
> Thank you.



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



Advanced War deployment

2007-01-10 Thread Vlasov Igor

I have one commercial project and want to deploy it throw .war deployment
process.
My application uses external libs (10 mb) which must presents in WEB-INF\lib
dir. All app size is 12mb.

How can i avoid of putting all that libs in .war file and transfer only
actual content of my app in one file?
For example I put all except libs in .war and deploy it. Then tomcat replace
only changed file and do not delete already deployes libs.

Maybe  I can use ANT script to replace Tomcat .war deploy/undeploy
procedure?






-- 
View this message in context: 
http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8253992
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: AW: deploying war files

2007-01-10 Thread Vlasov Igor



what I do is to deploy the war file as zip file, then extract it and reload
the applicataion.
It's not very nice, but it's working automatically in an ant script, I did
it because the war file deployment was to unstable.


How do you automatically  run this ant script?
-- 
View this message in context: 
http://www.nabble.com/AW%3A-deploying-war-files-tf104477.html#a8254238
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Advanced War deployment

2007-01-10 Thread Vlasov Igor



Mikolaj Rydzewski-2 wrote:
> 
> Vlasov Igor wrote:
>> I have one commercial project and want to deploy it throw .war deployment
>> process.
>> My application uses external libs (10 mb) which must presents in
>> WEB-INF\lib
>> dir. All app size is 12mb.
>>
>> How can i avoid of putting all that libs in .war file and transfer only
>> actual content of my app in one file?
>> For example I put all except libs in .war and deploy it. Then tomcat
>> replace
>> only changed file and do not delete already deployes libs.
>>   
> Why is the size of war file is a problem for you? You can put all 
> content from WEB-INF/lib to common/lib or shared/lib. But such solution 
> has several drawbacks and you should be aware of them: 
> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
> 
> On the other hand, if you want just to save bandwith when deploying new 
> wersion of application you could use i.e. rsync to transfer war file to 
> remote server, and then deploy remote file.
> -- 
> Mikolaj Rydzewski <[EMAIL PROTECTED]>
> 

All libs MUST be in WEB-INF/lib. And i want to use standart procedure of
detecting new .war and its deployment process BUT a want to manually control
what files to undelpoy during this process 

Thus i can prevent that libs ant CLIENT UPLOADED FILES to delete from
unpacked dir for .WAR



-- 
View this message in context: 
http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8254519
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: AW: Advanced War deployment

2007-01-10 Thread Vlasov Igor


Markus Döring wrote:
> 
> Hi,
> Don't know if there is a better way to do, but you can place the lib files
> into one of the following directorys instead of into the .war file:
> 
> /tomcat/common/lib
> /tomcat/server/lib
> /tomcat/shared/lib
> 
> Greetings
> Markus
> 
> 

I have no rights to acess /tomcat/... dirs and put lib files

-- 
View this message in context: 
http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8254533
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Advanced War deployment

2007-01-10 Thread Vlasov Igor



Leon Rosenberg-3 wrote:
> 
> hmm,
> 
> why don't you put the expanded web-app structure on the client's
> machine somewhere else than under tomcat, put your new files therein
> and repackage the .war on the machine directly?
> 
> regards
> Leon
> 

Please give me the  detailed explanation ot your idea..

-- 
View this message in context: 
http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8255145
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Advanced War deployment

2007-01-10 Thread Vlasov Igor



Vlasov Igor wrote:
> 
> I have one commercial project and want to deploy it throw .war deployment
> process.
> My application uses external libs (10 mb) which must presents in
> WEB-INF\lib dir. All app size is 12mb.
> 
> How can i avoid of putting all that libs in .war file and transfer only
> actual content of my app in one file?
> For example I put all except libs in .war and deploy it. Then tomcat
> replace only changed file and do not delete already deployes libs.
> 
> Maybe  I can use ANT script to replace Tomcat .war deploy/undeploy
> procedure?
> 

I want to know is the ability to modify .war deploy/undeploy logic with
custom actions(i.e/ ant script)?

or mamy use some tomcat mechanism to watch on .zip file modification in some
directory and run ant script which can modify files in my webapp dir and
restart app context
-- 
View this message in context: 
http://www.nabble.com/Advanced-War-deployment-tf2951300.html#a8255209
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Cannot start tomcat5 service with jrockit

2007-03-12 Thread Igor Shevchenko
Hello,
I'm experiencing problems with starting tomcat as a service under Win2003 
server with jrockit jvm.
Tomcat version is 5.5.20 and it starts successfully using startup.bat 
script, but when trying to start it as a service I have the following 
output in jakarta-service log:
[2007-03-12 04:45:48] [info] Running Service...
[2007-03-12 04:45:48] [info] Starting service...
[2007-03-12 04:45:48] [173  javajni.c] [error] The specified module could 
not be found.
[2007-03-12 04:45:48] [924  prunsrv.c] [error] Failed creating java 
C:\jrockit-R27.1.0-jdk1.5.0_08\jre\bin\jrockit\jvm.dll
[2007-03-12 04:45:48] [1179 prunsrv.c] [error] ServiceStart returned 1
[2007-03-12 04:45:48] [info] Run service finished.
[2007-03-12 04:45:48] [info] Procrun finished.
I've tried googling and reading mailing archives but couldn't find a 
solution.

Best regards,
---
Igor Shevchenko


Re: Cannot start tomcat5 service with jrockit

2007-03-13 Thread Igor Shevchenko
>Why don't u 
> simply try/attempt to get version 6.x of Tomcat by now???
The answer is very simple: customer uses this version of Tomcat and wants 
no upgrade.
Best regards,
---
Igor Shevchenko

"Mr. Steve Burrus" <[EMAIL PROTECTED]> wrote on 13.03.2007 00:59:03:

> look you say that your >>"Tomcat version is 5.5.20"<<. Why don't u 
> simply try/attempt to get version 6.x of Tomcat by now??? I mean any 
> kind of version 5 is way too old by now! Capiche? [Understand?] 
> 
> Igor Shevchenko wrote:
> 
> >Hello,
> >I'm experiencing problems with starting tomcat as a service under 
Win2003 
> >server with jrockit jvm.
> >Tomcat version is 5.5.20 and it starts successfully using startup.bat 
> >script, but when trying to start it as a service I have the following 
> >output in jakarta-service log:
> >[2007-03-12 04:45:48] [info] Running Service...
> >[2007-03-12 04:45:48] [info] Starting service...
> >[2007-03-12 04:45:48] [173  javajni.c] [error] The specified module 
could 
> >not be found.
> >[2007-03-12 04:45:48] [924  prunsrv.c] [error] Failed creating java 
> >C:\jrockit-R27.1.0-jdk1.5.0_08\jre\bin\jrockit\jvm.dll
> >[2007-03-12 04:45:48] [1179 prunsrv.c] [error] ServiceStart returned 1
> >[2007-03-12 04:45:48] [info] Run service finished.
> >[2007-03-12 04:45:48] [info] Procrun finished.
> >I've tried googling and reading mailing archives but couldn't find a 
> >solution.
> >
> >Best regards,
> >---
> >Igor Shevchenko
> >
> > 
> >
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


Re: Cannot start tomcat5 service with jrockit

2007-03-19 Thread Igor Shevchenko
bb <[EMAIL PROTECTED]> wrote on 13.03.2007 19:22:10:

> Hi,
> 
> We are running 5.5.17 as a service using JRockit. A couple things to 
check:
> 
> 1) if you are using the service.bat to install as a service confirm that 

> the PR_JVM is considering the correct path to the jrockit dll. this 
> should be std in the 5.5.20 service.bat:
> 
> rem Set the server jvm from JAVA_HOME
> set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll
> if exist "%PR_JVM%" goto foundJvm
> rem Set the client jvm from JAVA_HOME
> set PR_JVM=%JAVA_HOME%\jre\bin\client\jvm.dll
> if exist "%PR_JVM%" goto foundJvm
> rem Check for JRockit JVM: Bugzilla 39674
> set PR_JVM=%JAVA_HOME%\jre\bin\jrockit\jvm.dll
> if exist "%PR_JVM%" goto foundJvm
> set PR_JVM=auto
> 
It is correct. I've checked several times.

> 2) you might need to add the %JAVA_HOME%\jre\bin to the environment 
> PATH. I didn't think we had to do this for Win2003 but it was required 
> for XP.
> 
Google gave me the same advise, so it was added.

> Hope that helps.
Nope. It doesn't work. I switched to Sun jre and it works without any 
problems. Now I have absolutely no ideas what's wrong with jrockit. 

> 
> Igor Shevchenko wrote:
> 
>  > Hello,
>  > I'm experiencing problems with starting tomcat as a service under 
> Win2003 server with jrockit jvm.
>  > Tomcat version is 5.5.20 and it starts successfully using startup.bat 

> script, but when trying to start it as a service I have the following 
> output in jakarta-service log:
>  > [2007-03-12 04:45:48] [info] Running Service...
>  > [2007-03-12 04:45:48] [info] Starting service...
>  > [2007-03-12 04:45:48] [173  javajni.c] [error] The specified module 
> could not be found.
>  > [2007-03-12 04:45:48] [924  prunsrv.c] [error] Failed creating java 
> C:\jrockit-R27.1.0-jdk1.5.0_08\jre\bin\jrockit\jvm.dll
>  > [2007-03-12 04:45:48] [1179 prunsrv.c] [error] ServiceStart returned 
1
>  > [2007-03-12 04:45:48] [info] Run service finished.
>  > [2007-03-12 04:45:48] [info] Procrun finished.
>  > I've tried googling and reading mailing archives but couldn't find a 
> solution.
>  >
>  > Best regards,
>  > ---
>  > Igor Shevchenko
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Best regards,
---
Igor Shevchenko


Tomcat 5.5.23 Windows Service vs. User Application

2007-04-11 Thread Klacansky, Igor
Hi,

I am running Tomcat 5.5.23 + SSL as a standalone server under Win XP SP2 =
and Java 1.5.0.08.

Started as a user application (startup.bat) there are no problems, I can =
see all pages from the web.

However, when I start Tomcat as Win Service (service.bat), I can see all =
pages locally on the same machine, but not from the web.
The browser is bringing timeout on requests via web.
I have changed the starting account of the service to be the same as for =
the user application, but it didn't help.

How to make the Win Service to serve the pages over web?
What am I doing wrong?

Thank you,

Igor

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



set juli logging directory?

2007-11-02 Thread Igor Vlasov

Hello

I have working logging enviroment. For one of my logger i have

1karakas.org.apache.juli.FileHandler.directory = ${catalina.base}/logs

and  it writes to tomcat "logs" directory.

The problem is that i want to write log to the subdirectory of my web
application.
for example:
.
..
web
  |-WEB-INF
  |-jsp
  |-logs <- to this directory
  |-html
   

I can make a system property "aaa" that point to "web" directory and write 

1karakas.org.apache.juli.FileHandler.directory = ${aaa}/logs


How can I avoid making this property and point a juli logger handler to
web\logs directory?
Like that or another way...
1karakas.org.apache.juli.FileHandler.directory = {WEB_APP_ROOT}/logs


-- 
View this message in context: 
http://www.nabble.com/set-juli-logging-directory--tf4737613.html#a13548227
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: set juli logging directory?

2007-11-20 Thread Igor Vlasov



Albretch Mueller-3 wrote:
> 
>> How can I avoid making this property and point a juli logger handler to
>> web\logs directory?
> ~
>  Have you taken a look into the "directory" setting or your
> logging.properties file? Either the global or for the application?
> ~
>  lbrtchx
> 
> 
For application
-- 
View this message in context: 
http://www.nabble.com/set-juli-logging-directory--tf4737613.html#a13872359
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Help for basic SSL certificate authentication

2007-08-21 Thread Igor Andjelkovic
Hi,

I'am writing my very first Java aplication which is dealing with SSL.
I want to write Server side aplication which will ask for certificate,
and Client aplication which only need to show content of certificate on
user screen, for example, in console.

Every help is welcome.

Thanks, Igor


  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


6.0.20 - New behavior on conf/Catalina//.xml update. Why redeploy?

2009-09-30 Thread Igor Mukhin

Hallo everybody,

At first I like to say that I always loved Tomcat and the job the 
commiters/community does with it. But this change/version is just 
frustrating...


I tried Tomcat 6.0.20 yesterday and was really disappointed about what 
happend (since 6.0.18) with the handing of context.xml. The change was 
on a minor (bugfixing) version, but it makes Tomcat backward 
uncompatible for many people. The new behavior (coping context.xml to 
/conf, redeploy on update of /conf/.../.xml) just replaces the 
old behavior, without a option the have the old one back.


1.
I have looked at the new documentation and the new code in 
org.apache.catalina.startup.HostConfig.java. And my first question is: 
what is reason behind redeploying the application after detecting an 
update of /conf/.../.xml? (6.0.18 restarts the application in 
this case)


Just think about it: You have an tomcat production server with 200 
applications. All application were deployed statically and they (and 
you) have no .war files. You can't restart the tomcat. But you need to 
update the database resource parameter in /conf/.../.xml of an 
application promtly. You edit the file, save it. In a minute a customer 
calls you on the phone and tells the application is not accessible. You 
look into appBase, but the app is not there. Tomcat has deleted it (in a 
try to redeply, but there is not .war file to deploy) ?!?! Where are my 
files?!?!?


2.
If I deliver a patch that makes the behavoir after updating a 
/conf/.../.xml configurable, could it be included in the next 
version?
Something like onDetectContextXmlUpdate="redeploy|reload|ignore"> where "redeploy" is 
default to keep new behavior


3.
If I deliver a patch that optionally turns off copying 
/META-INF/context.xml to /conf/.../.xml, could it be included 
in the next version?
Something like , 
where "true" is default to keep new behavior


Thanks
Igor

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



Re: 6.0.20 - New behavior on conf/Catalina//.xml update. Why redeploy?

2009-09-30 Thread Igor Mukhin

Thanks, Mark.

1. I just tried to reproduce the issue on my pc. And I couldn't, which 
is a good thing. I will try it again later on the server, with which I 
had the issue yesterday.

2. OK
3. Can live with that


Mark Thomas wrote:

Igor Mukhin wrote:
  

1.
I have looked at the new documentation and the new code in
org.apache.catalina.startup.HostConfig.java. And my first question is:
what is reason behind redeploying the application after detecting an
update of /conf/.../.xml? (6.0.18 restarts the application in
this case)

Just think about it: You have an tomcat production server with 200
applications. All application were deployed statically and they (and
you) have no .war files. You can't restart the tomcat. But you need to
update the database resource parameter in /conf/.../.xml of an
application promtly. You edit the file, save it. In a minute a customer
calls you on the phone and tells the application is not accessible. You
look into appBase, but the app is not there. Tomcat has deleted it (in a
try to redeply, but there is not .war file to deploy) ?!?! Where are my
files?!?!?



That sounds like a regression and a nasty one at that. Touching the context.xml
file should trigger a reload not a redploy and then only if autoDeploy="true"
for the host. I'm not in a position to test this right now. Are you sure the
context.xml file was only updated?

The only way an undeploy should be triggered is if the context.xml file is
deleted (and autoDeploy="true"). This has always been the case.

  

2.
If I deliver a patch that makes the behavoir after updating a
/conf/.../.xml configurable, could it be included in the next
version?
Something like  where "redeploy" is
default to keep new behavior



No need. ignore is achieved by setting autoDeploy="false". undeploy is triggered
if the context file is deleted and reload is triggered if the context file is
updated. There is no way to trigger a (re)dploy. This wouldn't make much sense
as a deployment needs a source and there is no obvious way of specifying one.

  

3.
If I deliver a patch that optionally turns off copying
/META-INF/context.xml to /conf/.../.xml, could it be included
in the next version?
Something like ,
where "true" is default to keep new behavior



Unlikely. The extraction of the context.xml file was a 6.0.x design decision. If
the patch came with a convincing argument for the additional complexity then it
would certainly get into 7.0.x and might get into 6.0.x and 5.5.x. That said,
the tricky bit would be the convincing argument. I'd suggest trying to make your
case before you spend time on the patch.

Mark


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


  


Re: 6.0.20 - New behavior on conf/Catalina//.xml update. Why redeploy?

2009-09-30 Thread Igor Mukhin
I just tried to reproduce the issue on the server from yesterday. The 
application is reloaded just fine. No deletions/undeployments.


I love Tomcat again.
Thanks, Mark.

P.S. But just to be consistent, why not to create an empty context xml 
file under /conf/Catalina for applications that have no 
/META-INF/context.xml file?


Regards
Igor


Mark Thomas wrote:

Igor Mukhin wrote:
  

Thanks, Mark.

1. I just tried to reproduce the issue on my pc. And I couldn't, which
is a good thing. I will try it again later on the server, with which I
had the issue yesterday.


I can't reproduce with my mac either which makes me think the context.xml file
was missing (renamed, deleted, moved) at the moment the autoDeploy thread looked
for it and that triggered an undeploy and associated deletion of the directory.

  

2. OK
3. Can live with that



Great.

For the record the only change in this area that should have happened between
6.0.18 and 6.0.20 was that in 6.0.18 context.xml files were copied from WAR
files only whereas in 6.0.20 they are copied from directories and WAR files.

Mark


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


  


Re: 6.0.20 - New behavior on conf/Catalina//.xml update. Why redeploy?

2009-09-30 Thread Igor Mukhin
I just tried to reproduce the issue on the server from yesterday. The 
application is reloaded just fine. No deletions/undeployments.


I love Tomcat again.
Thanks, Mark.

P.S. But just to be consistent, why not to create an empty context xml 
file under /conf/Catalina for applications that have no 
/META-INF/context.xml file?


Regards
Igor


Mark Thomas wrote:

Igor Mukhin wrote:
  

Thanks, Mark.

1. I just tried to reproduce the issue on my pc. And I couldn't, which
is a good thing. I will try it again later on the server, with which I
had the issue yesterday.


I can't reproduce with my mac either which makes me think the context.xml file
was missing (renamed, deleted, moved) at the moment the autoDeploy thread looked
for it and that triggered an undeploy and associated deletion of the directory.

  

2. OK
3. Can live with that



Great.

For the record the only change in this area that should have happened between
6.0.18 and 6.0.20 was that in 6.0.18 context.xml files were copied from WAR
files only whereas in 6.0.20 they are copied from directories and WAR files.

Mark


-
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



Finding out the absolute path to application (appBase)

2009-10-02 Thread Igor Mukhin

Hello everybody,

if I have an instance of org.apache.catalina.core.StandardContext 
, what is the best way two find out 
the absolute path to directory where the application is expanded (appBase)?


For instance stdctx.getAppBase() would just return "manager", where 
stdctx is "/manager" context.

Is there a method that calculates the absolute path?

Thanks for your answers
Igor

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



Re: Tomcat behind Apache and security-constraint

2011-07-21 Thread Igor Cicimov
Configure a mod_jk log file and see whats going on there

On Jul 22, 2011 10:37 AM, "Adrián Córdoba"  wrote:

Well...
1- I delete the "Directory" section from httpd.conf file.
2- I add "JkMount  /Andromeda worker1" to the virtual host.
3- I add dynamic content to index.jsp page
So I proved the content is served by Tomcat. But I have the same problem: I
cannot view the content of protected section of my web application through
Apache web server.

If I access directly to Tomcat (skipping httpd), I can see the protected
content.

Access log in httpd is:
--
::1 - - [21/Jul/2011:21:27:18 -0300] "GET /Andromeda/ HTTP/1.1" 200 669 "-"
"Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko)
Chrome/12.0.742.124 Safari/534.30"
::1 - - [21/Jul/2011:21:27:21 -0300] "GET /Andromeda/ HTTP/1.1" 200 669 "-"
"Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko)
Chrome/12.0.742.124 Safari/534.30"
::1 - - [21/Jul/2011:21:27:21 -0300] "GET /Andromeda/StyleSheet.css
HTTP/1.1" 304 - "http://localhost/Andromeda/"; "Mozilla/5.0 (X11; Linux i686)
AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.124 Safari/534.30"
::1 - - [21/Jul/2011:21:27:22 -0300] "GET /Andromeda/ HTTP/1.1" 200 669 "-"
"Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko)
Chrome/12.0.742.124 Safari/534.30"
::1 - - [21/Jul/2011:21:27:22 -0300] "GET /Andromeda/StyleSheet.css
HTTP/1.1" 304 - "http://localhost/Andromeda/"; "Mozilla/5.0 (X11; Linux i686)
AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.124 Safari/534.30"
::1 - - [21/Jul/2011:21:27:24 -0300] "GET /Andromeda/internal/internal.jsp
HTTP/1.1" 200 782 "http://localhost/Andromeda/"; "Mozilla/5.0 (X11; Linux
i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.124
Safari/534.30"
::1 - - [21/Jul/2011:21:27:41 -0300] "GET
/Andromeda/internal/j_security_check HTTP/1.1" 200 433 "-" "Mozilla/5.0
(X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.124
Safari/534.30"
::1 - - [21/Jul/2011:21:29:46 -0300] "GET /Andromeda/internal/internal.jsp
HTTP/1.1" 200 782 "http://localhost/Andromeda/"; "Mozilla/5.0 (X11; Linux
i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.124
Safari/534.30"
::1 - - [21/Jul/2011:21:29:50 -0300] "GET /Andromeda/ HTTP/1.1" 200 669 "-"
"Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko)
Chrome/12.0.742.124 Safari/534.30"
::1 - - [21/Jul/2011:21:29:50 -0300] "GET /Andromeda/StyleSheet.css
HTTP/1.1" 304 - "http://localhost/Andromeda/"; "Mozilla/5.0 (X11; Linux i686)
AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.124 Safari/534.30"
::1 - - [21/Jul/2011:21:29:53 -0300] "GET /Andromeda/internal/internal.jsp
HTTP/1.1" 200 782 "http://localhost/Andromeda/"; "Mozilla/5.0 (X11; Linux
i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.124
Safari/534.30"
--

Thank you, very much. -- [Adrián Córdoba] 2011/7/21 André Warnier <
a...@ice-sa.com>

> Christopher Schultz wrote: > >> -BEGIN PGP SIGNED MESSAGE- >>
Hash: SHA1 >> >> Adrián, >> ...
>> GET http://localhost/Andromeda/**META-INF/context.xml<
http://localhost/Andromeda/META-INF/context.xml>

>> >> (or maybe GET
http://localhost/Andromeda/**WebContent/META-INF/context.**
>> xml 

>> - - it's really hard to understand what your appbase really is). >> >> If
you have a container-ma...
> apache.html

> The section "Using SetHandler and Environment Variables" > > Now, if you
really want to know what ...
> To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.org<
users-unsubscr...@tomcat.apache.org>

> For additional commands, e-mail: users-h...@tomcat.apache.org > >


Re: Tomcat not releasing threads on Solaris 10

2011-08-03 Thread Igor Cicimov
Maybe try to use "cachesize" ajp13 property in worker.properties together
with "cache_timeout" to limit the apache thread count towards tomcat.
" If cachesize is not set, the connection cache support is disabled."
So sounds like cache_timeout doesn't have any effect if cachesize isn't set.

Igor

On Thu, Aug 4, 2011 at 11:58 AM, Dante Bell wrote:

> I put the cleansed information on my blog (which got totally messed up
> with the latest WP upgrade, but that's a different issue!!)
>
> Click on this url for config files and for the thread dump:
> http://wp.me/plPvN-ai
>
> I've check bugzilla and this issue seems to be different to the other
> bugs when there was a thread issue.
>
> Thanks!
>
> On 08/03/2011 10:44 AM, Caldarale, Charles R wrote:
> >> From: Dante Bell [mailto:dantepasqu...@cocoanet.us]
> >> Subject: Re: Tomcat not releasing threads on Solaris 10
> >> Seems that all threads are waiting:
> >> java.lang.Thread.State: WAITING (on object monitor)
> > It's the rest of the trace for each thread that would be interesting.
> >
> >> Size of compressed stack dump is 20k. Is that OK to attach
> >> so someone can help look at it?
> > No, the list server strips attachments.  Post it on some publicly
> accessible web site and send us the link.
> >
> > Also post your server.xml, preferably with comments removed and passwords
> obfuscated.
> >
> > (And find out what version of Tomcat and JVM you're using.)
> >
> >  - 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 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: 503 error - service not available

2011-08-03 Thread Igor Cicimov
Obviously apache can't connect to tomcat. Any firewall/load balancer changes
maybe done last night between apache and tomcat? Can you access tomcat apps
bypassing apache? Can you telnet to tomcat server on the tomcat port from
the apache? Any errors in the tomcat log? Have you tried restarting tomcat?


Igor

On Thu, Aug 4, 2011 at 12:28 PM, Dave Filchak  wrote:

>
> Not sure what happened here. The app was working just fine until today. I
> am getting a 503 Service temporarily unavailable error when trying to
> connect to a tomcat site using Apache as the front end and mod_jk
> connectors. I have verified that tomcat is running on the correct ports
> using:netstat -atp | grep java. I see no errors in the message logs ( we are
> on CentOS by the way ) but I do see:
>
> |[Wed Aug 03 18:49:24 2011] [15605:1199618400] [info]
> ajp_service::jk_ajp_common.c (2540): (exodus) sending request to tomcat
> failed (recoverable), because of error during request sending (attempt=2)
> [Wed Aug 03 18:49:24 2011] [15605:1199618400] [error]
> ajp_service::jk_ajp_common.c (2559): (exodus) connecting to tomcat failed.
> [Wed Aug 03 18:49:24 2011] exodus www.exodusdecoded.com 0.198512
> [Wed Aug 03 18:49:24 2011] [15605:1199618400] [info] jk_handler::mod_jk.c
> (2618): Service error=-3 for worker=exodus
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [info]
> jk_open_socket::jk_connect.c (622): connect to 174.122.30.18:8010 failed
> (errno=111)
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [info]
> ajp_connect_to_endpoint::jk_**ajp_common.c (959): Failed opening socket to
> (174.122.30.18:8010) (errno=111)
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [error]
> ajp_send_request::jk_ajp_**common.c (1585): (exodus) connecting to backend
> failed. Tomcat is probably not started or is listening on the wrong port
> (errno=111)
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [info]
> ajp_service::jk_ajp_common.c (2540): (exodus) sending request to tomcat
> failed (recoverable), because of error during request sending (attempt=1)
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [info]
> jk_open_socket::jk_connect.c (622): connect to 174.122.30.18:8010 failed
> (errno=111)
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [info]
> ajp_connect_to_endpoint::jk_**ajp_common.c (959): Failed opening socket to
> (174.122.30.18:8010) (errno=111)
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [error]
> ajp_send_request::jk_ajp_**common.c (1585): (exodus) connecting to backend
> failed. Tomcat is probably not started or is listening on the wrong port
> (errno=111)
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [info]
> ajp_service::jk_ajp_common.c (2540): (exodus) sending request to tomcat
> failed (recoverable), because of error during request sending (attempt=2)
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [error]
> ajp_service::jk_ajp_common.c (2559): (exodus) connecting to tomcat failed.
> [Wed Aug 03 18:50:46 2011] exodus www.exodusdecoded.com 0.197989
> [Wed Aug 03 18:50:46 2011] [15851:1189128544] [info] jk_handler::mod_jk.c
> (2618): Service error=-3 for worker=exodus
>
> |
>
> in the mod_jk.log file. Apache is running. I am stumped but really need to
> get this back running if anyone out there is more experienced at tomcat and
> apache connectors than I am, which wouldn't take much ;-)
>
> Cheers,
>
> Dave
>
>


Re: 503 error - service not available

2011-08-04 Thread Igor Cicimov
Anything in the system log? Running out of file descriptors maybe?

Igor

On Aug 5, 2011 7:07 AM, "Pid"  wrote:

On 04/08/2011 21:36, Brendon wrote: > From what I gether from this thread is
sounds like the Apache ...
If HTTPD wasn't active there'd be nothing in the mod_jk log and no 503
response...

p - To
unsubscribe, e-mail: u...


Re: Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-08-12 Thread Igor Cicimov
I can't see the connection between the Connector you showed and port 8082.
What is listening on port 8082? Also what is your "tomcatThreadPool"
executor configuration?


On Fri, Aug 12, 2011 at 7:56 PM, rakesh k  wrote:

> Hi All
>
> I am using Apache tomcat 6.0.18 version
>
> I am not sure, why the tomcat is giving us this problem. While doing Load
> testing we are sending 5000 requests at a time, where we are getting 4-5
> Bad
> gate way error.
>
> Please find the error details below
>
> [Wed Aug 10 01:00:50 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 01:00:50 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.25.205 ()
> [Wed Aug 10 01:01:01 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 01:01:01 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.25.206 ()
> [Wed Aug 10 01:28:04 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 01:28:04 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.25.205 ()
> [Wed Aug 10 06:10:49 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 06:10:49 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.25.206 ()
> [Wed Aug 10 19:01:18 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 19:01:18 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.5.38 ()
>
>
> I am also attaching the tomcat configuration like server.xml with this
> question,
>
> can you please help how to get out this issue, if you require anything from
> me i can proivude the etire details.
>
> Please find the server.xml tomcat connector attribute portion.
>
>
>   port="8080" protocol="HTTP/1.1"
>   connectionTimeout="2"
>   redirectPort="8443" />
>
> can you please help me ragarding this issue.
>
>
> Regards
> Rakesh
>


Re: Tomcat Performance Turning.

2011-09-02 Thread Igor Cicimov
Paste the workers.properties file and the mod_jk settings here. Are you
using prefork or mpm in Apache? Have you tuned the apache settings to match
the tomcat number of threads?

Igor

On Sat, Sep 3, 2011 at 7:52 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Leon,
>
> On 9/2/2011 4:19 PM, Leon Rosenberg wrote:
> > from my experience there is no need for apache in your
> > setup anyway .
>
> Uh, load-balancing?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5hUDgACgkQ9CaO5/Lv0PBfhQCdFwEDvm37L9QTe6FBns88RKLg
> 7ukAnikbIxI+y/oaskk/Zv/Y4aKPpYD9
> =Dc+M
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Seeking tips on multi-host, multi-context deployments

2011-09-28 Thread Igor Cicimov
If i was you i wouldnt even start without 8GB of RAM on each server!
 On Sep 29, 2011 9:26 AM, "Sam Hokin"  wrote:
> Hi, folks. I've got what I consider to be a fairly significant production
implementation of Tomcat with, currently, 89
> contexts in 30 hosts on two concurrent servers. Everything works fine ...
except when it doesn't. As the number of
> contexts and hosts have increased, there have been more and more JVM
and/or Tomcat crashes, typically a couple per week
> lately, on one or both servers. The error messages vary from nothing at
all in catalina.out, to exceptions regarding
> database connections, to exceptions about threads. Basically, I've been
trying to find some good advice on
> configuration in my situation and haven't been able to find much.
>
> In a bit more detail, the deployment is as follows:
>
> (2) Dell 1950 8-CPU servers running Fedora 14 Linux 2.6.35, one with 2 GB
RAM and one with 4 GB RAM
> (2) Tomcat 7.0.16 instances, one on each server, running clustered
contexts in "distributable" mode, under Sun JDK 1.6.0
> One server runs Apache HTTPD, using mod_proxy_ajp to connect to the two
Tomcat instances and manage balancing
> The other server runs PostgreSQL, the database used by the apps, which
connect to it via JNDI/JDBC connection pooling
>
> There are a few contexts that run on only one or the other server (namely,
Softslate and Searchblox, which are not
> serialized to support clustering). Most contexts, which run my app, run in
parallel on both servers. I've implemented
> clustering to maintain site availability when a Tomcat instance goes down.
>
> I could post up all the various JVM and Tomcat parameters, but I'm really
looking for any definitive list of tips for
> things to try to improve stability. If anyone has written or seen a
"how-to" document on multi-host, multi-context
> deployments like this, please share! Thanks!!
>
> P.S. One option I've considered is to run KVM and run each host in its own
virtual OS. To me that's a ridiculous amount
> of OS overhead to deal with occasional Tomcat outages, but it probably
would be one solution, much more difficult to
> maintain than a single Tomcat instance per server running all the hosts
and contexts. If you've had experience running
> multiple Tomcat instances in separate virtual machines, I'd be curious to
hear how it went.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: two questions about the session timeout in tomcat

2011-10-10 Thread Igor Cicimov
Is there anything in the log files? Do you have enough threads in the thread
pool? I would also ask the DBA's to give me the list of the longest running
queries.
 On Oct 10, 2011 3:02 PM, "Bill Wang"  wrote:

> Hi Chris, Pid & Geroge,
>
> Thanks to everyone who replied my mail. I try to answer your questions in
> one mail.
>
> 1. I access the admin interface by manager app. I'd like to have exist
> command to run and get the report easily, if there is no the command, I
> will
> think to use wget | crul.
>
> 2. The application with sessions under 60 normally has no issue. But when
> the session go up to 80 ~ 100, I start to get calls from the customer. It
> happens many times at random time. Sometime I have to restart it, without
> any changes, after restart, customer can continuous use it. This
> performance
> issue is very annoying.
>
> 3. From Chris explanation, looks to change the timeout to 30 minutes will
> be
> good idea, since I don't care of the end users to login the system
> more frequently,  I need more stable system.  The server has other heavy
> applications running, CPU load is always up to 10 ~ 20,  available physical
> memory is not too much (<10GB).
>
> 4.  We are doing the troubleshooting on this application recently and don't
> find too much can be done. Check with network and DBA team, they all report
> me there is no issue. Contacted with Developers who maintain the tomcat app
> codes, they said the code running in their testing environment is fine. I
> am
> planned to do some load testing,  but it is just in plan.
>
> 5. @ Pid:
>
> Can you explain me more detail on how to do with your suggestion, I am not
> developer, don't write codes, my role in this project is to setup the
> webserver, tomcat service and make it running and stable.
>
>
> ***
> The session count per application can be read via a JMX connection and
> a request to the appropriate MBean.
>
> ***
> 6. @ Geroge
>
> Sorry, I don't understand your question.  We DO have Oracle Database in the
> backend.
>
> ***
> Are you storing objects on the session, in particular JDBC connections
> or result sets?
>
> ***
>
> Regards
> Bill
> On Sat, Oct 8, 2011 at 1:23 AM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > Bill,
> >
> > On 10/6/2011 7:20 PM, Bill Wang wrote:
> > > Recently one of Tomcat application has performance issue, which get
> > > slow respond with high sessions.
> >
> > Can you give us some numbers? At what point do things slow down, and
> > by how much do they slow down?
> >
> > > One team member recommend me to adjust the  session timeout from 60
> > > minutes to 30 minutes.  I will do that, but before change it, I'd
> > > like to understand how the performance related with the expire
> > > session timeout.
> > >
> > > 60
> >
> > I'm not sure performance will change at all when changing the session
> > timeout. Tomcat runs session-expiration tasks periodically, and the
> > performance of that has more to do with the number of total sessions
> > than the timeout itself.
> >
> > If you have lots of sessions that must timeout instead of being
> > explicitly invalidated (i.e. people close their browsers instead of
> > logging-out), then you will have a lot of wasted memory that may
> > prevent the garbage collector from working efficiently. It's best to
> > destroy sessions as soon as they are not needed, so short session
> > timeouts can help with that. On the other hand, you want to give users
> > a reasonable amount of time to get a cup of coffee, etc. without
> > forcing them to re-login every time.
> >
> > You'll have to determine what is an appropriate amount of time for
> > your users.
> >
> > There is another option: selectively extend the session timeout for
> > certain sessions, or for certain operations. If a user enters a flow
> > that is expected to take a long time or the consequences of having the
> > session time out are frustrating (i.e. you have to re-enter tons of
> > data), you can change the session timeout for that one session to be
> > longer than the default. When the flow is over, you can re-set it back
> > to the default. We do that for a number of tasks in our webapp, for
> > instance.
> >
> > > Second, currently I monitor the session count by login the admin
> > > interface,
> >
> > Do you mean using the "manager" app?
> >
> > > the manual way is not efficiency, can I run some commands to get
> > > the sessions number? With that I can set a cronjob and generate the
> > > session report easily.
> >
> > If you have the manager app deployed, you can use the text or XML
> >

Re: two questions about the session timeout in tomcat

2011-10-10 Thread Igor Cicimov
Ah yes, I would also take a thread dump when the server is stuck just in
case the developers are wrong ;)
On Oct 10, 2011 7:18 PM, "Igor Cicimov"  wrote:


Re: cannot read complete HTTP request body. It reads only 8192 characters

2011-10-31 Thread Igor Cicimov
You never said what is the difference between your environment and the
customer one or I missed that info. Same OS? Same Java version?

On Tue, Nov 1, 2011 at 12:42 PM, Anantaneni Harish <
anantaneni.har...@vertexsoft.com> wrote:

>
> Any thoughts about this?
>
> Thanks and Regards,
> Harish
> -Original Message-
> From: Anantaneni Harish
> Sent: Monday, October 31, 2011 11:23 AM
> To: Tomcat Users List
> Subject: RE: cannot read complete HTTP request body. It reads only 8192
> characters
>
> String keyValuePair = null;
> String[] arrKeyValue = null;
> BufferedReader in = request.getReader();
> while ((keyValuePair = in.readLine()) != null) {
> arrKeyValue = keyValuePair.split("=");
>
> Above code reads incomplete data(read only 8192 bytes) at my customer's
> environment, but reads complete data in my environment.
>
> String keyValuePair = null;
> String[] arrKeyValue = null;
> BufferedReader in = new BufferedReader(new
> InputStreamReader(request.getInputStream()));
> while ((keyValuePair = in.readLine()) != null) {
> arrKeyValue = keyValuePair.split("=");
>
> Above code reads complete data in both the environments. *no changes done
> to customer's environment.
>
> I hope you can help me now by finding the reason for data lost at my
> customer's environment when using request.getReader().
>
> Thanks and Regards,
> Harish
>
> -Original Message-
> From: André Warnier [mailto:a...@ice-sa.com]
> Sent: Friday, October 28, 2011 9:08 PM
> To: Tomcat Users List
> Subject: Re: cannot read complete HTTP request body. It reads only 8192
> characters
>
> Konstantin Kolinko wrote:
> > 2011/10/27 Christopher Schultz :
> >> On 10/27/2011 4:58 AM, Anantaneni Harish wrote:
> >>> Thanks for the directions the Rainer. Actually the issue is just
> >>> solved.
> >>>
> >>> We have changed from BufferedReader in = request.getReader();
> >>>
> >>> to
> >>>
> >>> BufferedReader in = new BufferedReader(new
> >>> InputStreamReader(request.getInputStream()));
> >>>
> >>> Now whole body has been read at my client's environment as well.
> >>>
> >>> But would like to know, what causes the issue. Do you have any
> >>> idea, why same method can read whole data in my environment and
> >>> does not read whole data at my customer's environment?
> >> You'll have to provide more information, such as the code you are
> >> using.
> >>
> >> I'm fairly sure Tomcat is not the source of the problem.
> >>
> >
> > +1.
> >
> > I think you need to pay more attention on the documentation of the
> > java.io.Reader#read() method, or maybe look for a tutorial.
> >
> > See also documentation for java.io.InputStream#available().
> >
> > In short:  the read() method returns a portion of data that is
> > currently available. If you need more data you must call read()
> > repeatedly in a loop until it returns -1.
> >
>
> .. and the difference between two systems, may be that on one system, the
> network is
> faster (or the system slower, or the buffer bigger) and so by the time you
> do the read,
> there are more bytes available in the buffer.
>
> > If you had provided some of your source code that performs reading, we
> > would be able to point at the exact error in your code.
> >
>
> -
> 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: cannot read complete HTTP request body. It reads only 8192 characters

2011-10-31 Thread Igor Cicimov
And same kernel network settings?
 On Nov 1, 2011 12:50 PM, "Anantaneni Harish" <
anantaneni.har...@vertexsoft.com> wrote:

> Both environments have the following softwares.
>
> OS  NameRed Hat Enterprise Linux
>Version release 5.3 (Tikanga)
> JavaNameJava(TM) SE Runtime Environment (build 1.6.0_13-b03)
>Version 1.6.0_13
> Tomcat  Nameapache-tomcat
>Version 5.5.28
>
> Thanks and Regards,
> Harish
> -Original Message-
> From: Igor Cicimov [mailto:icici...@gmail.com]
> Sent: Tuesday, November 01, 2011 10:47 AM
> To: Tomcat Users List
> Subject: Re: cannot read complete HTTP request body. It reads only 8192
> characters
>
> You never said what is the difference between your environment and the
> customer one or I missed that info. Same OS? Same Java version?
>
> On Tue, Nov 1, 2011 at 12:42 PM, Anantaneni Harish <
> anantaneni.har...@vertexsoft.com> wrote:
>
> >
> > Any thoughts about this?
> >
> > Thanks and Regards,
> > Harish
> > -Original Message-
> > From: Anantaneni Harish
> > Sent: Monday, October 31, 2011 11:23 AM
> > To: Tomcat Users List
> > Subject: RE: cannot read complete HTTP request body. It reads only 8192
> > characters
> >
> > String keyValuePair = null;
> > String[] arrKeyValue = null;
> > BufferedReader in = request.getReader();
> > while ((keyValuePair = in.readLine()) != null) {
> > arrKeyValue = keyValuePair.split("=");
> >
> > Above code reads incomplete data(read only 8192 bytes) at my customer's
> > environment, but reads complete data in my environment.
> >
> > String keyValuePair = null;
> > String[] arrKeyValue = null;
> > BufferedReader in = new BufferedReader(new
> > InputStreamReader(request.getInputStream()));
> > while ((keyValuePair = in.readLine()) != null) {
> > arrKeyValue = keyValuePair.split("=");
> >
> > Above code reads complete data in both the environments. *no changes done
> > to customer's environment.
> >
> > I hope you can help me now by finding the reason for data lost at my
> > customer's environment when using request.getReader().
> >
> > Thanks and Regards,
> > Harish
> >
> > -Original Message-
> > From: André Warnier [mailto:a...@ice-sa.com]
> > Sent: Friday, October 28, 2011 9:08 PM
> > To: Tomcat Users List
> > Subject: Re: cannot read complete HTTP request body. It reads only 8192
> > characters
> >
> > Konstantin Kolinko wrote:
> > > 2011/10/27 Christopher Schultz :
> > >> On 10/27/2011 4:58 AM, Anantaneni Harish wrote:
> > >>> Thanks for the directions the Rainer. Actually the issue is just
> > >>> solved.
> > >>>
> > >>> We have changed from BufferedReader in = request.getReader();
> > >>>
> > >>> to
> > >>>
> > >>> BufferedReader in = new BufferedReader(new
> > >>> InputStreamReader(request.getInputStream()));
> > >>>
> > >>> Now whole body has been read at my client's environment as well.
> > >>>
> > >>> But would like to know, what causes the issue. Do you have any
> > >>> idea, why same method can read whole data in my environment and
> > >>> does not read whole data at my customer's environment?
> > >> You'll have to provide more information, such as the code you are
> > >> using.
> > >>
> > >> I'm fairly sure Tomcat is not the source of the problem.
> > >>
> > >
> > > +1.
> > >
> > > I think you need to pay more attention on the documentation of the
> > > java.io.Reader#read() method, or maybe look for a tutorial.
> > >
> > > See also documentation for java.io.InputStream#available().
> > >
> > > In short:  the read() method returns a portion of data that is
> > > currently available. If you need more data you must call read()
> > > repeatedly in a loop until it returns -1.
> > >
> >
> > .. and the difference between two systems, may be that on one system, the
> > network is
> > faster (or the system slower, or the buffer bigger) and so by the time
> you
> > do the read,
> > there are more bytes available in the buffer.
> >
> > > If you had provided some of your source code that performs reading, we
> > > would be able to point at the exact error in your code.
> > >
> >
> > -
> > 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
> >
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: cannot read complete HTTP request body. It reads only 8192 characters

2011-10-31 Thread Igor Cicimov
Have you done the test in your environment simulating the customer one as
close as possible? Maybe taking in count their network topology (routers,
switches, firewalls), hundreds (possible thousands) of requests per second,
network latency, tcp timeout kernel settings, buffer queue etc etc, the
code will fail on your server too.

For start lets say you might check their /etc/sysctl.conf file and see if
their any tcp time settings differences from your server.


On Tue, Nov 1, 2011 at 12:58 PM, Anantaneni Harish <
anantaneni.har...@vertexsoft.com> wrote:

> Dont know :(, must be different.
>
> Thanks and Regards,
> Harish
>
> -Original Message-
> From: Igor Cicimov [mailto:icici...@gmail.com]
> Sent: Tuesday, November 01, 2011 10:57 AM
> To: Tomcat Users List
> Subject: RE: cannot read complete HTTP request body. It reads only 8192
> characters
>
> And same kernel network settings?
>  On Nov 1, 2011 12:50 PM, "Anantaneni Harish" <
> anantaneni.har...@vertexsoft.com> wrote:
>
> > Both environments have the following softwares.
> >
> > OS  NameRed Hat Enterprise Linux
> >Version release 5.3 (Tikanga)
> > JavaNameJava(TM) SE Runtime Environment (build 1.6.0_13-b03)
> >Version 1.6.0_13
> > Tomcat  Nameapache-tomcat
> >Version 5.5.28
> >
> > Thanks and Regards,
> > Harish
> > -Original Message-
> > From: Igor Cicimov [mailto:icici...@gmail.com]
> > Sent: Tuesday, November 01, 2011 10:47 AM
> > To: Tomcat Users List
> > Subject: Re: cannot read complete HTTP request body. It reads only 8192
> > characters
> >
> > You never said what is the difference between your environment and the
> > customer one or I missed that info. Same OS? Same Java version?
> >
> > On Tue, Nov 1, 2011 at 12:42 PM, Anantaneni Harish <
> > anantaneni.har...@vertexsoft.com> wrote:
> >
> > >
> > > Any thoughts about this?
> > >
> > > Thanks and Regards,
> > > Harish
> > > -Original Message-
> > > From: Anantaneni Harish
> > > Sent: Monday, October 31, 2011 11:23 AM
> > > To: Tomcat Users List
> > > Subject: RE: cannot read complete HTTP request body. It reads only 8192
> > > characters
> > >
> > > String keyValuePair = null;
> > > String[] arrKeyValue = null;
> > > BufferedReader in = request.getReader();
> > > while ((keyValuePair = in.readLine()) != null) {
> > > arrKeyValue = keyValuePair.split("=");
> > >
> > > Above code reads incomplete data(read only 8192 bytes) at my customer's
> > > environment, but reads complete data in my environment.
> > >
> > > String keyValuePair = null;
> > > String[] arrKeyValue = null;
> > > BufferedReader in = new BufferedReader(new
> > > InputStreamReader(request.getInputStream()));
> > > while ((keyValuePair = in.readLine()) != null) {
> > > arrKeyValue = keyValuePair.split("=");
> > >
> > > Above code reads complete data in both the environments. *no changes
> done
> > > to customer's environment.
> > >
> > > I hope you can help me now by finding the reason for data lost at my
> > > customer's environment when using request.getReader().
> > >
> > > Thanks and Regards,
> > > Harish
> > >
> > > -Original Message-
> > > From: André Warnier [mailto:a...@ice-sa.com]
> > > Sent: Friday, October 28, 2011 9:08 PM
> > > To: Tomcat Users List
> > > Subject: Re: cannot read complete HTTP request body. It reads only 8192
> > > characters
> > >
> > > Konstantin Kolinko wrote:
> > > > 2011/10/27 Christopher Schultz :
> > > >> On 10/27/2011 4:58 AM, Anantaneni Harish wrote:
> > > >>> Thanks for the directions the Rainer. Actually the issue is just
> > > >>> solved.
> > > >>>
> > > >>> We have changed from BufferedReader in = request.getReader();
> > > >>>
> > > >>> to
> > > >>>
> > > >>> BufferedReader in = new BufferedReader(new
> > > >>> InputStreamReader(request.getInputStream()));
> > > >>>
> > > >>> Now whole body has been read at my client's environment as well.
> > > >>>
> > > >>> But would like to know, what causes the issue. Do you have any
> > > >>> idea, why same method can read whole data in my 

Re: JVM config for tomcat7.0.19

2011-11-10 Thread Igor Cicimov
>
> JAVA_OPTS=-Xms2048M -Xmx2048M -XX:Permsize=512m -XX:MaxPermsize=512m
>

You are allocating here 2.5GB of memory to tomcat ... how do you expect it
to start on a box with 2GB in total of which only 500MB are available?


On Fri, Nov 11, 2011 at 8:25 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Celtic,
>
> On 11/10/11 12:02 PM, celtic man wrote:
> > So i have updated the setenv.sh with   -Xms2048M -Xmx2048M
> > -XX:Permsize=512m -XX:MaxPermsize=512m  and  restarted tomcat..
>
> Where is setenv.sh located? Can you give us the full contents of that
> file?
>
> > but when i grep for tomcat process i don't see it ..
> >
> > ps -ef | grep tomcat root 10959 1 19 14:57 pts/4
> > 00:00:29 /appl/java/bin/java -Dnop
> > -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> > -Djava.endorsed.dirs=/appl/tomcat/endorsed -classpath
> > /appl/tomcat/bin/bootstrap.jar:/appl/tomcat/bin/tomcat-juli.jar
> > -Dcatalina.base=/appl/tomcat -Dcatalina.home=/appl/tomcat
> > -Djava.io.tmpdir=/appl/tomcat/temp
> > org.apache.catalina.startup.Bootstrap start
>
> How are you starting Tomcat? Give us the exact command you are running.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk68QVoACgkQ9CaO5/Lv0PAvHwCfditQGu0AsA5NxZD0eV1mjD1d
> hc8Anil55svBR7vxCJKxG1v4psEAA7Uw
> =zMFY
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: 403 error starting tomcat 7.0.22 application on windows 7

2011-11-13 Thread Igor Cicimov
catalina.policy?


On Mon, Nov 14, 2011 at 4:56 PM,  wrote:

>
>
> -Исходное сообщение- From: Tim Watts
> Sent: Monday, November 14, 2011 9:09 AM
> To: Tomcat Users List
> Subject: Re: 403 error starting tomcat 7.0.22 application on windows 7
>
>
> On Mon, 2011-11-14 at 08:17 +0400, bas...@obninsk.com wrote:
>
>> > Can you paste the application web.xml file (inline) into your reply?
>> >
>> > 
>> > > > xmlns:xsi="http://www.w3.org/**2001/XMLSchema-instance
>> "
>> > 
>> > xmlns="http://java.sun.com/**xml/ns/javaee
>> "
>> > xmlns:web="http://java.sun.**com/xml/ns/javaee/web-app_2_5.**
>> xsd "
>> > 
>> > xsi:schemaLocation="http://**java.sun.com/xml/ns/javaee
>> > http://java.sun.com/xml/ns/**javaee/web-app_2_5.xsd
>> "
>> > version="2.5">
>> >  WEB query
>> >  
>> >  
>> >404
>> >/includes/error404.**jsp
>> >  
>> >  
>> >500
>> >/includes/error500.**jsp
>> >  
>> >  
>> >
>> >reportcmnt
>> >reportcmnt
>> >/jsp/reportcmnt.jsp<**/jsp-file>
>> >  
>> >  
>> >reportcmnt
>> >/reportcmnt
>> >  
>> > 
>> >
>>
>
>  Do you have an access log configured, if so, what does it show?
>>
>> 0:0:0:0:0:0:0:1 - - [13/Nov/2011:09:50:32 +0300] "GET /query HTTP/1.1" 302
>> 125 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML,
>> like
>> Gecko) Chrome/15.0.874.120 Safari/535.2"
>> 0:0:0:0:0:0:0:1 - - [13/Nov/2011:09:50:32 +0300] "GET /query/ HTTP/1.1"
>> 403
>> 964 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML,
>> like
>> Gecko) Chrome/15.0.874.120 Safari/535.2"
>> 0:0:0:0:0:0:0:1 - - [13/Nov/2011:11:40:54 +0300] "GET /query HTTP/1.1" 302
>> 125
>> "http://localhost:8082/**manager/html;jsessionid=**
>> 4D76EA53493CA915B556DB02D1D993**2E?org.apache.catalina.**
>> filters.CSRF_NONCE=**95AB554C225507BE146FBA41E2BF3A**97
>> "
>> "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko)
>> Chrome/15.0.874.120 Safari/535.2"
>> 0:0:0:0:0:0:0:1 - - [13/Nov/2011:11:40:54 +0300] "GET /query/ HTTP/1.1"
>> 403
>> 964
>> "http://localhost:8082/**manager/html;jsessionid=**
>> 4D76EA53493CA915B556DB02D1D993**2E?org.apache.catalina.**
>> filters.CSRF_NONCE=**95AB554C225507BE146FBA41E2BF3A**97
>> "
>> "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko)
>> Chrome/15.0.874.120 Safari/535.2"
>> What user account is Tomcat running under?
>>
>
> A: local system account. It has full access to the application's folders
> and files.
>
>
>>
>>
> OK, you're getting a 403 on http://localhost:8082/query/ but your
> web.xml only shows a mapping for /reportcmnt and no welcome file
> declarations.  What happens if you use /query/reportcmnt instead?
>
> A: 403 error again.
>
>
> Is there perhaps an index.html that would have redirected
> to /query/reportcmnt?
>
> A: My index.html contains
>
> 
>  
>  
>   WEB query
>  
>  
>   location="jsp/app.jsp"**
>  
> 
>
>
> Q: What version of Tomcat were you using prior to the win7 migration?
>
> A: Tomcat 7.0.22.
> I've just installed Tomcat 7.0.22 on WinXP,
> then copied my app from Win7 to the WinXp webapps folder and run my app.
> It works fine.
>
>
>
> If you were using a pre-Tomcat7 version you may be butting up against
> 7's stricter servlet compliance.  You should explicitly declare a
> welcome file in web.xml.
>
> Why?
>
>
>
>
>> --**--**-
>> To unsubscribe, e-mail: 
>> users-unsubscribe@tomcat.**apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tomcat.**apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tomcat.**apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Single POST request being handled twice

2011-11-16 Thread Igor Cicimov
Bypass the apache and send the POST request to tomcat directly. Thant will
tell you where the problem is tomcat or apache.

On Thu, Nov 17, 2011 at 12:29 PM, Jeremy  wrote:

> OK, I know this seems crazy, but I've looked long and hard and cannot
> explain this as other than a Tomcat bug.  I'm more than willing to dig up
> extra information where I can, but this is a very rare problem seen in
> production and not reproducible at will.  Also, because this is in
> production, there is very little I can change, and even if I did change it,
> it would take a month or more to verify that it is really a fix.  So what
> I'm really looking for is a detailed understanding of the problem so we can
> detect it when it happens and clean up the after-effects.
>
> What we are seeing is one POST request being handled twice by our web app.
>  It looks as though somehow the request is duplicated by Tomcat.  Here's
> our setup:
>
> Apache 2.2.14 using APR 1.3.8 and mod_jk 1.2.28 running on Ubuntu 10.04.3
> as front end, load balancing.
> Tomcat 6.0.29 using built-in AJP/1.3 connector running on Ubuntu 9.04 with
> 64-bit Sun Java 1.5.0_19.  Tomcat is not using APR.
> Tomcat mod_jk connector has keepAliveTimeout=5000 and
> connectionTimeout=6 (60 seconds).
>
> Here is a simplified timeline of what we see in various logs.  I'm going to
> leave some fields out and change others to protect confidentiality and make
> it easier to follow, but I'll try to keep from changing anything important.
>  Timestamps are just minutes and seconds.
>
>
> 51:48 POST request received by Apache over SSL.  We see the request logged
> in Apache's access.log with this timestamp, but the log entry is actually
> written at 52:08 (or seems to be, since that is the time stamp of the next
> entry in the access.log, though the entries immediately before this one
> have timestamps of 52:02).
>
> 51:48 log4j application logs show processing of the request by the
> application in thread TP-Processor18.   Processing continues with updates
> to database and external systems until:
>
> 51:55 last application log entry from TP-Processor18 shows normal
> completion of processing, which should then return from handleRequest().
>  The database and three external systems the app communicates with all show
> normal processing.
>
> 51:55 log4j application log entries from TP-Processor6 show it beginning to
> handle the request.  Processing continues normally, just as it did in
> TP-Processor18 until:
>
> 52:08 last application log entry from TP-Processor6.  Again external
> systems show normal processing.
>
> 52:08 Tomcat access log shows entry for post request stating it was handled
> by TP-Processor6 in 7283ms
>
> 52:08 mod_jk.log: loadbalancer www.site.com 19.400742
>
> 53:06 Tomcat access log shows entry for post request stating it was handled
> by TP-Processor18 in 77440ms
>
>
> How is it possible that Tomcat has 2 threads handling the same request?
> How can we detect this as opposed to the user legitimately sending the same
> request twice?
>
> Thanks for your help!
> =Jeremy=
>


Re: APR SSL error: "Socket bind failed: [98] Address already in use"

2011-11-20 Thread Igor Cicimov
Isnt 8005 shutdown port for tomcat? I can see sshd bound to that port
already.
On Nov 20, 2011 6:33 PM, "Konstantin Kolinko" 
wrote:

> 2011/11/19 Eric Kemp :
> > Summary: I'm looking for ideas on how to resolve this "Address already
> > in use" error when configuring SSL in Tomcat APR.
> >
> > Environment:
> >  Running Apache Tomcat/6.0.24
>
> That one is old. Maybe you can upgrade to 6.0.33?
>
> >  on OS is Ubuntu 10.04.2 LTS
> >  with JVM 1.7.0_01-b08
>
> There were severe issues with 1.7.0, such as "Loop unroll optimization
> causes incorrect result". I do not know whether all of them are fixed
> in 7u1.
> http://tomcat.markmail.org/thread/oghpdg2whkrpnk7w
>
> Anyway, maybe you can try running with Java 6?
>
> > //
> > // I restart Tomcat, and see the following in the catalina.out file:
> > //
> > SEVERE: Error starting endpoint
> > java.lang.Exception: Socket bind failed: [98] Address already in use
> >at
> org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
> >at
> org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
> >at
> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
> >at
> org.apache.catalina.connector.Connector.start(Connector.java:1080)
> >at
> org.apache.catalina.core.StandardService.start(StandardService.java:531)
> >at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> >at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> >at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >at java.lang.reflect.Method.invoke(Method.java:601)
> >at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
> >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
>
> What INFO messages are before this one?
> Maybe you can post your entire server.xml (without comments and passwords)?
>
>
> Best regards,
> Konstantin Kolinko
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Is there a way to bounce tomcat with out effecting connected users?

2011-11-29 Thread Igor Cicimov
Sure, using tomcat cluster and session replication.

On Wed, Nov 30, 2011 at 2:37 PM, Srinivas Chejerla <
srinivascheje...@gmail.com> wrote:

> Hi,
>
>
> I am trying to find best way to handle tomcat bounce in production
> environments with out effecting connected users
> please give me some suggestions, Is there a way to bounce tomcat with out
> effecting connected users?
>
>
> --
> Thanks,
> Srinivas.
>


Re: Changing session timeout for a webapp via JMX or internal Tomcat API?

2011-11-29 Thread Igor Cicimov
>
>
>
On Wed, Nov 30, 2011 at 4:11 PM, Ellecer Valencia  wrote:

> Is there a way to change session timeouts in tomcat via JMX? I've only
> seen the operation called "expireSession", but not one that can change
> the session timeout period.
>
> The only way I've found so far to modify session timeouts is by
> modifying web.xml and restarting Tomcat.
>
> However, in our intended usage, we don't want to restart Tomcat and
> kick out users.
>
> We're looking at using parallel deployment in Tomcat 7, and so we'll
> have a situation with
>
> foo##001 -- old version
> foo##002 -- new version
>
> What we want to do is decrease timeouts in foo##001, so that users
> move to foo##002 sooner and allow us to get rid of the old version.
>
> I've had a look at the Manager MBean and there's operations to get the
> existing session IDs and to expire individual sessions, but not to
> change their timeouts (unless I've gone blind and there was something
> there staring me in the face!).
>
> Is there any way - either another MBean in Tomcat or by accessing
> Tomcat API - to change the session timeouts for a webapp? Someone told
> me that Weblogic has this feature, so maybe it's not impossible to do
> it in Tomcat (just speculating)
>
>
> Ellecer
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Can't you just restart the application you are changing the timeout for?
Why do you need to restart the whole server?


Re: Changing session timeout for a webapp via JMX or internal Tomcat API?

2011-11-29 Thread Igor Cicimov
By the way, as I remember from the time I worked with Weblogic, which is up
to version 10, you need to restart the application, I say the application
not the server, when ever you change the timeout in the web.xml for that
app.

In Weblogic there is another file weblogic.xml where you can set the
session timeout. The difference is that this timeout is applied to the
whole container (all the applications deployed) and is overridden by the
setting in the web.xml per application bases.

On Wed, Nov 30, 2011 at 4:30 PM, Igor Cicimov  wrote:

>
>>
> On Wed, Nov 30, 2011 at 4:11 PM, Ellecer Valencia wrote:
>
>> Is there a way to change session timeouts in tomcat via JMX? I've only
>> seen the operation called "expireSession", but not one that can change
>> the session timeout period.
>>
>> The only way I've found so far to modify session timeouts is by
>> modifying web.xml and restarting Tomcat.
>>
>> However, in our intended usage, we don't want to restart Tomcat and
>> kick out users.
>>
>> We're looking at using parallel deployment in Tomcat 7, and so we'll
>> have a situation with
>>
>> foo##001 -- old version
>> foo##002 -- new version
>>
>> What we want to do is decrease timeouts in foo##001, so that users
>> move to foo##002 sooner and allow us to get rid of the old version.
>>
>> I've had a look at the Manager MBean and there's operations to get the
>> existing session IDs and to expire individual sessions, but not to
>> change their timeouts (unless I've gone blind and there was something
>> there staring me in the face!).
>>
>> Is there any way - either another MBean in Tomcat or by accessing
>> Tomcat API - to change the session timeouts for a webapp? Someone told
>> me that Weblogic has this feature, so maybe it's not impossible to do
>> it in Tomcat (just speculating)
>>
>>
>> Ellecer
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
> Can't you just restart the application you are changing the timeout for?
> Why do you need to restart the whole server?
>
>


Re: LAMP + Tomcat Configuration

2011-12-11 Thread Igor Cicimov
You need to deploy the war file inside tomcat so you need to make tomcat
aware of its location. Also including the war file in the uri makes no
sense it can not work like that. Did you do any configuration on the tomcat
side? Ajp connector etc. I would suggest you check the tomcat docs to gain
basic idea how tomcat works.
 On Dec 12, 2011 5:50 AM, "Truckman"  wrote:

> Greetings,
>
>
>
> I apologize for the length/complexity of this but I've learned over the
> years providing more detail generally saves time of those who are kind
> enough to assist.
>
>
>
> I have a slew of "standard" webservers which run the usual LAMP model -
> CentOS6, Apache 2.2.15-5, MySQL 5.0.77-4, and PHP 5.3.2-6.  I host many
> virtual domains and each virtual server runs off a unique directory,
> roughly
> matching the assigned domain name, like so:
>
>
>
> http://forums.example.com translates to /var/www/html.forums
>
>
>
> No problems whatsoever, except now one of those virtual domains requires
> Tomcat6, and I'm trying to figure out how to integrate Tomcat6 for one
> virtual domain only.  This way, all the other domains I host can remain
> "as-is" in their working state.
>
>
>
> Using Yum, I installed Tomcat6 and the various auxiliary RPMs:
>
>
>
> apache-tomcat-apis-0.1-1.el6.noarch
>
> jakarta-commons-dbcp-tomcat5-1.2.1-13.8.el6.noarch
>
> jakarta-commons-pool-tomcat5-1.3-12.7.el6.x86_64
>
> tomcat6-6.0.24-24.el6_0.noarch
>
> tomcat6-admin-webapps-6.0.24-24.el6_0.noarch
>
> tomcat6-docs-webapp-6.0.24-24.el6_0.noarch
>
> tomcat6-el-2.1-api-6.0.24-24.el6_0.noarch
>
> tomcat6-javadoc-6.0.24-24.el6_0.noarch
>
> tomcat6-jsp-2.1-api-6.0.24-24.el6_0.noarch
>
> tomcat6-lib-6.0.24-24.el6_0.noarch
>
> tomcat6-log4j-6.0.24-24.el6_0.noarch
>
> tomcat6-servlet-2.5-api-6.0.24-24.el6_0.noarch
>
> tomcat6-webapps-6.0.24-24.el6_0.noarch
>
>
>
> I started Tomcat6, added it to chkconfig so it automatically starts, and as
> I expected Tomcat6 answers on port 8009 (ajp) and port 8080 (tomcat).
>
>
>
> The customer then passed me a forums.war file, stating it needs to be in
> the
> root directory of the virtual server, so I placed it in the
> /var/www/html.forums directory.
>
>
>
> Knowing that apache is answering port 80, and that needs to be forwarded
> "up" to port 8080, I made the following changes in the virtual server
> configuration, like so:
>
>
>
> 
>
>Servername  forums.example.com
>
>DocumentRoot/var/www/html.forums
>
>
>
>  Options FollowSymLinks
>
>  AllowOverride All
>
>  Order allow,deny
>
>  Allow from all
>
>  ProxyPass ajp://localhost:8009/
>
>
>
> 
>
>
>
> Now, when I hit http://forums.example.com, I get the expected Tomcat6
> welcome page, but http://forums.example.com/forums.war cannot be found.
>  I'm
> assuming that's because forums.war is located in the virtual directory in
> "regular apache" and not where "tomcat apache" is expecting it.
>
>
>
> I am really confused as what I should be doing next, or even if what I've
> done so far was "correct".
>
>
>
> The goal is to have "regular" apache answer port 80, and call upon "tomcat"
> on port 8080 (or 8009 ajp) as required by the web application stored in
> "regular" apache's virtual server directory for that domain.
>
>
>
>
>
>


Re: AJP 1.3 Connector

2011-12-17 Thread Igor Cicimov
Firewall?
 On Dec 17, 2011 11:34 AM, "Vickie Troy-McKoy"  wrote:

>
> Hi,
>
> I'm in need of a little help.  I'm trying to get my tomcat and apache web
> server instances communicating; they are running on two different physical
> servers.  When I attempt a test of the application url, it basically says
> that a connection cannot be established.  I am running the following:
>
> RHEL Release 5.6 (x86_64)
> Apache Tomcat 7.0.14
> Apache/2.0.64
> mod_jk/1.2.32
>
> On the 1st physical server, the apache webserver instance resides:
>
> httpd.conf contains the following:
>
> LoadModule jk_module modules/mod_jk.so
> #
> JkWorkersFile conf/workers.properties
> JkMount /* server2
>
> workers.properties contain the following:
>
> worker.list=server2
> worker.server2.port=8009
> worker.server2.host=server2.ourlab.com
> worker.server2.type=ajp13
> worker.server2.lbfactor=1
> worker.server2.socket_keepalive=1
>
>
>
> On the 2nd physical server, the apache-tomcat instance resides:
>
> server.xml contains the following:
>
> 
> redirectPort="8443" />
>
>  SSLEnabled="true"
> [and various other settings]
>
>
>
> I am missing something.  Can someone please provide help?  Thank you...
>
>
> ___
> Regards,
>
> ___
> JESUS--Don't leave earth without Him!
> There is an election going on all the time.
> The Lord votes for you and satan votes against you;
> and you must cast the deciding vote.
>
>


RE: AJP 1.3 Connector

2011-12-19 Thread Igor Cicimov
If you have virtual host in apache jkMount needs to be inside the virtual
host.
On Dec 20, 2011 7:27 AM, "Troy-McKoy, Vickie" 
wrote:

> Yes.  From the apache host, I pinged and telneted the tomcat host.
>
>  # ping tomcatappserver
> PING tomcatappserver (nn.n.nn.nnn) 56(84) bytes of data.
> 64 bytes from tomcatappserver (nn.n.nn.nnn): icmp_seq=1 ttl=64 time=0.140
> ms
>
>
> # telnet tomcatappserver 8009
> Trying nn.n.nn.nnn...
> Connected to tomcatappserver (nn.n.nn.nnn).
> Escape character is '^]'.
> Connection closed by foreign host.
>
> When I attempt to connect to the tomcatappserver via the apachewebserver,
> in firefox browser I get:  "Unable to connect".  "Firefox can't establish a
> connection to the serer at tomcatappserver:8009."
>
> I just noticed if I put in the browser, the tomcatappserver url with the
> default port, I get the Apache Tomcat/7.0.14 page.  But, if I put in the
> apachewebserver url with the default port, I get this message:
>
> Service Temporarily Unavailable
> The server is temporarily unable to service your request due to
> maintenance downtime or capacity problems. Please try again later.
>
> 
> Apache/2.0.64 (Unix) mod_jk/1.2.32 Server at x Port 80
>
>
> When I remove the JkMount and JkWorkersFile from httpd.conf, I get the
> default Apache web server page.
>
>
>
>
> -Original Message-
> From: Tim Watts [mailto:t...@cliftonfarm.org]
> Sent: Monday, December 19, 2011 2:20 PM
> To: Tomcat Users List
> Subject: RE: AJP 1.3 Connector
>
> On Mon, 2011-12-19 at 13:42 -0500, Troy-McKoy, Vickie wrote:
> > Thanks for your response.
> >
> > When I ping server2, I get valid responses coming back.  When I telnet
> > to server2 on port 8009, I am also able to connect.
> >
>
> Did you do the telnet test from a shell on the apache host?  Did you use
> the exact name *as configured* (i.e. server2.ourlab.com)?
>
> What's the exact error message you're getting and which component
> (browser, apache) is reporting it?
>
>
> >
> > -Original Message-
> > From: André Warnier [mailto:a...@ice-sa.com]
> > Sent: Saturday, December 17, 2011 7:14 AM
> > To: Tomcat Users List
> > Subject: Re: AJP 1.3 Connector
> >
> > Vickie Troy-McKoy wrote:
> > > Hi,
> > >
> > > I'm in need of a little help.  I'm trying to get my tomcat and
> > apache web server instances communicating; they are running on two
> > different physical servers.  When I attempt a test of the application
> > url, it basically says that a connection cannot be established.  I am
> > running the following:
> > >
> > > RHEL Release 5.6 (x86_64)
> > > Apache Tomcat 7.0.14
> > > Apache/2.0.64
> > > mod_jk/1.2.32
> > >
> > > On the 1st physical server, the apache webserver instance resides:
> > >
> > > httpd.conf contains the following:
> > >
> > > LoadModule jk_module modules/mod_jk.so # JkWorkersFile
> > > conf/workers.properties JkMount /* server2
> > >
> > > workers.properties contain the following:
> > >
> > > worker.list=server2
> > > worker.server2.port=8009
> > > worker.server2.host=server2.ourlab.com
> > > worker.server2.type=ajp13
> > > worker.server2.lbfactor=1
> > > worker.server2.socket_keepalive=1
> > >
> > >
> > >
> > > On the 2nd physical server, the apache-tomcat instance resides:
> > >
> > > server.xml contains the following:
> > >
> > > 
> > >  > > redirectPort="8443" />
> > >
> > >  > SSLEnabled="true"
> > >  [and various other settings]
> > >
> > >
> > >
> > > I am missing something.  Can someone please provide help?  Thank
> > you...
> > >
> > >
> >
> > Hi.
> > Your configuration looks fine.
> > The problem then should be with the network.
> > Try the following :
> >  From the Apache httpd server (command-line),
> >
> > 1) enter :
> > ping server2.ourlab.com
> >
> > If you get regular messages showing that the ping packets are being
> answered, it's fine.
> > If you get error messages, then you have a basic network problem
> accessing server2.ourlab.com from your Apache host.
> >
> > (faked) example of a "good" answer :
> > PING server2.ourlab.com (192.168.20.1) 56(84) bytes of data.
> > 64 bytes from server2.ourlab.com (192.168.20.1): icmp_seq=1 ttl=64
> > time=0.326 ms
> > 64 bytes from server2.ourlab.com (192.168.20.1): icmp_seq=2 ttl=64
> > time=0.158 ms
> > 64 bytes from server2.ourlab.com (192.168.20.1): icmp_seq=3 ttl=64
> > time=0.156 ms
> >
> > Example of a bad answer :
> > - unknown host
> > - network is not reachable
> > etc..
> >
> > 2) If the above is fine, then :
> > enter :
> > telnet server2.ourlab.com 8009
> >
> > It should at least connect (and may drop the connection right away),
> > but the point is : is it connecting ? If it is, you will get an answer
> > similar to this :
> > Trying 192.168.20.1...
> > Connected to colin-int.
> > Escape character is '^]'.
> >
> > xxx
> > Connection closed by foreign host.
> >
> >
> >
> > -
>

Re: Tomcat AJP Thread Spike and System Hang

2011-12-21 Thread Igor Cicimov
What module are you using on apache side mod_proxy or mod_jk? Also you
might post the Connector settings from tomcat. Sorry typing from my mobile
just think that info might be useful to some one who can help you more.
 On Dec 22, 2011 10:57 AM, "John Minchuk"  wrote:

> Quick overview of our setup. Http requests flow from our load balancers, to
> squid proxys, to Apaches, to our Tomcat servers.  We migrated to this setup
> from an Oracle App Server.
>
> Apache: 2.2.3
> Tomcat: 7.0.11.0
> JVM: 1.6.0_22-b04
> Linux: 2.6.18-194.17.1.el5
>
> Our production environment has max threads set at 200, the number of
> threads usually hovers around 150.  About twice a day, at seemingly
> unrelated times we get a sudden spike in the number of ajp threads open.
> Eventually this hits our max of 200.  At this point Tomcat still seems
> responsive, but the number of our httpd processes spikes until Apache locks
> ups.  At this point we have monitoring software that kills and restarts
> Apache.  We then manually restart Tomcat.
>
> Here is a graph of the AJP Threads running.  You can see a sudden jump to
> 200 threads.  The other dips are most likely reloads triggered by our
> configuration management software (puppet).
>
> http://sporkit.com/thread_spike/spike.jpg
>
> Also interesting to note, these threads (all 200) appear to be in the keep
> alive state.
>
> http://sporkit.com/thread_spike/threads.jpg
>
> Our access logs don't indicate a high number of visits, or any one
> particular page that might cause this issue (that I can see).
>
> At this point we are stumped.  Do we spend our time tracking down memory
> leaks?  Is there something we could do to at least mitigate the problem
> over the holidays?  Any input greatly appreciated.
>


RE: Tomcat multiple instances runs as service from same exe file

2012-01-05 Thread Khailovsky, Igor
Hello All,

How to execute multiple instances of Tomcat server as windows services from 
same physical location (CATALINA_HOME) without tomcat executable replication? 
In other words, how to point a Tomcat windows service to specific server.xml 
(not a default location)?

I know that this option is available for Tomcat that was executed from command 
line.

The question is about Tomcat v.6.0 that runs as Windows 2008 service.



Thanks!

This electronic message may contain proprietary and confidential information of 
Verint Systems Inc., its affiliates and/or subsidiaries.
The information is intended to be for the use of the individual(s) or
entity(ies) named above.  If you are not the intended recipient (or authorized 
to receive this e-mail for the intended recipient), you may not use, copy, 
disclose or distribute to anyone this message or any information contained in 
this message.  If you have received this electronic message in error, please 
notify us by replying to this e-mail.



RE: Tomcat multiple instances runs as service from same exe file

2012-01-05 Thread Khailovsky, Igor
Hi Jeff,

Our application should provide ability to manage the application instances 
dynamically (runs into separate Tomcat container). One of requirements is using 
same execution in case multiple instances - option to provide to customer an 
easy way for update/upgrade Tomcat core.

Thanks for your help. 

-Original Message-
From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com] 
Sent: Thursday, January 05, 2012 17:19
To: 'Tomcat Users List'
Subject: RE: Tomcat multiple instances runs as service from same exe file

Igor -
Since you are using Tomcat 6.x, why not just perform a second install.
The latest installer lets you install multiple instances with different names.
Each install only takes up 10MB and it is much easier doing it this way than 
the old way of duplicating folders and running the procrun setups manually.
I run several servers this way (5 to 6 instances per server), and it takes a 
whole lot less effort to maintain than the old way of doing things that I had 
to use back in the tomcat 5.5.x days.
Jeff

> -Original Message-
> From: Khailovsky, Igor [mailto:igor.khailov...@verint.com]
> Sent: Thursday, January 05, 2012 6:01 AM
> To: users@tomcat.apache.org
> Subject: RE: Tomcat multiple instances runs as service from same exe 
> file
> 
> Hello All,
> 
> How to execute multiple instances of Tomcat server as windows services 
> from same physical location (CATALINA_HOME) without tomcat executable 
> replication? In other words, how to point a Tomcat windows service to 
> specific server.xml (not a default location)?
> 
> I know that this option is available for Tomcat that was executed from 
> command line.
> 
> The question is about Tomcat v.6.0 that runs as Windows 2008 service.
> 
> 
> 
> Thanks!
> 
> This electronic message may contain proprietary and confidential 
> information of Verint Systems Inc., its affiliates and/or subsidiaries.
> The information is intended to be for the use of the individual(s) or
> entity(ies) named above.  If you are not the intended recipient (or 
> authorized to receive this e-mail for the intended recipient), you may 
> not use, copy, disclose or distribute to anyone this message or any 
> information contained in this message.  If you have received this 
> electronic message in error, please notify us by replying to this e- 
> mail.
> 

__

Confidentiality Notice:  This Transmission (including any attachments) may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly prohibited.  

If you have received this transmission in error, please immediately reply to 
the sender or telephone (512) 343-9100 and delete this transmission from your 
system.


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

This electronic message may contain proprietary and confidential information of 
Verint Systems Inc., its affiliates and/or subsidiaries.
The information is intended to be for the use of the individual(s) or
entity(ies) named above.  If you are not the intended recipient (or authorized 
to receive this e-mail for the intended recipient), you may not use, copy, 
disclose or distribute to anyone this message or any information contained in 
this message.  If you have received this electronic message in error, please 
notify us by replying to this e-mail.


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



RE: Tomcat multiple instances runs as service from same exe file

2012-01-06 Thread Khailovsky, Igor
P-
I investigated these documents before asked the question, but did not find 
relevant answer. If you really know answer for my question, please specify it.

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Friday, January 06, 2012 11:41
To: Tomcat Users List
Subject: Re: Tomcat multiple instances runs as service from same exe file

On 05/01/2012 17:19, Khailovsky, Igor wrote:
> Hi Jeff,
> 
> Our application should provide ability to manage the application instances 
> dynamically (runs into separate Tomcat container). One of requirements is 
> using same execution in case multiple instances - option to provide to 
> customer an easy way for update/upgrade Tomcat core.
> 
> Thanks for your help. 

I will assume you have read the RUNNING.txt file in your distribution.

These are the relevant documentation pages:

 http://tomcat.apache.org/tomcat-6.0-doc/setup.html#Windows

 http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html


p

> -Original Message-
> From: Jeffrey Janner [mailto:jeffrey.jan...@polydyne.com]
> Sent: Thursday, January 05, 2012 17:19
> To: 'Tomcat Users List'
> Subject: RE: Tomcat multiple instances runs as service from same exe 
> file
> 
> Igor -
> Since you are using Tomcat 6.x, why not just perform a second install.
> The latest installer lets you install multiple instances with different names.
> Each install only takes up 10MB and it is much easier doing it this way than 
> the old way of duplicating folders and running the procrun setups manually.
> I run several servers this way (5 to 6 instances per server), and it takes a 
> whole lot less effort to maintain than the old way of doing things that I had 
> to use back in the tomcat 5.5.x days.
> Jeff
> 
>> -Original Message-
>> From: Khailovsky, Igor [mailto:igor.khailov...@verint.com]
>> Sent: Thursday, January 05, 2012 6:01 AM
>> To: users@tomcat.apache.org
>> Subject: RE: Tomcat multiple instances runs as service from same exe 
>> file
>>
>> Hello All,
>>
>> How to execute multiple instances of Tomcat server as windows 
>> services from same physical location (CATALINA_HOME) without tomcat 
>> executable replication? In other words, how to point a Tomcat windows 
>> service to specific server.xml (not a default location)?
>>
>> I know that this option is available for Tomcat that was executed 
>> from command line.
>>
>> The question is about Tomcat v.6.0 that runs as Windows 2008 service.
>>
>>
>>
>> Thanks!
>>
>> This electronic message may contain proprietary and confidential 
>> information of Verint Systems Inc., its affiliates and/or subsidiaries.
>> The information is intended to be for the use of the individual(s) or
>> entity(ies) named above.  If you are not the intended recipient (or 
>> authorized to receive this e-mail for the intended recipient), you 
>> may not use, copy, disclose or distribute to anyone this message or 
>> any information contained in this message.  If you have received this 
>> electronic message in error, please notify us by replying to this e- 
>> mail.
>>
> 
> __
> 
> 
> Confidentiality Notice:  This Transmission (including any attachments) may 
> contain information that is privileged, confidential, and exempt from 
> disclosure under applicable law.  If the reader of this message is not the 
> intended recipient you are hereby notified that any dissemination, 
> distribution, or copying of this communication is strictly prohibited.  
> 
> If you have received this transmission in error, please immediately reply to 
> the sender or telephone (512) 343-9100 and delete this transmission from your 
> system.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> This electronic message may contain proprietary and confidential information 
> of Verint Systems Inc., its affiliates and/or subsidiaries.
> The information is intended to be for the use of the individual(s) or
> entity(ies) named above.  If you are not the intended recipient (or 
> authorized to receive this e-mail for the intended recipient), you may not 
> use, copy, disclose or distribute to anyone this message or any information 
> contained in this message.  If you have received this electronic message in 
> error, please notify us by replying to this e-mail.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.

Re: tomcat session problem

2012-01-11 Thread Igor Cicimov
And have you set jvmRoute parameter in the server.xml file on the tomcats
to match the route value you use in the balancer?

Maybe read the following section of the mod_proxy_balancer carefully to
make sure all the dependencies are meat:

http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#stickyness_implementation


Igor
On Thu, Jan 12, 2012 at 8:42 AM, Daniel Mikusa  wrote:

> On Wed, 2012-01-11 at 10:21 -0800, Weffen Cheung wrote:
> > Hello,
> >
> > First Thanks for your reply, Dan.
> >
> > 1. Yes,  I am using apache2+mod_proxy in front of the two tomcats, here
> are the configuration in httpd.conf:
> >
> >   ProxyPass /images/ !
> > ProxyPass /css/ !
> > ProxyPass /js/ !
> > ProxyPass /photo/ !
> > ProxyPass /icon/ !
> > ProxyPass /pg/ !
> > ProxyPass /job/ !
> > ProxyPass /maintenance/ !
> > ProxyRequests Off
> >
> > 
> > BalancerMember ajp://localhost:8009/ route=tomcat
> loadfactor=1
> > BalancerMember ajp://localhost:8010/ route=tomcat2
> loadfactor=1
> > 
> > ProxyPass / balancer://cluster/ stickysession=JSESSIONID
> nofailover=On
> > ProxyPassReverse / balancer://cluster/
> >
> > 2. I am not sure that whether the problem occurs on the same tomcat,
> because I have no any idea to confirm that. Could you give me any tips to
> find it out?
>
> It will take a bit of work, but here are two possibility...
>
> If you are able to talk with the user when the problem occurs, try to
> get some information from the user:  the time the problem happened, the
> resource that was accessed or anything else that can be used to identify
> the request in the logs.
>
> Once you have that information, you'll need to look at the access logs
> to find the user's request and see which machine the request was sent
> to.
>
> Alternatively, if you can get the session id of the problem request, it
> should have the route appended to the end of it.  That would also tell
> you which machine the request was sent to.
>
> > This problem occurs occasionally, and I really don't know whether it is
> because of the session duplication or tomcat session manager itself.
>
> As I mentioned before, the most likely cause is due to a session,
> request or response object being retained by one of your application's
> servlets.  Doing this can cause problems very similar to the one that
> you are reporting.
>
> You should check your application to make sure that you never assign the
> session, request or response objects to a field on your Servlet objects.
> This is not thread safe and can cause a problem very similar to you are
> reporting.
>
> Dan
>
>
> >
> > 3. But one thing I am sure is that the two users use different PC to
> login,  which means that cookie is not the reason at all.
> >
> > Any fellows have such a problem? This problem is so bad that it has
> dried me and my visitors crazy, which is a big security problem!
> >
> > Any advice is high appreciated!
> >
> > Thanks in advance!
> >
> >
> > Weffen
> >
> >
> > 在 2012-1-11,下午9:52, Daniel Mikusa 写道:
> >
> > > On Wed, 2012-01-11 at 02:29 -0800, Weffen Cheung wrote:
> > >> Hello,
> > >>
> > >> I am using 2 tomcat(7.0.11) on my server, with clustering and session
> duplication. All the things are running smoothy except the session problem
> sometimes:
> > >>
> > >> 1. userA login, userB login
> > >
> > > Are userA and userB on the same TC instance?
> > >
> > >> 2. Sometimes when userB load a page, he found that he has became
> userA, it means that userB's login session data has been replaced with
> userA. Don't know why. Is it a bug?
> > >
> > > In most cases this occurs due to a session, request or response object
> > > being retained by a servlet.  This is bad and can cause behaviors
> > > similar to the one you are reporting.
> > >
> > >> Anyone encounter  the same problem??
> > >>
> > >> Any advice would be high appreciated!
> > >
> > > One other thought, what do you have in front of the two TC instances?
> > > Apache HTTPD with mod_proxy? or with mod_jk?
> > >
> > > Have you confirmed that the correct session id is being sent from the
> > > browser to your load balancer and then from the load balancer to your
> TC
> > > instance?
> > >
> > > Dan
> >
> >
> > --
> > Weffen Cheung
> > E: wef...@gmail.com
> > M: 1380618
> >
> >
> >
>


Re: tomcat session problem

2012-01-11 Thread Igor Cicimov
But you said you are using Apache as front end right? And here you are
using mod_proxy_balancer to reverse-proxy right?


> ProxyPass / balancer://cluster/ stickysession=JSESSIONID nofailover=On
> ProxyPassReverse / balancer://cluster/
>


You use sticky sessions on your proxy based on the JSESSIONID right? So the
point is the balancer in your Apache frontend proxy should have the
parameters synchronized with your backend Tomcat servers otherwise your
sessions might end up on a wrong Tomcat server when proxying. Hope this
makes sense?!

Igor
On Thu, Jan 12, 2012 at 12:35 PM, Selvakumar Subramanian <
sselvakum...@gmail.com> wrote:

> Hi Igor,
>
> Thanks for your reply...We are using apache tomact not the http
> serverHope the below parameter is to be used for apache http server
> right? Pls correct me, if i am wrong in understanding
>
> Thanks
> Selva
>
> On Wed, Jan 11, 2012 at 6:34 PM, Igor Cicimov  wrote:
>
> > And have you set jvmRoute parameter in the server.xml file on the tomcats
> > to match the route value you use in the balancer?
> >
> > Maybe read the following section of the mod_proxy_balancer carefully to
> > make sure all the dependencies are meat:
> >
> >
> >
> http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html#stickyness_implementation
> >
> >
> > Igor
> > On Thu, Jan 12, 2012 at 8:42 AM, Daniel Mikusa 
> wrote:
> >
> > > On Wed, 2012-01-11 at 10:21 -0800, Weffen Cheung wrote:
> > > > Hello,
> > > >
> > > > First Thanks for your reply, Dan.
> > > >
> > > > 1. Yes,  I am using apache2+mod_proxy in front of the two tomcats,
> here
> > > are the configuration in httpd.conf:
> > > >
> > > >   ProxyPass /images/ !
> > > > ProxyPass /css/ !
> > > > ProxyPass /js/ !
> > > > ProxyPass /photo/ !
> > > > ProxyPass /icon/ !
> > > > ProxyPass /pg/ !
> > > > ProxyPass /job/ !
> > > > ProxyPass /maintenance/ !
> > > > ProxyRequests Off
> > > >
> > > > 
> > > > BalancerMember ajp://localhost:8009/ route=tomcat
> > > loadfactor=1
> > > > BalancerMember ajp://localhost:8010/ route=tomcat2
> > > loadfactor=1
> > > > 
> > > > ProxyPass / balancer://cluster/ stickysession=JSESSIONID
> > > nofailover=On
> > > > ProxyPassReverse / balancer://cluster/
> > > >
> > > > 2. I am not sure that whether the problem occurs on the same tomcat,
> > > because I have no any idea to confirm that. Could you give me any tips
> to
> > > find it out?
> > >
> > > It will take a bit of work, but here are two possibility...
> > >
> > > If you are able to talk with the user when the problem occurs, try to
> > > get some information from the user:  the time the problem happened, the
> > > resource that was accessed or anything else that can be used to
> identify
> > > the request in the logs.
> > >
> > > Once you have that information, you'll need to look at the access logs
> > > to find the user's request and see which machine the request was sent
> > > to.
> > >
> > > Alternatively, if you can get the session id of the problem request, it
> > > should have the route appended to the end of it.  That would also tell
> > > you which machine the request was sent to.
> > >
> > > > This problem occurs occasionally, and I really don't know whether it
> is
> > > because of the session duplication or tomcat session manager itself.
> > >
> > > As I mentioned before, the most likely cause is due to a session,
> > > request or response object being retained by one of your application's
> > > servlets.  Doing this can cause problems very similar to the one that
> > > you are reporting.
> > >
> > > You should check your application to make sure that you never assign
> the
> > > session, request or response objects to a field on your Servlet
> objects.
> > > This is not thread safe and can cause a problem very similar to you are
> > > reporting.
> > >
> > > Dan
> > >
> > >
> > > >
> > > > 3. But one thing I am sure is that the two users use different PC to
> > > login,  which means that cookie is not the reason at all.
> > > >
> > > > Any fellows h

Re: Server starts but fails to get any reqs

2012-01-17 Thread Igor Cicimov
Looks like you have access permission problem. What are you policy settings
and tomcat directory permissions?
On Jan 18, 2012 1:49 PM, "deniz"  wrote:

> sorry for the weird layout of the error here is the error:
>
>
>
> Jan 18, 2012 10:43:57 AM org.apache.coyote.http11.AbstractHttp11Processor
> process
> SEVERE: Error processing request
> java.security.AccessControlException: access denied
> ("java.lang.RuntimePermission" "setContextClassLoader")
>at
>
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
>at
> java.security.AccessController.checkPermission(AccessController.java:555)
>at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>at java.lang.Thread.setContextClassLoader(Thread.java:1485)
>at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:213)
>at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
>at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
>at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
>at
>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
>at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>at java.lang.Thread.run(Thread.java:722)
>
> Jan 18, 2012 10:43:57 AM org.apache.coyote.http11.AbstractHttp11Processor
> endRequest
> SEVERE: Error finishing response
> java.lang.ExceptionInInitializerError
>at
>
> org.apache.coyote.http11.AbstractHttp11Processor.prepareResponse(AbstractHttp11Processor.java:1398)
>at
>
> org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:756)
>at org.apache.coyote.Response.action(Response.java:168)
>at
>
> org.apache.coyote.http11.AbstractOutputBuffer.endRequest(AbstractOutputBuffer.java:310)
>at
>
> org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:158)
>at
>
> org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:1586)
>at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1022)
>at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
>at
>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)
>at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>at java.lang.Thread.run(Thread.java:722)
> Caused by: java.security.AccessControlException: access denied
> ("java.util.PropertyPermission"
> "org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE" "read")
>at
>
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
>at
> java.security.AccessController.checkPermission(AccessController.java:555)
>at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>at
> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302)
>at java.lang.System.getProperty(System.java:742)
>at
>
> org.apache.tomcat.util.http.FastHttpDateFormat.(FastHttpDateFormat.java:38)
>... 12 more
>
> Exception in thread
> "ContainerBackgroundProcessor[StandardEngine[Catalina]]"
> java.security.AccessControlException: access denied
> ("java.lang.RuntimePermission" "setContextClassLoader")
>at
>
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
>at
> java.security.AccessController.checkPermission(AccessController.java:555)
>at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>at java.lang.Thread.setContextClassLoader(Thread.java:1485)
>at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1501)
>at
>
> org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1485)
>at java.lang.Thread.run(Thread.java:722)
>
>
> --
> View this message in context:
> http://tomcat.10.n6.nabble.com/Server-starts-but-fails-to-get-any-reqs-tp3697010p3697376.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org

Re: More, Re: Problem bringing up SSL with a CA certificate

2012-01-18 Thread Igor Cicimov
>
> Caused by: java.io.IOException: SSL configuration is invalid due to No
> available certificate or key corresponds to the SSL cipher suites which are
> enabled.


Are you sure you have downloaded the correct intermediate certs?

 *Note:* When executing the command to import the SSL certificate, you must
specify the actual *Alias* used when you initially created the keystore. If
you are unsure of this, run the following sample command to see the
contents of your keystore: *keytool -list -v -keystore keystorefile.kdb*
*
*
Did you use the same alias as the alias you used to create the keystore
when you imported the certificate? Is your tomcat connector config pointing
to the correct keysore file location?

Igor

On Thu, Jan 19, 2012 at 9:46 AM, James Lampert wrote:

> I've now got the CA certificates the customer representative is trying to
> use here, and I'm attempting to test them on our box.
>
> I followed these instructions:
>
> https://search.thawte.com/**support/ssl-digital-**certificates/index?page=
> **content&actp=CROSSLINK&id=**SO15518<https://search.thawte.com/support/ssl-digital-certificates/index?page=content&actp=CROSSLINK&id=SO15518>
>
> rather than the ones here:
>
> http://tomcat.apache.org/**tomcat-7.0-doc/ssl-howto.html#**
> Importing_the_Certificate<http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Importing_the_Certificate>
>
> which appear to be somewhat out of date, as Thawte calls for both primary
> and secondary x.509 certificates to be loaded into the keystore.
>
> With no explicit alias reference, and the three certificates placed in the
> keystore, in the order specified by Thawte, I get:
>
>  SEVERE: Failed to initialize end point associated with ProtocolHandler
>> ["http-bio-8443"]   Throwable
>> occurred: java.io.IOException: SSL configuration is invalid due to No
>> available certificate or key corresponds to the SSL cipher suites which are
>> enabled.
>>  at org.apache.tomcat.util.net.**jsse.JSSESocketFactory.**
>> checkConfig(JSSESocketFactory.**java:822)
>> at 
>> org.apache.tomcat.util.net.**jsse.JSSESocketFactory.init(**JSSESocketFactory.java:470)
>>  at
>> org.apache.tomcat.util.net.**jsse.JSSESocketFactory.**createSocket(**JSSESocketFactory.java:158)
>>  at org.apache.tomcat.util.net.**
>> JIoEndpoint.bind(JIoEndpoint.**java:369)
>>   at org.apache.tomcat.util.net.**
>> AbstractEndpoint.init(**AbstractEndpoint.java:553)
>>   at org.apache.coyote.**
>> AbstractProtocol.init(**AbstractProtocol.java:369)
>>at org.apache.coyote.http11.**
>> AbstractHttp11JsseProtocol.**init(**AbstractHttp11JsseProtocol.**java:119)
>>   at org.apache.catalina.connector.**
>> Connector.initInternal(**Connector.java:937)
>>   at 
>> org.apache.catalina.util.**LifecycleBase.init(**LifecycleBase.java:102)
>>at
>> org.apache.catalina.core.**StandardService.initInternal(**StandardService.java:559)
>>at org.apache.catalina.util.**
>> LifecycleBase.init(**LifecycleBase.java:102)
>>at org.apache.catalina.core.**
>> StandardServer.initInternal(**StandardServer.java:781)
>>at org.apache.catalina.util.**
>> LifecycleBase.init(**LifecycleBase.java:102)
>>at org.apache.catalina.startup.**
>> Catalina.load(Catalina.java:**573)
>> at org.apache.catalina.startup.**
>> Catalina.load(Catalina.java:**598)
>> at 
>> sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native
>> Method)at
>> sun.reflect.**NativeMethodAccessorImpl.**invoke(**
>> NativeMethodAccessorImpl.java:**60)
>>  at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
>> DelegatingMethodAccessorImpl.**java:37)
>>  at java.lang.reflect.Method.**invoke(Method.java:611)
>> at
>> org.apache.catalina.startup.**Bootstrap.load(Bootstrap.java:**281)
>>   at
>> org.apache.catalina.startup.**Bootstrap.main(Bootstrap.java:**449)
>>  Caused by:
>> javax.net.ssl.SSLException: N

Re: Is SSL keystore with AJP connector possible?

2012-01-18 Thread Igor Cicimov
On Thu, Jan 19, 2012 at 10:09 AM, mandg  wrote:

> I'm working on Apache Tomcat/6.0.33 running in Windows 2003 and have been
> asked to setup SSL. Looking at the server.xml file, I see that the AJP/1.3
> connector is configured and not APR.  Like a good newbie that I am with
> Tomcat, I followed the Tomcat instructions for configuring SSL. However,
> the
> docs seemed to step me through the steps for an APR-type connector, not AJP
> since I had specified a keystore and passphrase. When I reviewed the AJP
> connector documentation, I didn't find any attributes to specify for the
> keystore and passphrase.
>
> So my question is, can I use a keystore for the AJP type of connector? And
> if so, are there any good tutorials out there that can walk me through it.
>
> If not, can I simply edit out the AJP connector in my server.xml file and
> edit in the APR connector? Or will that somehow break the site/application
> that's running on Tomcat?
>
> --
> View this message in context:
> http://tomcat.10.n6.nabble.com/Is-SSL-keystore-with-AJP-connector-possible-tp3814537p3814537.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Maybe this will help:

http://www.mulesoft.com/tomcat-ssl

read PART II - Configuring Tomcat to use SSL

basically it says

Notice that if you are using APR, the "SSLCertificateFile" and
> "SSLCertificateKey"-type attributes are used in place of the keystoreFile
> attribute.  For more information on the differences between using APR in
> place of JSSE, consult Apache's Tomcat APR 
> Documentation<http://tomcat.apache.org/tomcat-6.0-doc/apr.html>
> .



Igor


Re: Unable to access images stored in webapps//WEB-INF/images ?

2012-01-23 Thread Igor Cicimov
On Tue, Jan 24, 2012 at 12:21 PM, Alastair Baldwin <
alastairgbald...@yahoo.co.uk> wrote:

> Dear Users
>
> Why am I able to access images stored here:
>
> http://localhost:8080/imageUploader/1234.jpg
>
>
> but not here:
>
> http://localhost:8080/imageUploader/WEB-INF/images/1234.jpg
>
>
> File permissions are the same
>
> Any ideas?
>
> Thanks
>
> Alastair
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
catalina.policy file? Although I'm not clear why on earth would you like to
store images inside the application WEB-INF directory?


Re: Tomcat mod_proxy_ajp and workers

2012-01-26 Thread Igor Cicimov
Thats the MPM worker settings for apache threads. You need to find the ajp
Proxy part in your config.
On Jan 26, 2012 11:14 PM, "baba smith"  wrote:

> hi,
> i'm pretty much confused about the workers issue.
> my setup is an apache server and a tomcat that are connected with a
> mode_proxy_ajp connector.
> the porblem is that some time after that both are working, the tomcat stops
> responding to apache. the errors that i see in the apache are:
> 1. (70007)The timeout specified has expired: ajp_ilink_receive() can't
> receive header
> 2. ajp_read_header: ajp_ilink_receive failed
> 3. (120006)APR does not understand this error code: proxy: read response
> failed from 127.0.0.1:9005 (localhost)
>
> i tries to figure that out reading many posts and i got the idea that maybe
> the apache is configured with more workers than the tomcat and that it
> causes the apache to time out.
>
> so i looked for the workers configuration and actually i couldnt find any
> workers properties file in neither of the servers. (apache 2.2.15 and
> tomcat
> 7, were installed by someone else a couple of months ago).
> is there a default configuration that takes place when there is no
> properties file for the workers?
>
> the closest thing that i found is in the httpd.conf file of the apache and
> it says:
> 
>   StartServers 4
>   MaxClients 300
>   MinSpareThreads 25
>   MaxSpareThreads 75
>   ThreadsPerChild 25
>   MaxRequestsPerChild  0
> 
>
> whats that?
>
> thank you for your time :)
> baba
>
> --
> View this message in context:
> http://tomcat.10.n6.nabble.com/Tomcat-mod-proxy-ajp-and-workers-tp4340550p4340550.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: PLZ help: i've issue with SSL TOMCAT

2012-04-17 Thread Igor Cicimov
On Tue, Apr 17, 2012 at 8:51 PM, amine20  wrote:

> hi
> i'm new in tomcat/apache environement, i've succes to add ssl to apache2
> using openssl, but i've tried to do the same in tomcat but unfortunatly
> doesn't WORK.
>
> this is an explanation of what i have did:
> Step 1.Create a keystore file using Java
> /usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin# keytool -genkey -alias tomcat
> -keyalg RSA
>
> root@CAS:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin# keytool -genkey -alias
> tomcat -keyalg RSA
> Enter key store password: changeit
> Enter key password for : changeit
>
> You are about to enter information that will be incorporated into
> your certificate request.  This information is what is called a
> Distinguished Name or DN.  There are quite a few fields but you
> can use supplied default values, displayed between brackets, by just
> hitting , or blank the field by entering the <.> character
> before hitting .
>
> Common Name (hostname, IP, or your name): CAS
> Organization Name (company) [The Sample Company]: crdp-nice.cndp.fr
> Organizational Unit Name (department, division): IT
> Locality Name (city, district) [Sydney]: FRANCE
> State or Province Name (full name) [NSW]: TOULON
> Country Name (2 letter code) [AU]: FR
> ->>> now my .keystore file
> is in /root folder
> root@CAS:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin# ls -a /root |grep
> .keystore
> .keystore
>
> Step 2.Configure Tomcat to use the keystore
> a modify the server.xml file as shown:
>
>   port="8443"  SSLEnabled="true"
>   keystoreFile="/root/.keystore" keystorePass="changeit"
>   maxThreads="150" scheme="https" secure="true"
>   clientAuth="false" sslProtocol="TLS" />
>  --
> for testing:
>  service tomcat6 restart
> Stopping Tomcat servlet engine: tomcat6.
> Starting Tomcat servlet engine: tomcat6.
>
> we see tomcat can restart but in log file i got this:
>
> 17 avr. 2012 12:16:30 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 6026 ms
> 17 avr. 2012 12:19:20 org.apache.coyote.http11.Http11Protocol pause
> INFO: Suspension de Coyote HTTP/1.1 sur http-8080
> 17 avr. 2012 12:19:20 org.apache.coyote.http11.Http11Protocol pause
> INFO: Suspension de Coyote HTTP/1.1 sur http-8443
> 17 avr. 2012 12:19:21 org.apache.catalina.core.StandardService stop
> INFO: Arrêt du service Catalina
> 17 avr. 2012 12:19:21 org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> GRAVE: The web application [/cas] appears to have started a thread named
> [Thread-2] but has failed to stop it. This is very likely to create a
> memory
> leak.
> 17 avr. 2012 12:19:21 org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> GRAVE: The web application [/cas] appears to have started a thread named
> [scheduler_Worker-1] but has failed to stop it. This is very likely to
> create a memory leak.
> 17 avr. 2012 12:19:21 org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> GRAVE: The web application [/cas] appears to have started a thread named
> [scheduler_Worker-2] but has failed to stop it. This is very likely to
> create a memory leak.
> 17 avr. 2012 12:19:21 org.apache.coyote.http11.Http11Protocol destroy
> INFO: Arrêt de Coyote HTTP/1.1 sur http-8080
> 17 avr. 2012 12:19:21 org.apache.coyote.http11.Http11Protocol destroy
> INFO: Arrêt de Coyote HTTP/1.1 sur http-8443
> 17 avr. 2012 12:19:23 org.apache.catalina.startup.ClassLoaderFactory
> validateFile
> ATTENTION: Problem with directory [/usr/share/tomcat6/server/classes],
> exists: [false], isDirectory: [false], canRead: [false]
> 17 avr. 2012 12:19:23 org.apache.catalina.startup.ClassLoaderFactory
> validateFile
> ATTENTION: Problem with directory [/usr/share/tomcat6/server], exists:
> [false], isDirectory: [false], canRead: [false]
> 17 avr. 2012 12:19:23 org.apache.catalina.startup.ClassLoaderFactory
> validateFile
> ATTENTION: Problem with directory [/usr/share/tomcat6/shared/classes],
> exists: [false], isDirectory: [false], canRead: [false]
> 17 avr. 2012 12:19:23 org.apache.catalina.startup.ClassLoaderFactory
> validateFile
> ATTENTION: Problem with directory [/usr/share/tomcat6/shared], exists:
> [false], isDirectory: [false], canRead: [false]
> 17 avr. 2012 12:19:24 org.apache.coyote.http11.Http11Protocol init
> INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
> 17 avr. 2012 12:19:24 org.apache.tomcat.util.net.jsse.JSSESocketFactory
> getStore
> GRAVE: Failed to load keystore type JKS with path /root/.keystore due to
> /root/.keystore (Permission denied)
> java.io.FileNotFoundException: /root/.keystore (Permission denied)
>at java.io.FileInputStream.open(Native Method)
>at java.io.FileInputStream.(FileInputStream.java:120)
>at
>
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:405)
>at
>
> org.apache.tomcat.util.net.jsse.JSSESocketFac

Re: Mod_jk returning source code of jsp files

2012-04-23 Thread Igor Cicimov
Put this line

Include /etc/httpd/conf/mod_jk.conf

inside virtual host.
 On Apr 23, 2012 9:12 PM, "ironclaw hand"  wrote:

>
>
> Hi,
>
> I am attempting to set up apache and tomcat together for the first time on
> a new machine using some existing configuration files. I am not sure what
> is happening but it looks like apache is just serving up all files so when
> i acccess a jsp file I get the source as if tomcat never executed it.
>
> I have installed the following versions of software:
>
> httpd 2.4.2
> Tomcat connectors 1.2.35
> Tomcat 7.0.27
>
> Below are the mod_jk config (workers.properties and mod_jk.conf) files I
> am currently trying to get working if there is anything else that is needed
> then I can include this. My worker softcat1 is defined in my server.xml for
> tomcat.
>
> Tomcat works on its own if I access it directly and it does run the jsp
> files ok, it just seems to be when I try via apache.
>
> I have included my httpd.conf in case it is needed:
>
>
> ServerTokens Prod
>
>
> ServerRoot "/etc/httpd"
>
> PidFile run/httpd.pid
>
>
> Timeout 120
>
>
> KeepAlive Off
>
> MaxKeepAliveRequests 100
>
>
> KeepAliveTimeout 15
>
>
> 
> StartServers   8
> MinSpareServers5
> MaxSpareServers   20
> ServerLimit  1024
> #ServerLimit   50
> MaxClients   1024
> #MaxClients50
> MaxRequestsPerChild  4000
> 
>
>
> 
> StartServers 2
> MaxClients 150
> MinSpareThreads 25
> MaxSpareThreads 75
> ThreadsPerChild 25
> MaxRequestsPerChild  0
> 
>
>
> LoadModule access_compat_module modules/mod_access_compat.so
> LoadModule authz_core_module modules/mod_authz_core.so
> LoadModule authz_host_module modules/mod_authz_host.so
> LoadModule auth_basic_module modules/mod_auth_basic.so
> LoadModule authn_file_module modules/mod_authn_file.so
> LoadModule authn_anon_module modules/mod_authn_anon.so
> LoadModule authn_dbm_module modules/mod_authn_dbm.so
> LoadModule auth_digest_module modules/mod_auth_digest.so
> LoadModule ldap_module modules/mod_ldap.so
> LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
> LoadModule include_module modules/mod_include.so
> LoadModule log_config_module modules/mod_log_config.so
> LoadModule env_module modules/mod_env.so
> LoadModule mime_magic_module modules/mod_mime_magic.so
> LoadModule cern_meta_module modules/mod_cern_meta.so
> LoadModule expires_module modules/mod_expires.so
> LoadModule deflate_module modules/mod_deflate.so
> LoadModule headers_module modules/mod_headers.so
> LoadModule usertrack_module modules/mod_usertrack.so
> LoadModule setenvif_module modules/mod_setenvif.so
> LoadModule mime_module modules/mod_mime.so
> LoadModule dav_module modules/mod_dav.so
> LoadModule status_module modules/mod_status.so
> LoadModule autoindex_module modules/mod_autoindex.so
> LoadModule asis_module modules/mod_asis.so
> LoadModule info_module modules/mod_info.so
> LoadModule dav_fs_module modules/mod_dav_fs.so
> LoadModule vhost_alias_module modules/mod_vhost_alias.so
> LoadModule negotiation_module modules/mod_negotiation.so
> LoadModule dir_module modules/mod_dir.so
> LoadModule imagemap_module modules/mod_imagemap.so
> LoadModule actions_module modules/mod_actions.so
> LoadModule speling_module modules/mod_speling.so
> LoadModule userdir_module modules/mod_userdir.so
> LoadModule alias_module modules/mod_alias.so
> LoadModule rewrite_module modules/mod_rewrite.so
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
> LoadModule proxy_connect_module modules/mod_proxy_connect.so
> LoadModule cache_module modules/mod_cache.so
> LoadModule suexec_module modules/mod_suexec.so
> #LoadModule disk_cache_module modules/mod_disk_cache.so
> LoadModule file_cache_module modules/mod_file_cache.so
> #LoadModule mem_cache_module modules/mod_mem_cache.so
> LoadModule cgi_module modules/mod_cgi.so
> LoadModule version_module modules/mod_version.so
> LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
> LoadModule unixd_module modules/mod_unixd.so
>
>
> Include conf.d/*.conf
>
> User apache
> Group apache
>
>
> ServerAdmin root@localhost
>
>
> UseCanonicalName Off
>
> DocumentRoot "/var/webapps"
>
>
> 
>Options FollowSymLinks
>AllowOverride None
> 
>
>
> 
>
>
>Options Indexes FollowSymLinks
>
>AllowOverride None
>
>Order allow,deny
>Allow from all
>
> 
>
>
> 
>
>UserDir disable
>
>
>
> 
>
>
> DirectoryIndex index.html index.html.var
>
>
> AccessFileName .htaccess
>
> 
>Order allow,deny
>Deny from all
> 
>
>
> TypesConfig /etc/mime.types
>
> DefaultType text/plain
>
>
> 
> #   MIMEMagicFile /usr/share/magic.mime
>MIMEMagicFile conf/magic
> 
>
>
> HostnameLookups Off
>
>
> ErrorLog logs/error_log
>
>
> LogLevel warn
>
>
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
> combined
> LogFormat "%h %l %u %t \"%r\" %>s %b" common
> LogFormat "%{Referer}i -> %U" referer

RE: Mod_jk returning source code of jsp files

2012-04-23 Thread Igor Cicimov
Well you need to have JkMount command inside the virtual host so its up to
you how to do it.
 On Apr 23, 2012 10:53 PM, "ironclaw hand"  wrote:

>
>
> Ok I tried that but apache wont start now. It gives the following error:
>
> AH00526: Syntax error on line 1 of /etc/httpd/conf/mod_jk.conf:
> JkWorkersFile cannot occur within  section
>   [FAILED]
>
>
> > Date: Mon, 23 Apr 2012 22:36:35 +1000
> > Subject: Re: Mod_jk returning source code of jsp files
> > From: icici...@gmail.com
> > To: users@tomcat.apache.org
> >
> > Put this line
> >
> > Include /etc/httpd/conf/mod_jk.conf
> >
> > inside virtual host.
> >  On Apr 23, 2012 9:12 PM, "ironclaw hand" 
> wrote:
> >
> > >
> > >
> > > Hi,
> > >
> > > I am attempting to set up apache and tomcat together for the first
> time on
> > > a new machine using some existing configuration files. I am not sure
> what
> > > is happening but it looks like apache is just serving up all files so
> when
> > > i acccess a jsp file I get the source as if tomcat never executed it.
> > >
> > > I have installed the following versions of software:
> > >
> > > httpd 2.4.2
> > > Tomcat connectors 1.2.35
> > > Tomcat 7.0.27
> > >
> > > Below are the mod_jk config (workers.properties and mod_jk.conf) files
> I
> > > am currently trying to get working if there is anything else that is
> needed
> > > then I can include this. My worker softcat1 is defined in my
> server.xml for
> > > tomcat.
> > >
> > > Tomcat works on its own if I access it directly and it does run the jsp
> > > files ok, it just seems to be when I try via apache.
> > >
> > > I have included my httpd.conf in case it is needed:
> > >
> > >
> > > ServerTokens Prod
> > >
> > >
> > > ServerRoot "/etc/httpd"
> > >
> > > PidFile run/httpd.pid
> > >
> > >
> > > Timeout 120
> > >
> > >
> > > KeepAlive Off
> > >
> > > MaxKeepAliveRequests 100
> > >
> > >
> > > KeepAliveTimeout 15
> > >
> > >
> > > 
> > > StartServers   8
> > > MinSpareServers5
> > > MaxSpareServers   20
> > > ServerLimit  1024
> > > #ServerLimit   50
> > > MaxClients   1024
> > > #MaxClients50
> > > MaxRequestsPerChild  4000
> > > 
> > >
> > >
> > > 
> > > StartServers 2
> > > MaxClients 150
> > > MinSpareThreads 25
> > > MaxSpareThreads 75
> > > ThreadsPerChild 25
> > > MaxRequestsPerChild  0
> > > 
> > >
> > >
> > > LoadModule access_compat_module modules/mod_access_compat.so
> > > LoadModule authz_core_module modules/mod_authz_core.so
> > > LoadModule authz_host_module modules/mod_authz_host.so
> > > LoadModule auth_basic_module modules/mod_auth_basic.so
> > > LoadModule authn_file_module modules/mod_authn_file.so
> > > LoadModule authn_anon_module modules/mod_authn_anon.so
> > > LoadModule authn_dbm_module modules/mod_authn_dbm.so
> > > LoadModule auth_digest_module modules/mod_auth_digest.so
> > > LoadModule ldap_module modules/mod_ldap.so
> > > LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
> > > LoadModule include_module modules/mod_include.so
> > > LoadModule log_config_module modules/mod_log_config.so
> > > LoadModule env_module modules/mod_env.so
> > > LoadModule mime_magic_module modules/mod_mime_magic.so
> > > LoadModule cern_meta_module modules/mod_cern_meta.so
> > > LoadModule expires_module modules/mod_expires.so
> > > LoadModule deflate_module modules/mod_deflate.so
> > > LoadModule headers_module modules/mod_headers.so
> > > LoadModule usertrack_module modules/mod_usertrack.so
> > > LoadModule setenvif_module modules/mod_setenvif.so
> > > LoadModule mime_module modules/mod_mime.so
> > > LoadModule dav_module modules/mod_dav.so
> > > LoadModule status_module modules/mod_status.so
> > > LoadModule autoindex_module modules/mod_autoindex.so
> > > LoadModule asis_module modules/mod_asis.so
> > > LoadModule info_module modules/mod_info.so
> > > LoadModule dav_fs_module modules/mod_dav_fs.so
> > > LoadModule vhost_alias_module modules/mod_vhost_alias.so
> > > LoadModule negotiation_module modules/mod_negotiation.so
> > > LoadModule dir_module modules/mod_dir.so
> > > LoadModule imagemap_module modules/mod_imagemap.so
> > > LoadModule actions_module modules/mod_actions.so
> > > LoadModule speling_module modules/mod_speling.so
> > > LoadModule userdir_module modules/mod_userdir.so
> > > LoadModule alias_module modules/mod_alias.so
> > > LoadModule rewrite_module modules/mod_rewrite.so
> > > LoadModule proxy_module modules/mod_proxy.so
> > > LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
> > > LoadModule proxy_http_module modules/mod_proxy_http.so
> > > LoadModule proxy_connect_module modules/mod_proxy_connect.so
> > > LoadModule cache_module modules/mod_cache.so
> > > LoadModule suexec_module modules/mod_suexec.so
> > > #LoadModule disk_cache_module modules/mod_disk_cache.so
> > > LoadModule file_cache_module modules/mod_file_cache.so
> > > #LoadModule mem_cache_module modules/mod_mem_cache.so
> > > LoadModule cgi_module modules/m

Re: Connection timeout

2012-05-10 Thread Igor Cicimov
Typing this from my phone so sorry for top posting no other option.
You might also check your garbage collection which can introduce some
pauses in some cases. Just a thought ...
 On May 11, 2012 7:26 AM, "Jon Drukman"  wrote:

> Caldarale, Charles R  unisys.com> writes:
>
> > Using JConsole or VisualVM would be a good start.
>
> OK, I'll take a look at those.
>
> > > There's only one app running on this tomcat, if that makes
> > > any difference.
> >
> > Does it connect to a database (or any other external resource)?
> > If so, are you using a connection pool for the
> > DB?  You may have threads queuing up waiting for a
> > connection to become available.
>
> no, there is no external dependency that i'm aware of.
>
> -jsd-
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Tomcat 7 Manager App Authentication failure

2012-06-28 Thread Igor Cicimov
On Fri, Jun 29, 2012 at 11:17 AM, kl2eativ  wrote:

> Hello. I am having problems trying to authenticate my tomcat 7 manager
> app. I
> keep getting a 401 Unauthorized page. My config is as follows:
> tomcat-users.xml (Located in /etc/tomcat5)
> [code]
>   
>  
>  
>  
>  
> [/code]
>
> server.xml (Located in /etc/tomcat5)
> [code]
>
>type="org.apache.catalina.UserDatabase"
>  description="User database that can be updated and saved"
>  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>  pathname="etc/tomcat5/tomcat-users.xml" />
> [/code]
>
> I restart the tomcat service ( #service tomcat restart ) , but still cannot
> authenticate. Your help would be greatly
> appreciated.
>
> --
> View this message in context:
> http://tomcat.10.n6.nabble.com/Tomcat-7-Manager-App-Authentication-failure-tp4983418.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

First check the security-constraint in the manager app and make sure that
the manager-gui role  is allowed access.

Second, are you trying to access from localhost or remote host?

Igor


Re: Intermittent mod_proxy_ajp error - APR does not understand this error code: proxy: dialog

2012-07-25 Thread Igor Cicimov
You have max clients on the apache side set to 400 but only 300 threads on
tomcat side. No wonder you get 500 error...

On Wed, Jul 25, 2012 at 12:22 AM, Carlucci, Tony wrote:

> Cross-posting this to the tomcat users list (also posted to users@httpd
> )...
>
> Hello, I've been trying to track down an intermittent problem with a Java
> web application that is running on tcServer fronted by Apache HTTP Server.
>We get intermittent "Server Unavailable / HTTP 500" errors, and when we
> do see them, there is the same set of log statements written to the Apache
> HTTP Server error log:
>
> [Mon Jul 23 10:03:15 2012] [error] (70014)End of file found:
> ajp_ilink_receive() can't receive header
> [Mon Jul 23 10:03:15 2012] [error] ajp_read_header: ajp_ilink_receive
> failed
> [Mon Jul 23 10:03:15 2012] [error] (120006)APR does not understand this
> error code: proxy: dialog to 127.0.0.1:7071 (127.0.0.1) failed
>
> We are not seeing any error messages in the tcServer logs.
>
> I believe the issue is with the mod_proxy_ajp module but it's been very
> difficult tracking down what exactly the problem is.   What's interesting
> is that this Apache / tcServer configuration is used with other
> applications that work just fine and never have the intermittent 500 error.
>   We also can run our application strictly in Tomcat (no Apache front)
> without any intermittent errors.
>
> We haven't ruled out that there could be something in our Java application
> code that is causing this, in combination with the mod_proxy_ajp module,
> but we have hit a wall as to what this issue could be.  Has anyone else
> experienced a similar intermittent issue combined with the above error
> messages?  Below is a copy of the error log and some configuration settings.
>
> Thanks, Tony
>
> -
> Apache HTTP Error Log
> -
> [Mon Jul 23 10:03:15 2012] [debug] mod_cache.c(141): Adding CACHE_SAVE
> filter for /myapp/
> [Mon Jul 23 10:03:15 2012] [debug] mod_cache.c(148): Adding
> CACHE_REMOVE_URL filter for /myapp/
> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy_ajp.c(45): proxy: AJP:
> canonicalising URL //127.0.0.1:7071/myapp/
> [Mon Jul 23 10:03:15 2012] [debug] proxy_util.c(1506): [client
> ***cleansed***] proxy: ajp: found worker ajp://127.0.0.1:7071/myapp for
> ajp://127.0.0.1:7071/myapp/
> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy.c(1020): Running scheme ajp
> handler (attempt 0)
> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy_http.c(1963): proxy: HTTP:
> declining URL ajp://127.0.0.1:7071/myapp/
> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy_ajp.c(681): proxy: AJP:
> serving URL ajp://127.0.0.1:7071/myapp/
> [Mon Jul 23 10:03:15 2012] [debug] proxy_util.c(2011): proxy: AJP: has
> acquired connection for (127.0.0.1)
> [Mon Jul 23 10:03:15 2012] [debug] proxy_util.c(2067): proxy: connecting
> ajp://127.0.0.1:7071/myapp/ to 127.0.0.1:7071
> [Mon Jul 23 10:03:15 2012] [debug] proxy_util.c(2193): proxy: connected
> /myapp/ to 127.0.0.1:7071
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(224): Into
> ajp_marshal_into_msgb
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[0] [x-forwarded-for] = [***cleansed***]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[1] [Host] = [***cleansed***]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[2] [Connection] = [keep-alive]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[3] [User-Agent] = [Mozilla/5.0 (Windows NT
> 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57
> Safari/536.11]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[4] [Accept] =
> [text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[5] [Accept-Encoding] = [gzip,deflate,sdch]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[6] [Accept-Language] = [en-US,en;q=0.8]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[7] [Accept-Charset] =
> [ISO-8859-1,utf-8;q=0.7,*;q=0.3]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[8] [Cookie] = [SSOTOKEN=***cleansed***]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[9] [SSO_LOGIN] = [***cleansed***]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[10] [SSO_ID] = [***cleansed***]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> ajp_marshal_into_msgb: Header[11] [SSO_EMAIL] = [***cleansed***]
> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(450):
> ajp_marshal_into_msgb: Done
> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy_ajp.c(268): proxy:
> APR_BUCKET_IS_EOS
> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy_ajp.c(273): proxy: data to
> read (max 8186

Re: Intermittent mod_proxy_ajp error - APR does not understand this error code: proxy: dialog

2012-07-26 Thread Igor Cicimov
On Fri, Jul 27, 2012 at 4:20 AM, Carlucci, Tony  wrote:

> >-Original Message-
> >From: Igor Cicimov [mailto:icici...@gmail.com]
> >Sent: Wednesday, July 25, 2012 9:12 PM
> >To: Tomcat Users List
> >Subject: Re: Intermittent mod_proxy_ajp error - APR does not understand
> this
> >error code: proxy: dialog
> >
> >You have max clients on the apache side set to 400 but only 300 threads on
> >tomcat side. No wonder you get 500 error...
>
> Thanks for the suggestion Igor, I increased the tomcat threads to 400 but
> that did not resolve the issue.
>
> Tony
>
>
> >
> >On Wed, Jul 25, 2012 at 12:22 AM, Carlucci, Tony  >wrote:
> >
> >> Cross-posting this to the tomcat users list (also posted to users@httpd
> >> )...
> >>
> >> Hello, I've been trying to track down an intermittent problem with a
> Java
> >> web application that is running on tcServer fronted by Apache HTTP
> Server.
> >>We get intermittent "Server Unavailable / HTTP 500" errors, and when
> we
> >> do see them, there is the same set of log statements written to the
> Apache
> >> HTTP Server error log:
> >>
> >> [Mon Jul 23 10:03:15 2012] [error] (70014)End of file found:
> >> ajp_ilink_receive() can't receive header
> >> [Mon Jul 23 10:03:15 2012] [error] ajp_read_header: ajp_ilink_receive
> >> failed
> >> [Mon Jul 23 10:03:15 2012] [error] (120006)APR does not understand this
> >> error code: proxy: dialog to 127.0.0.1:7071 (127.0.0.1) failed
> >>
> >> We are not seeing any error messages in the tcServer logs.
> >>
> >> I believe the issue is with the mod_proxy_ajp module but it's been very
> >> difficult tracking down what exactly the problem is.   What's
> interesting
> >> is that this Apache / tcServer configuration is used with other
> >> applications that work just fine and never have the intermittent 500
> error.
> >>   We also can run our application strictly in Tomcat (no Apache front)
> >> without any intermittent errors.
> >>
> >> We haven't ruled out that there could be something in our Java
> application
> >> code that is causing this, in combination with the mod_proxy_ajp module,
> >> but we have hit a wall as to what this issue could be.  Has anyone else
> >> experienced a similar intermittent issue combined with the above error
> >> messages?  Below is a copy of the error log and some configuration
> settings.
> >>
> >> Thanks, Tony
> >>
> >> -
> >> Apache HTTP Error Log
> >> -
> >> [Mon Jul 23 10:03:15 2012] [debug] mod_cache.c(141): Adding CACHE_SAVE
> >> filter for /myapp/
> >> [Mon Jul 23 10:03:15 2012] [debug] mod_cache.c(148): Adding
> >> CACHE_REMOVE_URL filter for /myapp/
> >> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy_ajp.c(45): proxy: AJP:
> >> canonicalising URL //127.0.0.1:7071/myapp/
> >> [Mon Jul 23 10:03:15 2012] [debug] proxy_util.c(1506): [client
> >> ***cleansed***] proxy: ajp: found worker ajp://127.0.0.1:7071/myapp for
> >> ajp://127.0.0.1:7071/myapp/
> >> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy.c(1020): Running scheme ajp
> >> handler (attempt 0)
> >> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy_http.c(1963): proxy: HTTP:
> >> declining URL ajp://127.0.0.1:7071/myapp/
> >> [Mon Jul 23 10:03:15 2012] [debug] mod_proxy_ajp.c(681): proxy: AJP:
> >> serving URL ajp://127.0.0.1:7071/myapp/
> >> [Mon Jul 23 10:03:15 2012] [debug] proxy_util.c(2011): proxy: AJP: has
> >> acquired connection for (127.0.0.1)
> >> [Mon Jul 23 10:03:15 2012] [debug] proxy_util.c(2067): proxy: connecting
> >> ajp://127.0.0.1:7071/myapp/ to 127.0.0.1:7071
> >> [Mon Jul 23 10:03:15 2012] [debug] proxy_util.c(2193): proxy: connected
> >> /myapp/ to 127.0.0.1:7071
> >> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(224): Into
> >> ajp_marshal_into_msgb
> >> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> >> ajp_marshal_into_msgb: Header[0] [x-forwarded-for] = [***cleansed***]
> >> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> >> ajp_marshal_into_msgb: Header[1] [Host] = [***cleansed***]
> >> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> >> ajp_marshal_into_msgb: Header[2] [Connection] = [keep-alive]
> >> [Mon Jul 23 10:03:15 2012] [debug] ajp_header.c(290):
> >> ajp_marshal_into_msgb: Header[3] [User-Agent] = [M

Re: Pointing tomcat to a different timezone

2012-07-29 Thread Igor Cicimov
On Mon, Jul 30, 2012 at 8:39 AM, krishna chaitanya kurnala  wrote:

> Dear Tomcat Users,
>
> I am deploying a Java Application in Tomcat, that is picking the wrong
> Time-zone from OS. I did try to change the time settings at OS level.
>
> while the OS is PDT
> [root@sdc-cidev10 ~]# date
> Sun Jul 29 15:16:41 PDT 2012
>
> My Java App is still in Universal Time-zone. Can you please guide me on how
> to set -Duser.timezone property for Tomcat?
>
> Thanks in advance,
> Krishna Chaitanya
>

Can't you just use the TimeZone class in your app?

String timeZoneId = "Australia/Sydney";
TimeZone timeZone = TimeZone.getTimeZone(timeZoneId);


Is this Sun Oracle Java? Do you have the tzdata package installed?


Re: Unable to change version of Apache Tomcat

2012-08-27 Thread Igor Cicimov
On Aug 28, 2012 1:39 PM, "John Byrne"  wrote:
>
> Hello all,
>
> I'm trying to upgrade to 7.0.29 from 7.0.8 and I've switched the soft
link under Tomcat/ (our setup).  However, this is not upgrading the server.
 I've looked for environment variables but can't find any that would seem
to point to the old version. (see environment variables set below)
>
> I was wondering whether there is a way to tell what version is in the jar
files.  I've expanded StandardEngine.class in catalina.jar and tried
strings and that didn't work.
>
> By the way...
> I know it's still 7.0.8 when I look at the catalina out file:
> .
> .
> .
> Aug 28, 2012 3:26:31 AM org.apache.catalina.core.StandardEngine
startInternal
> INFO: Starting Servlet Engine: Apache Tomcat/7.0.8
> .
> .
> .
>
> Thank you for any help.
>
> John Byrne
> System Administrator, IS&T
> john_by...@apple.com
>
>
>
> -
> environment variables below
> -
> BASH=/bin/sh
> BASH_ARGC=()
> BASH_ARGV=()
> BASH_LINENO=([0]="0")
> BASH_SOURCE=([0]="/ngs/app/oto2t/Tomcat/tomcat/bin/startup.sh")
> BASH_VERSINFO=([0]="3" [1]="2" [2]="25" [3]="1" [4]="release"
[5]="x86_64-redhat-linux-gnu")
> BASH_VERSION='3.2.25(1)-release'
> CATALINA_BASE=/ngs/app/oto2t/Tomcat/Service
> CATALINA_BASE_PORT=7802
> CATALINA_LOGS=/ngs/app/oto2t/var/log/Service
> CATALINA_OUT=/ngs/app/oto2t/Tomcat/Service/logs/catalina_Service_7802.out
> CATALINA_PID=/ngs/app/oto2t/Tomcat/Service/tomcat_7802.pid
> CATALINA_SHUTDOWN_PORT=7804
> DIRSTACK=()
> EUID=9674
> EXECUTABLE=catalina.sh
> GROUPS=()
> G_BROKEN_FILENAMES=1
> HISTSIZE=1000
> HOME=/ngs/app/oto2t
> HOSTNAME=roadfever.corp.apple.com
> HOSTTYPE=x86_64
> IFS='
> '
> INPUTRC=/etc/inputrc
> JAVA_HOME=/ngs/app/oto2t/java_home
> JAVA_OPTS='-Xms1024m -Xmx2048m -XX:MaxPermSize=1024m
-Dport.http.nonssl=7802 -Dport.http.shutdown=7804
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=5802
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false -Denv=qa
-Duser.timezone=GMT -Dfile.encoding=UTF-8 -Dorg.apache.cocoon.mode=qa
-Dtangosol.coherence.cacheconfig=/conf/coherence-cache-config.xml
-Dsplunk.accesslogs=/ngs/app/oto2t/var/
roadfever.corp.apple.com/accessLogs/Service -DAppName=Service'
> LANG=en_US.UTF-8
> LESSOPEN='|/usr/bin/lesspipe.sh %s'
> LOGNAME=oto2t
> LS_COLORS=
> MACHTYPE=x86_64-redhat-linux-gnu
> MAIL=/var/spool/mail/oto2t
> OPTERR=1
> OPTIND=1
> OSTYPE=linux-gnu
>
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/java/jdk1.6.0_19/bin
> PIPESTATUS=([0]="0")
> POSIXLY_CORRECT=y
> PPID=3524
> PRG=/ngs/app/oto2t/Tomcat/tomcat/bin/startup.sh
> PRGDIR=/ngs/app/oto2t/Tomcat/tomcat/bin
> PS4='+ '
> PWD=/ngs/app/oto2t/Tomcat/bin
> SHELL=/bin/bash
> SHELLOPTS=braceexpand:hashall:interactive-comments:posix
> SHLVL=3
> SPLUNK_ACCESS_LOGS=/ngs/app/oto2t/var/
roadfever.corp.apple.com/accessLogs/Service
> TERM=xterm-256color
> TMOUT=900
> UID=9674
> USER=oto2t
> _=-
> os400=false
> Using CATALINA_BASE:   /ngs/app/oto2t/Tomcat/Service
> Using CATALINA_HOME:   /ngs/app/oto2t/Tomcat/tomcat
> Using CATALINA_TMPDIR: /ngs/app/oto2t/Tomcat/Service/temp
> Using JRE_HOME:/ngs/app/oto2t/java_home
> Using CLASSPATH:
/ngs/app/oto2t/Tomcat/tomcat/bin/bootstrap.jar:/ngs/app/oto2t/Tomcat/tomcat/bin/tomcat-juli.jar
> Using CATALINA_PID:/ngs/app/oto2t/Tomcat/Service/tomcat_7802.pid
> Existing PID file found during start.
> Removing/clearing stale PID file.

And you are starting the server how?


Re: Tuning session replication on clusters

2012-09-05 Thread Igor Cicimov
On Thu, Sep 6, 2012 at 5:51 AM,  wrote:

>
> I have a small cluster of 3 nodes running tomcat 6.0.24 with openJDK
> 1.6.0_20 on Ubuntu 10.04 LTS.
>
> I have roughly 5,000-6,000 sessions at any given time, and when I restart
> one of the nodes I am finding that not all sessions are getting
> replicated , even when I have the state transfer  timeout set to 60
> seconds.
>
> It seems that only sessions that have been touched recently are replicated,
> even if the session is still otherwise valid. I did one test where I
> created about 1,500 sessions and then took out one node, When I brought it
> back online, it only replicated the 4-5 sessions that were from active
> users on the test cluster. It did not replicated the idle sessions that
> were still valid that my prior test had created.
>
> I  am wanting to tune my settings, but I am unsure where would be the best
> place to start. Should I start with the threads available to the NIO
> Receiver, or would I be better off focusing on a different set of
> attributes first, such as the send or receive timeout values?
>
> Any tips or pointers as to which setting might be the most productive would
> be greatly appreciated.
>
> Lee Lowder
> O'Reilly Auto Parts
> Web Systems Administrator
> (417) 862-2674 x1858
>
> This communication and any attachments are confidential, protected by
> Communications Privacy Act 18 USCS § 2510, solely for the use of the
> intended recipient, and may contain legally privileged material. If you are
> not the intended recipient, please return or destroy it immediately. Thank
> you.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
For starter does your cluster satisfy the requirements bellow?

To run session replication in your Tomcat 6.0 container, the following
steps should be completed:

   - All your session attributes must implement java.io.Serializable
   - Uncomment the Cluster element in server.xml
   - If you have defined custom cluster valves, make sure you have the
   ReplicationValve defined as well under the Cluster element in server.xml
   - If your Tomcat instances are running on the same machine, make sure
   the tcpListenPort attribute is unique for each instance, in most cases
   Tomcat is smart enough to resolve this on it's own by autodetecting
   available ports in the range 4000-4100
   - Make sure your web.xml has the  element
   - If you are using mod_jk, make sure that jvmRoute attribute is set at
   your Engine  and that the
   jvmRoute attribute value matches your worker name in workers.properties
   - Make sure that all nodes have the same time and sync with NTP service!
   - Make sure that your loadbalancer is configured for sticky session mode.


Also you don't say what are you using for load balancing? Not bad to post
your cluster definition as well.


Re: Tuning session replication on clusters

2012-09-05 Thread Igor Cicimov
On Thu, Sep 6, 2012 at 11:59 AM,  wrote:

> Alright, I did some more testing with another application and found the
> following:
>
> SessTime (sec
> 10  0.101
> 125 0.101
> 500 0.201
> 15000.201
> 18000.101
> 24000.101
> 42,000  0.901  (that's not a typo)
>
> Turns out the application that was having trouble is storing a silly amount
> of crap in the session.  I am still not 100% sure what's happening behind
> the scenes at the 1500 session mark, but I'm guessing that based on our
> session size (nearly 700 MB) and memory configuration we were hitting some
> heap ceiling and the replication was forced to 'juggle'.  If anyone has any
> more background on what's happening feel free to set me straight.
>
> I'll check back later... I need to go beat some developers...
>
>
> Kyle Harper
>
>
>
>
> From:   kharp...@oreillyauto.com
> To: "Tomcat Users List" 
> Date:   09/05/2012 07:55 PM
> Subject:Re: Tuning session replication on clusters
>
>
>
> I'm working with Lee on this as well, so I can help answer most of that.
>
> In short:  Yes, all our replication is working well.  We have keepalived
> acting as a vrrp device (no round-robin dns) in front of a few web servers
> (apache 2.2.x, mod_proxy/mod_ajp) which are using stickysessions and
> BalancerMembers.  Replication (DeltaManager/SimpleTCPCluster)  is working
> as intended on the tomcat side (6.0.24).
>
> After further research, the problem we're seeing is performance with
> replication when the number of sessions is larger than around 2000.  Using
> Jmeter on our test servers I can reproduce the problem.  Here are the times
> it takes to replicate X number of sessions when an application is
> restarted:
> Sess   Time (sec)
> 10   0.101
> 125  0.401
> 500  1.302
> 1500 2.104
> 1800 5.308
> 1800 6.709
> 2400 15.02
> 3600 30.285
> 3600 27.238
>
> The times make sense until around 1500.  The time it takes to replicate
> more than 1500 sessions becomes exponentially worse.  Here is our cluster
> configuration from "node1":
>  jvmRoute="tntest-app-a-1">
>channelSendOptions="8">
>   stateTransferTimeout="45"
>  expireSessionsOnShutdown="false"
>  notifyListenersOnReplication="true" />
> 
>className="org.apache.catalina.tribes.membership.McastService"
>   address="239.255.0.1"
>   port="45564"
>   frequency="500"
>   dropTime="3000" />
>
>className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> address="auto"
> port="4000"
> autoBind="100"
> selectorTimeout="5000"
> maxThreads="6" />
>
>className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>  className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"
> timeout="45000" />
>   
>
>   
> className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>
>   
> className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>
> 
>
>  filter=""/>
>  className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>
> 
> className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>
>  className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>   
>
>
> The best time we got for 3600 sessions was 24 seconds, and that's when I
> added the following to the Manager tag (stole this from the 5.5 docs; not
> even sure it's valid in 6.x):
>  sendAllSessions="false"
>  sendAllSessionsSize="500"
>  sendAllSessionsWait="20"
>
>
> What has me stumped is why the time required to do more sessions is
> exponentially higher beyond 1500 sessions.  Using JMeter I can simulate
> 3600 new users (all creating a session) and the two servers can serve the
> requests AND generate/replicate the sessions in under 19 seconds.  Any
> ideas would be great

Re: Tomcat 7 manager quirk?

2012-10-26 Thread Igor Cicimov
On 27/10/2012 5:27 AM, "Josh Gooding"  wrote:
>
> Hey group,
>
> I'm working with Tomcat 7's manager application for text deployments.  I
am
> having a bit of a quirky issue here.  I am deploying a web application
that
> is approx 75MB as a war file that uses Tomcat's ROOT context.
>
> Is there a way that I can get tomcat to NOT start auto-deploying
> immediately when the manager is invoked with a deploy / update command?
> Something like a check to see if the web application has fully uploaded?
> Is there currently a work around for this?
>
> When I run the command: curl -k --upload-file ROOT.war
> https://[manageruser]:[pwd]@[fqd
> name]:8443/manager/text/deploy?path=/ROOT&war=ROOT.war&update=true, I get
> many different exceptions.
>

I dont think its tomcat fault it is you telling it to deploy with the above
command while the upload is still in progress. You should search for some
kind of delay or timeout in curl or find other way of doing this.

>  If I go to push the webapp as a new application, I an riddled with
> multiple exceptions:
>
> SEVERE: Error starting static Resources
> java.lang.IllegalArgumentException: Invalid or unreadable WAR file : error
> in opening zip file
> at
>
org.apache.naming.resources.WARDirContext.setDocBase(WARDirContext.java:141)
>
> SEVERE: Exception fixing docBase for context []
> java.util.zip.ZipException: error in opening zip file
> at java.util.zip.ZipFile.open(Native Method)
>
>  and of course how could I forget
>
> SEVERE: Error deploying web application archive
> /opt/apache-tomcat-7.0.30/webapps/ROOT.war
> java.lang.IllegalArgumentException: addChild:  Child name '' is not
unique.
>
> A simple restart fixes this... but that's really counter intuitive and
very
> invasive.
>
>
>
> Obviously there is something that I am doing wrong, but I can't figure it
> out.  What I see happening is that TC is getting the file, and instead of
> waiting for the entire file (the web app is 75MB), tries to immediately
> redeploy it.
>
> 1 - Is there a way to force tomcat to wait until the uploading of the
> application is complete?
> 2 - If so, how?


Re: Implementing SSL and error invocating https://localhost:8443/ (Tomcat 7.0 on Windows 7)

2012-10-26 Thread Igor Cicimov
On 27/10/2012 9:37 AM, "Gabriel Huerta Araujo" 
wrote:
>
> I have followed below steps:
>
> 1.- Erase keytore
> keytool -delete -keystore .keystore -storepass x_men_gha
>
> 2.- List to verify if it has been deleted.
> keytool -list  -storepass x_men_gha
> Tipo de almacÚn de claves: JKS
> Proveedor de almacÚn de claves: SUN
>
> Su almacÚn de claves contiene 0 entradas
>
> 3.- Create as stated:
> keytool -genkey -alias tomcat -keyalg RSA
> Escriba la contrase±a del almacÚn de claves:
> La contrase±a del almacÚn de claves es demasiado corta, debe tener al
menos 6 ca
> racteres
> Escriba la contrase±a del almacÚn de claves:
> ┐Cußles son su nombre y su apellido?
>   [Unknown]:  Gabriel Huerta
> ┐Cußl es el nombre de su unidad de organizaci¾n?
>   [Unknown]:  Desarrollo
> ┐Cußl es el nombre de su organizaci¾n?
>   [Unknown]:  Hildebrando
> ┐Cußl es el nombre de su ciudad o localidad?
>   [Unknown]:  Queretaro
> ┐Cußl es el nombre de su estado o provincia?
>   [Unknown]:  Santiago
> ┐Cußl es el c¾digo de paÝs de dos letras de la unidad?
>   [Unknown]:  MX
> ┐Es correcto CN=Gabriel Huerta, OU=Desarrollo, O=Hildebrando,
L=Queretaro, ST=Sa
> ntiago, C=MX?
>   [no]:  y
>
> Escriba la contrase±a clave para 
> (INTRO si es la misma contrase±a que la del almacÚn de claves):
>
>
> 4.- List to verify it:
> C:\Users\Gabriel Huerta>keytool -list
> Escriba la contrase±a del almacÚn de claves:
>
> Tipo de almacÚn de claves: JKS
> Proveedor de almacÚn de claves: SUN
>
> Su almacÚn de claves contiene entrada 1
>
> tomcat, 26/10/2012, PrivateKeyEntry,
> Huella digital de certificado (MD5):
00:37:8B:7F:F1:A4:B6:EE:8F:00:69:95:0A:A8:AD:14
>
>
> 5.- Import certificate as stated for Tomcat documentation:
>  For Verisign.com trial certificates go to:
http://www.verisign.com/support/verisign-intermediate-ca/Trial_Secure_Server_Root/index.html
>
> Once there I followed instructions where says "Click here to go to the
Installation Instructions", basically I copied below message and pasted it
into a file named certif.cer:
> -BEGIN CERTIFICATE-
> MIIEVzCCAz+gAwIBAgIQFoFkpCjKEt+rEvGfsbk1VDANBgkqhkiG9w0BAQUFADCB
> jDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTAwLgYDVQQL
> EydGb3IgVGVzdCBQdXJwb3NlcyBPbmx5LiAgTm8gYXNzdXJhbmNlcy4xMjAwBgNV
> BAMTKVZlcmlTaWduIFRyaWFsIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQSAtIEcyMB4X
> DTA5MDQwMTAwMDAwMFoXDTI5MDMzMTIzNTk1OVowgYwxCzAJBgNVBAYTAlVTMRcw
> FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEwMC4GA1UECxMnRm9yIFRlc3QgUHVycG9z
> ZXMgT25seS4gIE5vIGFzc3VyYW5jZXMuMTIwMAYDVQQDEylWZXJpU2lnbiBUcmlh
> bCBTZWN1cmUgU2VydmVyIFJvb3QgQ0EgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQAD
> ggEPADCCAQoCggEBAMCJggWnSVAcIomnvCFhXlCdgafCKCDxVSNQY2jhYGZXcZsq
> ToJmDQ7b9JO39VCPnXELOENP2+4FNCUQnzarLfghsJ8kQ9pxjRTfcMp0bsH+Gk/1
> qLDgvf9WuiBa5SM/jXNvroEQZwPuMZg4r2E2k0412VTq9ColODYNDZw3ziiYdSjV
> fY3VfbsLSXJIh2jaJC5kVRsUsx72s4/wgGXbb+P/XKr15nMIB0yH9A5tiCCXQ5nO
> EV7/ddZqmL3zdeAtyGmijOxjwiy+GS6xr7KACfbPEJYZYaS/P0wctIOyQy6CkNKL
> o5vDDkOZks0zjf6RAzNXZndvsXEJpQe5WO1avm8CAwEAAaOBsjCBrzAPBgNVHRMB
> Af8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjBtBggrBgEFBQcBDARhMF+hXaBbMFkw
> VzBVFglpbWFnZS9naWYwITAfMAcGBSsOAwIaBBSP5dMahqyNjmvDz4Bq1EgYLHsZ
> LjAlFiNodHRwOi8vbG9nby52ZXJpc2lnbi5jb20vdnNsb2dvLmdpZjAdBgNVHQ4E
> FgQUSBnnkm+SnTRjmcDwmcjWpYyMf2UwDQYJKoZIhvcNAQEFBQADggEBADuswa8C
> 0hunHp17KJQ0WwNRQCp8f/u4L8Hz/TiGfybnaMXgn0sKI8Xe79iGE91M7vrzh0Gt
> ap0GLShkiqHGsHkIxBcVMFbEQ1VS63XhTeg36cWQ1EjOHmu+8tQe0oZuwFsYYdfs
> n4EZcpspiep9LFc/hu4FE8SsY6MiasHR2Ay97UsC9A3S7ZaoHfdwyhtcINXCu2lX
> W0Gpi3vzWRvwqgua6dm2WVKJfvPfmS1mAP0YmTcIwjdiNXiU6sSsJEoNlTR9zCoo
> 4oKQ8wVoWZpbuPZb5geszhS7YsABUPIAAfF1YQCiMULtpa6HFzzm7sdf72N3HfwE
> aQNg95KnKGrrDUI=
> -END CERTIFICATE-
>
> Below are all instructions stated for this place which I have follwed:
>
> Installation Instructions
> For Microsoft Browsers
>
> 1.Click on the "Secure Site Trial Root Certificate" link above.
> 2.Save the certificate into a file with a .cer extension.
> 3.Open a Microsoft IE Browser.
> 4.Go to Tools > Internet Options > Content > Certificates
> 5.Click Import. A certificate manager Import Wizard will appear. Click
Next.
> 6.Browse to the location of the recently stored root (done in step 2).
Select ALL files for file type.
> 7.Select the certificate and click Open.
> 8.Click Next.
> 9.Select "Automatically select the certificate store based on the type of
the certificate". Click Ok.
> 10.Click Next then Finish.
> 11.When prompted and asked if you wish to add the following certificate
to the root store, click Yes.
>
> For last step I was not asked to add trial certificate to the root store.
>
>
> I did not do below steps(stated from Tomcat documentation), because these
ones require keystore file:
>
> "Import the Chain Certificate into your keystore
>
>  keytool -import -alias root -keystore  \
> -trustcacerts -file 
>
>
> And finally import your new Certificate
>
>  keytool -import -alias tomcat -keystore  \
> -file "
>
>
>
> 6.- Restart tomcat: It did not generate any error, but when I open IE
with link https:/

Re: Implementing SSL and error invocating https://localhost:8443/ (Tomcat 7.0 on Windows 7)

2012-10-26 Thread Igor Cicimov
On 27/10/2012 10:09 AM, "Gabriel Huerta Araujo" 
wrote:
>
> I used logangha(which is my computer name) instead of localhost but again
I had to click the Information bar to display the content (not recommended).
>

So you got the cert for logangha??? Again, you should match the name of the
domain you got the certificate for not the server name. Meaning you need
dns resolution for that name on your server or local network to point to
the ip of the server. Thats easy done in linux by editing the /etc/hosts
file, not sure about windows. Google is your friend i think there should be
simmilar file too.

>
> Regards.
>
> - Original Message -
> From: "Igor Cicimov" 
> To: "Tomcat Users List" 
> Sent: Friday, October 26, 2012 5:41:59 PM
> Subject: Re: Implementing SSL and error invocating 
> https://localhost:8443/(Tomcat 7.0 on Windows 7)
>
> On 27/10/2012 9:37 AM, "Gabriel Huerta Araujo" 
> wrote:
> >
> > I have followed below steps:
> >
> > 1.- Erase keytore
> > keytool -delete -keystore .keystore -storepass x_men_gha
> >
> > 2.- List to verify if it has been deleted.
> > keytool -list  -storepass x_men_gha
> > Tipo de almacÚn de claves: JKS
> > Proveedor de almacÚn de claves: SUN
> >
> > Su almacÚn de claves contiene 0 entradas
> >
> > 3.- Create as stated:
> > keytool -genkey -alias tomcat -keyalg RSA
> > Escriba la contrase±a del almacÚn de claves:
> > La contrase±a del almacÚn de claves es demasiado corta, debe tener al
> menos 6 ca
> > racteres
> > Escriba la contrase±a del almacÚn de claves:
> > ┐Cußles son su nombre y su apellido?
> >   [Unknown]:  Gabriel Huerta
> > ┐Cußl es el nombre de su unidad de organizaci¾n?
> >   [Unknown]:  Desarrollo
> > ┐Cußl es el nombre de su organizaci¾n?
> >   [Unknown]:  Hildebrando
> > ┐Cußl es el nombre de su ciudad o localidad?
> >   [Unknown]:  Queretaro
> > ┐Cußl es el nombre de su estado o provincia?
> >   [Unknown]:  Santiago
> > ┐Cußl es el c¾digo de paÝs de dos letras de la unidad?
> >   [Unknown]:  MX
> > ┐Es correcto CN=Gabriel Huerta, OU=Desarrollo, O=Hildebrando,
> L=Queretaro, ST=Sa
> > ntiago, C=MX?
> >   [no]:  y
> >
> > Escriba la contrase±a clave para 
> > (INTRO si es la misma contrase±a que la del almacÚn de claves):
> >
> >
> > 4.- List to verify it:
> > C:\Users\Gabriel Huerta>keytool -list
> > Escriba la contrase±a del almacÚn de claves:
> >
> > Tipo de almacÚn de claves: JKS
> > Proveedor de almacÚn de claves: SUN
> >
> > Su almacÚn de claves contiene entrada 1
> >
> > tomcat, 26/10/2012, PrivateKeyEntry,
> > Huella digital de certificado (MD5):
> 00:37:8B:7F:F1:A4:B6:EE:8F:00:69:95:0A:A8:AD:14
> >
> >
> > 5.- Import certificate as stated for Tomcat documentation:
> >  For Verisign.com trial certificates go to:
>
http://www.verisign.com/support/verisign-intermediate-ca/Trial_Secure_Server_Root/index.html
> >
> > Once there I followed instructions where says "Click here to go to the
> Installation Instructions", basically I copied below message and pasted it
> into a file named certif.cer:
> > -BEGIN CERTIFICATE-
> > MIIEVzCCAz+gAwIBAgIQFoFkpCjKEt+rEvGfsbk1VDANBgkqhkiG9w0BAQUFADCB
> > jDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTAwLgYDVQQL
> > EydGb3IgVGVzdCBQdXJwb3NlcyBPbmx5LiAgTm8gYXNzdXJhbmNlcy4xMjAwBgNV
> > BAMTKVZlcmlTaWduIFRyaWFsIFNlY3VyZSBTZXJ2ZXIgUm9vdCBDQSAtIEcyMB4X
> > DTA5MDQwMTAwMDAwMFoXDTI5MDMzMTIzNTk1OVowgYwxCzAJBgNVBAYTAlVTMRcw
> > FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEwMC4GA1UECxMnRm9yIFRlc3QgUHVycG9z
> > ZXMgT25seS4gIE5vIGFzc3VyYW5jZXMuMTIwMAYDVQQDEylWZXJpU2lnbiBUcmlh
> > bCBTZWN1cmUgU2VydmVyIFJvb3QgQ0EgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQAD
> > ggEPADCCAQoCggEBAMCJggWnSVAcIomnvCFhXlCdgafCKCDxVSNQY2jhYGZXcZsq
> > ToJmDQ7b9JO39VCPnXELOENP2+4FNCUQnzarLfghsJ8kQ9pxjRTfcMp0bsH+Gk/1
> > qLDgvf9WuiBa5SM/jXNvroEQZwPuMZg4r2E2k0412VTq9ColODYNDZw3ziiYdSjV
> > fY3VfbsLSXJIh2jaJC5kVRsUsx72s4/wgGXbb+P/XKr15nMIB0yH9A5tiCCXQ5nO
> > EV7/ddZqmL3zdeAtyGmijOxjwiy+GS6xr7KACfbPEJYZYaS/P0wctIOyQy6CkNKL
> > o5vDDkOZks0zjf6RAzNXZndvsXEJpQe5WO1avm8CAwEAAaOBsjCBrzAPBgNVHRMB
> > Af8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjBtBggrBgEFBQcBDARhMF+hXaBbMFkw
> > VzBVFglpbWFnZS9naWYwITAfMAcGBSsOAwIaBBSP5dMahqyNjmvDz4Bq1EgYLHsZ
> > LjAlFiNodHRwOi8vbG9nby52ZXJpc2lnbi5jb20vdnNsb2dvLmdpZjAdBgNVHQ4E
> > FgQUSBnnkm+SnTRjmcDwmcjWpYyMf2UwDQYJKoZIhvcNAQEFBQADggEBADuswa8C
> > 0hunHp17KJQ0WwNRQCp8f/u4L8Hz/TiGfybnaMXgn0sKI8Xe79iGE91M7vrzh0Gt
> > ap0GLShkiqHGsHkIxBcVMFbEQ1VS63XhTeg36cWQ1EjOHmu+8tQe

Re: Implementing SSL and error invocating https://localhost:8443/ (Tomcat 7.0 on Windows 7)

2012-10-26 Thread Igor Cicimov
On 27/10/2012 11:22 AM, "Gabriel Huerta Araujo" 
wrote:
>
> Is it enough with putting a line into this file like this?:
>
> 192.168.30.73 logangha
>
> Where 192.168.30.73 is my IP
>

192.168.30.73 logangha THE-DOMAIN-NAME-FROM-THE-CERTIFICATE

This should work.eg:

192.168.30.73 logangha mydomai.com

And access with:

http://mydomain.com

> - Original Message -
> From: "Gabriel Huerta Araujo" 
> To: "Tomcat Users List" 
> Sent: Friday, October 26, 2012 7:15:26 PM
> Subject: Re: Implementing SSL and error invocating 
> https://localhost:8443/(Tomcat 7.0 on Windows 7)
>
> This is my hosts file's content:
>
> 10.254.5.1  sigcbd01#10.192.19.1   sigc
> 10.254.4.63 sdswbd01#10.192.17.66sadigeo
> 10.254.2.248nsisba01
>
> None of these IP's is my domain. How do I configure dns resolution for
such name on my computer to point to
> the ip of my laptop? As I am testing I am using my laptop with Windows 7
installed.
>
> Regards.
>
> - Original Message -
> From: "Igor Cicimov" 
> To: "Tomcat Users List" 
> Sent: Friday, October 26, 2012 6:21:49 PM
> Subject: Re: Implementing SSL and error invocating 
> https://localhost:8443/(Tomcat 7.0 on Windows 7)
>
> On 27/10/2012 10:09 AM, "Gabriel Huerta Araujo" 
> wrote:
> >
> > I used logangha(which is my computer name) instead of localhost but
again
> I had to click the Information bar to display the content (not
recommended).
> >
>
> So you got the cert for logangha??? Again, you should match the name of
the
> domain you got the certificate for not the server name. Meaning you need
> dns resolution for that name on your server or local network to point to
> the ip of the server. Thats easy done in linux by editing the /etc/hosts
> file, not sure about windows. Google is your friend i think there should
be
> simmilar file too.
>
> >
> > Regards.
> >
> > - Original Message -
> > From: "Igor Cicimov" 
> > To: "Tomcat Users List" 
> > Sent: Friday, October 26, 2012 5:41:59 PM
> > Subject: Re: Implementing SSL and error invocating
https://localhost:8443/(Tomcat 7.0 on Windows 7)
> >
> > On 27/10/2012 9:37 AM, "Gabriel Huerta Araujo" 
> > wrote:
> > >
> > > I have followed below steps:
> > >
> > > 1.- Erase keytore
> > > keytool -delete -keystore .keystore -storepass x_men_gha
> > >
> > > 2.- List to verify if it has been deleted.
> > > keytool -list  -storepass x_men_gha
> > > Tipo de almacÚn de claves: JKS
> > > Proveedor de almacÚn de claves: SUN
> > >
> > > Su almacÚn de claves contiene 0 entradas
> > >
> > > 3.- Create as stated:
> > > keytool -genkey -alias tomcat -keyalg RSA
> > > Escriba la contrase±a del almacÚn de claves:
> > > La contrase±a del almacÚn de claves es demasiado corta, debe tener al
> > menos 6 ca
> > > racteres
> > > Escriba la contrase±a del almacÚn de claves:
> > > ┐Cußles son su nombre y su apellido?
> > >   [Unknown]:  Gabriel Huerta
> > > ┐Cußl es el nombre de su unidad de organizaci¾n?
> > >   [Unknown]:  Desarrollo
> > > ┐Cußl es el nombre de su organizaci¾n?
> > >   [Unknown]:  Hildebrando
> > > ┐Cußl es el nombre de su ciudad o localidad?
> > >   [Unknown]:  Queretaro
> > > ┐Cußl es el nombre de su estado o provincia?
> > >   [Unknown]:  Santiago
> > > ┐Cußl es el c¾digo de paÝs de dos letras de la unidad?
> > >   [Unknown]:  MX
> > > ┐Es correcto CN=Gabriel Huerta, OU=Desarrollo, O=Hildebrando,
> > L=Queretaro, ST=Sa
> > > ntiago, C=MX?
> > >   [no]:  y
> > >
> > > Escriba la contrase±a clave para 
> > > (INTRO si es la misma contrase±a que la del almacÚn de
claves):
> > >
> > >
> > > 4.- List to verify it:
> > > C:\Users\Gabriel Huerta>keytool -list
> > > Escriba la contrase±a del almacÚn de claves:
> > >
> > > Tipo de almacÚn de claves: JKS
> > > Proveedor de almacÚn de claves: SUN
> > >
> > > Su almacÚn de claves contiene entrada 1
> > >
> > > tomcat, 26/10/2012, PrivateKeyEntry,
> > > Huella digital de certificado (MD5):
> > 00:37:8B:7F:F1:A4:B6:EE:8F:00:69:95:0A:A8:AD:14
> > >
> > >
> > > 5.- Import certificate as stated for Tomcat documentation:
> > >  For Verisign.com trial certificates go to:
> >
>
http://www.verisign.com/support/verisign-intermediate-ca/Tria

Re: tomcat 6.0.32 stops expiring sessions

2012-11-05 Thread Igor Cicimov
On 05/11/2012 6:50 PM, "Altmeier, Christian" <
christian.altme...@softwareag.com> wrote:
>
> Hi,
> I have a big problem. After some time, tomcat stops expiring sessions.
> We have enabled logging for org.apache.catalina.session.ManagerBase. So
we see that at first everything works fine and suddenly sessions didn't
expire anymore.
> Before tomcat stops expiring sessions, it is noticeable that some
sessions need a lot of time to expire (10 - 30 minutes). In this time,
other session expire as expected.

Isnt that what you would expect if some users stay active for longer? Have
you confirmed that the long lasting sessions are idle? I think default
session timeout in tomcat is 30 minutes so are you saying you have changed
that to a lower value but its not working?

> I hope someone has an idea.
>
> Tomcat runs  on a 64bit Linux server.
>
> Greeting
> IDS Scheer Consulting GmbH
> Gesch?ftsf?hrer/Managing Directors: Michael Rehm, Ivo Totev
> Sitz/Registered office: Altenkesseler Stra?e 17, 66115 Saarbr?cken,
Germany - Registergericht/Commercial register: Saarbr?cken HRB 19681
> http://www.ids-scheer-consulting.com
>


Re: AW: tomcat 6.0.32 stops expiring sessions

2012-11-05 Thread Igor Cicimov
On 05/11/2012 8:41 PM, "Altmeier, Christian" <
christian.altme...@softwareag.com> wrote:
>
> No that's OK, I don't mean the time a user stays inactive for some
minutes.
> The session timeout is set to 66 minutes.
> I have sessions which are inactive for 70 hours ...

Which tomcat version? Are they SSL sessions by some chance? Actually can
you post here your Connector config please?
>
> -Ursprüngliche Nachricht-
> Von: Igor Cicimov [mailto:icici...@gmail.com]
> Gesendet: Montag, 5. November 2012 10:26
> An: Tomcat Users List
> Betreff: Re: tomcat 6.0.32 stops expiring sessions
>
> On 05/11/2012 6:50 PM, "Altmeier, Christian" <
christian.altme...@softwareag.com> wrote:
> >
> > Hi,
> > I have a big problem. After some time, tomcat stops expiring sessions.
> > We have enabled logging for org.apache.catalina.session.ManagerBase.
> > So
> we see that at first everything works fine and suddenly sessions didn't
expire anymore.
> > Before tomcat stops expiring sessions, it is noticeable that some
> sessions need a lot of time to expire (10 - 30 minutes). In this time,
other session expire as expected.
>
> Isnt that what you would expect if some users stay active for longer?
Have you confirmed that the long lasting sessions are idle? I think default
session timeout in tomcat is 30 minutes so are you saying you have changed
that to a lower value but its not working?
>
> > I hope someone has an idea.
> >
> > Tomcat runs  on a 64bit Linux server.
> >
> > Greeting
> > IDS Scheer Consulting GmbH
> > Gesch?ftsf?hrer/Managing Directors: Michael Rehm, Ivo Totev
> > Sitz/Registered office: Altenkesseler Stra?e 17, 66115 Saarbr?cken,
> Germany - Registergericht/Commercial register: Saarbr?cken HRB 19681
> > http://www.ids-scheer-consulting.com
> >
> IDS Scheer Consulting GmbH
> Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
> Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken,
Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
> http://www.ids-scheer-consulting.com
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: AW: AW: tomcat 6.0.32 stops expiring sessions

2012-11-05 Thread Igor Cicimov
On 05/11/2012 10:01 PM, "Altmeier, Christian" <
christian.altme...@softwareag.com> wrote:
>
> Yes we are using SSL.

The default session timeout for ssl in tomcat6 is 24 hours, maybe that
explains why.

> Tomcat 6.0.32
> Our connector config:
> 
>
> -Ursprüngliche Nachricht-
> Von: Igor Cicimov [mailto:icici...@gmail.com]
> Gesendet: Montag, 5. November 2012 10:56
> An: Tomcat Users List
> Betreff: Re: AW: tomcat 6.0.32 stops expiring sessions
>
> On 05/11/2012 8:41 PM, "Altmeier, Christian" <
> christian.altme...@softwareag.com> wrote:
> >
> > No that's OK, I don't mean the time a user stays inactive for some
> minutes.
> > The session timeout is set to 66 minutes.
> > I have sessions which are inactive for 70 hours ...
>
> Which tomcat version? Are they SSL sessions by some chance? Actually can
> you post here your Connector config please?
> >
> > -Ursprüngliche Nachricht-
> > Von: Igor Cicimov [mailto:icici...@gmail.com]
> > Gesendet: Montag, 5. November 2012 10:26
> > An: Tomcat Users List
> > Betreff: Re: tomcat 6.0.32 stops expiring sessions
> >
> > On 05/11/2012 6:50 PM, "Altmeier, Christian" <
> christian.altme...@softwareag.com> wrote:
> > >
> > > Hi,
> > > I have a big problem. After some time, tomcat stops expiring sessions.
> > > We have enabled logging for org.apache.catalina.session.ManagerBase.
> > > So
> > we see that at first everything works fine and suddenly sessions didn't
> expire anymore.
> > > Before tomcat stops expiring sessions, it is noticeable that some
> > sessions need a lot of time to expire (10 - 30 minutes). In this time,
> other session expire as expected.
> >
> > Isnt that what you would expect if some users stay active for longer?
> Have you confirmed that the long lasting sessions are idle? I think
default
> session timeout in tomcat is 30 minutes so are you saying you have changed
> that to a lower value but its not working?
> >
> > > I hope someone has an idea.
> > >
> > > Tomcat runs  on a 64bit Linux server.
> > >
> > > Greeting
> > > IDS Scheer Consulting GmbH
> > > Gesch?ftsf?hrer/Managing Directors: Michael Rehm, Ivo Totev
> > > Sitz/Registered office: Altenkesseler Stra?e 17, 66115 Saarbr?cken,
> > Germany - Registergericht/Commercial register: Saarbr?cken HRB 19681
> > > http://www.ids-scheer-consulting.com
> > >
> > IDS Scheer Consulting GmbH
> > Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
> > Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken,
> Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
> > http://www.ids-scheer-consulting.com
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> IDS Scheer Consulting GmbH
> Geschäftsführer/Managing Directors: Michael Rehm, Ivo Totev
> Sitz/Registered office: Altenkesseler Straße 17, 66115 Saarbrücken,
Germany - Registergericht/Commercial register: Saarbrücken HRB 19681
> http://www.ids-scheer-consulting.com
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: AW: AW: tomcat 6.0.32 stops expiring sessions

2012-11-05 Thread Igor Cicimov
On 06/11/2012 6:43 AM, "Christopher Schultz" 
wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Igor,
>
> On 11/5/12 8:01 AM, Igor Cicimov wrote:
> > On 05/11/2012 10:01 PM, "Altmeier, Christian" <
> > christian.altme...@softwareag.com> wrote:
> >>
> >> Yes we are using SSL.
> >
> > The default session timeout for ssl in tomcat6 is 24 hours, maybe
> > that explains why.
>
> Uh, what?

Hi Chris, I got this from the config page
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
where at the bottom under SSL support it says the default sessionTimeout is
24 hours if not specified.

>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iEYEARECAAYFAlCYFq0ACgkQ9CaO5/Lv0PA9GwCgsi0XC263ZmYvc+7WkQuNm9t1
> pjsAoJsYXtiXPA5KVb9ySjf8Rq2nlYcn
> =CHHa
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: SSL Certificate Help

2012-11-07 Thread Igor Cicimov
On Thu, Nov 8, 2012 at 8:32 AM, Alissa Schneider
wrote:

> Yes, I have...many, many times. But good question!
>
> -Original Message-
> From: James Lampert [mailto:jam...@touchtonecorp.com]
> Sent: Wednesday, November 07, 2012 3:28 PM
> To: Tomcat Users List
> Subject: Re: SSL Certificate Help
>
> Alissa Schneider wrote:
>
> > Still, when I visit https://localhost:8443, the browser throws a
> > certificate warning. When I click on the certificate warning and view
> > certificate, it displays information on my self-signed certificate
> > (that I've deleted). I think if I could figure out how to make Tomcat
> > point to the CA certificate instead of the old one, this would work
> > for me. However, I'm not sure how to clear the Tomcat "cache" so to
> > speak.
>
>
> Did you restart Tomcat?
>
> --
> JHHL
>
> -
> 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
>
>
Sounds like your browser is still caching your old one. If Firefox then go
to
Tools->Options->Advanced->View Certificates button and delete the
certificate(s) for the localhost.


Re: Modify Cache-Control header

2012-11-16 Thread Igor Cicimov
On 17/11/2012 7:38 AM, "Jose María Zaragoza"  wrote:
>
> Hi:
>
> I'm using Tomcat 6  ( I don't remember the exact release, I hope to be
> forgiven by Pid )
>
> I need to modify Cache-Control header in some responses ( forcing them
> to not be cached )
> What is the best way to do it ?
>
> a) To implement a Valve ( check request context path and if it match
> ,to modify response header )
> b) To implement a filter
> c) Others  ( any property in Tomcat's configuration files that I don't
know

Or put apache infront and use mod_expiers

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


Re: Tomcat doesn't process error messages

2013-01-02 Thread Igor Cicimov
On Thu, Jan 3, 2013 at 1:33 AM, Husarik, Branko wrote:

> Hello,
>
> I am a bit desperate thanks to my issue with Tomcat, which seems to be
> like common matter. I am using Tomcat 6.0.35 as a proxy between Oracle and
> Web service. Tomcat is running on AIX Version 6.1. There is send request
> http message from Oracle to the Proxy and message is forwarded to the Web
> service as https. Web services responses https message to Proxy and it is
> send back to Oracle as http.
>
> When Web service responds HTTP/1.1 200 OK, everything works well and the
> Soap Message is correctly forwarded back to Oracle.
> When Web service responds HTTP/1.1 500 Internal Server Error, proxy fails
> during getInputStream() method.
> There is thrown IOException and Soap message is not forwarded back. Error
> message is "Server returned HTTP response code: 500 for URL:
> https://hktibt.rdm.cz:39990/"; and cause is null. I tried to add
> getErrorStream() executing in case getInputStream() is not working, but the
> result is null. Please do you know some way, how to process incoming "Error
> messages"? Is it caused by bad setup of configuration?
>
> Thank you very much.
>
> I am attaching both responses from web service:
>
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Content-Length: 878
> Date: Wed, 02 Jan 2013 13:15:24 GMT
>
> http://schemas.xmlsoap.org/soap/envelope/";> xmlns:ns0="http://selfcare.ei.tmobile.cz/datatypes";> xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>VCCNG xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>1201138552 xmlns:ns1="http://messaging.ei.tmobile.net/datatypes"; xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"; xmlns:env="
> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance
> ">saIN-PROCESS
>
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Content-Length: 1407
> Date: Wed, 02 Jan 2013 13:28:33 GMT
> Connection: close
>
> http://schemas.xmlsoap.org/soap/envelope/";> xmlns="">SOAP-ENV:ServerThis is an
> operation implementation generated fault xmlns=""/>http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xmlns:ns="
> http://selfcare.ei.tmobile.cz/datatypes"; xmlns:ns0="
> http://schemas.xmlsoap.org/soap/envelope/";> xmlns:ns0="http://messaging.ei.tmobile.net/datatypes";>VCCNG1213075712 xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>2013-01-02T14:28:33.392+01:00 xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>100204 xmlns:ns1="http://messaging.ei.tmobile.net/datatypes";>Validation
> errorhttp://www.tibco.com/schemas/BS_SA/Internal";>http://selfcare.ei.tmobile.cz/datatypes";>NOT_PROPER_TARIFF xmlns:ns1="http://selfcare.ei.tmobile.cz/datatypes
> ">.
>
> Best Regards
>
> Braňko
>

Shouldn't this be handled by the SOAP service logic running on the tomcat
server?


Re: Secure AJP load balancing problem

2013-01-03 Thread Igor Cicimov
On 04/01/2013 2:25 AM, "Arunkumar Janarthanan" 
wrote:
>
> Thanks Mark, I am working on parallely setting up another environment with
> Tomcat 6.x, however to clear an urgent audit I need to show the Apache
> connector uses secure protocol to exchange the data between Apache and
> tomcat. Both these servers are in DMZ and on different servers.
>
> Hello Chris,
>
> Thanks for your valuable advice, here is how my configuration looks like.
>
> *Apache conf:*
>
> ProxyPassMatch ^/(.*\.jsp|.*\.do)(;jsessionid=.*)?$
> balancer://lb1/$1
>
> *Balancer Conf:*
>
> 
> BalancerMember https://tomcat02.us.rdigest.com:8443
> BalancerMember https://tomcat02.us.rdigest.com:8543
> ProxySet stickysession=JSESSIONID
> ProxySet nofailover=Off
> 
>

Since you have sticky sessions dont you need to set up the jvmRoute in the
tomcat connectors?

> *Tomcat conf:*
>
> Tomcat1:
>
> maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>enableLookups="false" disableUploadTimeout="true"
>acceptCount="100" scheme="https" secure="true"
>clientAuth="false" sslProtocol="TLS"
> />
>
> Tomcat2:
>
> maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
>enableLookups="false" disableUploadTimeout="true"
>acceptCount="100" scheme="https" secure="true"
>clientAuth="false" sslProtocol="TLS"
> />
>
>
> Thanks again for your assistance extended.
>
> Regards,
> Arun Janarthanan
>
> On Wed, Jan 2, 2013 at 10:38 PM, Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> > Arun,
> >
> > On 1/2/13 4:45 PM, Arunkumar Janarthanan wrote:
> > > I have Apache 2.2.22 and Tomcat 5.5 running on SSL 8443, I have
> > > tried my balancer members to use HTTPS port
> >
> > So you are trying to use HTTPS over AJP? Did you mean APR?
> >
> > Please post your  from server.xml and your relevant httpd
> > configuration (e.g. ProxyPass). It would also be helpful if you were
> > to describe any  that you may have in your web
> > application(s).
> >
> > > and finds the JSP pages doing ok for some reason the struts /
> > > action servlets would not accept secure protocol instead it
> > > redirects infinitely with the Tomcat server hostname and non-ssl
> > > port.
> >
> > Try a protocol trace using something like Mozilla Firefox's "web
> > console" or similar tools for other web browsers. This will show you
> > the request as sent by the browser and the response as seen by the
> > browser: it should show the pattern you describe above with more detail.
> >
> > > Anybody had similar experience try configuring secure connectors on
> > > such environment ?
> >
> > FWIW, I use stunnel to secure the back-channel between httpd and
> > Tomcat (using an AJP connector). While I haven't actually
> > performance-tested the two configurations against each other, my
> > rationale for this configuration was to reduce the number of SSL
> > handshakes that occur between httpd and Tomcat. Also, I've always used
> > AJP to tunneling AJP made more sense for us than switching-over to
> > HTTPS reverse-proxying.
> >
> > - -chris
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> > Comment: GPGTools - http://gpgtools.org
> > Comment: Using GnuPG with undefined - http://www.enigmail.net/
> >
> > iEYEAREIAAYFAlDk/TMACgkQ9CaO5/Lv0PAidwCgguSezH47shnxzVXOBF564rFm
> > piIAnAy/8p0uTsF5Uxh2ViGVT7PFwgPY
> > =sm58
> > -END PGP SIGNATURE-
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >


Re: Remove apache tomcat default home page

2013-01-03 Thread Igor Cicimov
On Fri, Jan 4, 2013 at 3:39 PM, ana kando  wrote:

> Hi all,
>
> I just installed a software that bundled with apache tomcat. I
> successfully installed the software and can run the software at
> http://localhost:8080/myapps/
>
> However, when i remove /myapps from browser, it will go directly to apache
> tomcat default page. Cau you help me to remove this page from being display
> when i go to http://localhost:8080/ ??
>
> Here is my tomcat version and operating system spec.
>
>
> Apache Tomcat 5.5.20
> windows server 64 bit
>
>
> I found an article from somewhere in the world to commented out these line
> at file tomcat/conf/web.xml
>
>
> 
> jsp
> *.jsp
> 
> 
> jsp
> *.jspx
> 
>
> 
> index.html
> index.htm
> index.jsp
> 
>
>
> I also have commented out this line from
> file tomcat/webapps/root/WEB-INF/web.xml
>
> 
> index.htm
> 
>
> But still not working. Tomcat default page still there.


The default app is under /ROOT directory so delete/rename it if you want to
get read of it. By the way, what do you expect to see when going to
http://localhost:8080/ in that case? Instead of the default page you'll see
404 error page not found. Is that what you want?


Re: NIO connector issue: SEVERE: Error processing request

2013-01-15 Thread Igor Cicimov
On Wed, Jan 16, 2013 at 9:34 AM, Kevin Priebe wrote:

> Hi,
>
>
>
> We have a setup with Nginx load balancing between 2 clustered tomcat
> instances.  1 instance is on the same server as Nginx and the other is on a
> separate physical server (same rackspace).  We’re using pretty standard
> default settings and are using the NIO tomcat connector.  Tomcat version is
> 7.0.32 running on Debian.
>
>
>
> The problem is with the second tomcat instance where at random times will
> start showing SEVERE errors in the tomcat logs, which gets worse and worse
> until the instance is unusable and has to be restarted.  At first we
> thought it was related to high load, but once it happened early in the
> morning when load was fairly low.  It does seem to happen more often at
> high load times though, and is about once a day, sometimes twice.  AWSTATS
> says we get just over a million hits per day to the secondary tomcat
> instance.  Here’s the errors:
>
>
>
> Jan 15, 2013 11:22:21 AM org.apache.coyote.http11.AbstractHttp11Processor
> process
>
> SEVERE: Error processing request
>
> java.lang.NullPointerException
>
>
>
> Jan 15, 2013 11:22:21 AM org.apache.coyote.http11.AbstractHttp11Processor
> endRequest
>
> SEVERE: Error finishing response
>
> java.lang.NullPointerException
>
> at
> org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:233)
>
> at
> org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:121)
>
> at
> org.apache.coyote.http11.AbstractHttp11Processor.endRequest(AbstractHttp11Processor.java:1653)
>
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1046)
>
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
>
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
>
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>
> at java.lang.Thread.run(Thread.java:722)
>
>
>
>
>
> Nothing else helpful seems to show up in the logs before it starts
> happening.  This ONLY happens on the tomcat instance on a separate machine
> from Nginx.  Any ideas what might be happening and how it can be resolved?
>  We’re not even sure this is related to tomcat or something in the
> communications before it gets to tomcat, but we’re looking at all options
> right now.  Thanks,
>
>
>
> Kevin
>
>
>
>
>
>
>
>   _
>
> I am using the Free version of SPAMfighter <http://www.spamfighter.com/len>
> .
> SPAMfighter has removed 3 of my spam emails to date.
>
> Do you have a slow PC? <
> http://www.spamfighter.com/SLOW-PCfighter?cid=sigen>  Try a free scan!
>
> Hi Kevin,

I'm not nginx nor tomcat expert but it looks like tomcat gets interrupted
during sending the response back ie like the connection gets closed whiles
it's still flushing the output buffer.
Have you done any tuning of the http connections and tcp timeout maybe in
nginx and set the timeout too low? Have you checked for possible network
latency (I know you said they are in the same rackspace but doesn't hurt to
ask), switch problems etc? What else is between nginx and tomcat 2? Can you
see in the nginx logs how much time the requests to instance 1 and instance
2 take? Also by comparing timestamps you should be able to find in nginx
the request that failed (there must be error on nginx side too) and see if
it happens on small or big data streams (check the data size in the log
line) etc.

So my point is start troubleshooting on nginx side until you get response
from some of the more experienced tomcat users/developers here :) And get
ready to send your NIO connector and related nginx settings too I would say
:)

Igor


Re: Help in diagnosing server unresponsiveness

2013-01-31 Thread Igor Cicimov
On 01/02/2013 12:37 PM, "Zoran Avtarovski"  wrote:
>
> Hi Guys,
>
> We have a application running on the latest Tomcat7 and we are getting a
> server crash or becoming unresponsive. This occur every few days at no
fixed
> intervals or time of day and they certainly don't correlate to any app
> function ­ at least not according to the logs.
>
> We set setup monitoring using JavaMelody and what we see is dramatic
spikes
> in CPU and memory usage at the time of the crash.
>
> Memory hovers around 3-5% for the rest of the time and CPU is the same.
>
> I've looked at the number of sessions, HTTP activity , jdbc activity and
> nothing obvious jumps out.
>
> I'd really appreciate your collective wisdom in putting into practice some
> strategies to identify the cause of the spikes. This driving me and my
team
> nuts.
>
> Any help would be appreciated.
>
> Z.
>
>
Take couple of thread dumps during the high cpu usage.


Re: Help in diagnosing server unresponsiveness

2013-02-02 Thread Igor Cicimov
On 03/02/2013 3:17 PM, "Zoran Avtarovski"  wrote:
>
> Hi Howard,
>
> The move to linux was part of a move in-house for our client as the web
> services are only accessible behind the firewall.
>
> My gut feeling is that the issue isn't related to the WS as they run on a
> scheduled task 3 times a day. I think the issue lies in our app and
> struggling with not being able to see exactly what's happening during the
> crash. JavaMelody provides some insight but just not enough.
>

Norhing in the catalina.out or app specific logs?

> I'm quite happy to post the charts for others to see. Just not sure what
> the best way to do it is.
>
>
> Z.
>
>
>
>
>
> On 3/02/13 3:11 PM, "Howard W. Smith, Jr."  wrote:
>
> >I know this is asking for too much or might be impossible to do but
> >process
> >of elimination.. If it was possible to eliminate or prevent web services
> >from executing or being accessed, and no spikes occur, then problem is
> >there. I think you said earlier that system was stable on Windows and
> >migration to Linux was driven by the web services requirement. I wonder
> >what kind of processing in those web services which may be causing this.
A
> >lot of database access, even more database access now because of web
> >services? Did some developer try to add a manual call to gc, somewhere in
> >the app to free resources. Maybe you can poll any / all developers or
> >search code accordingly. Does the spike occur at certain time of day,
> >maybe
> >some code executed on schedule, or does it occur after certain activity
> >occur in the app either by endusers or background processing?
> >
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: Help in diagnosing server unresponsiveness

2013-02-05 Thread Igor Cicimov
On Wed, Feb 6, 2013 at 1:15 PM, Zoran Avtarovski wrote:

> Here's some updated observations after a not quite incident (CPU and
> memory spiked but the app is still running):
>
> 1. Yesterday we had a 90% CPU spike at a time where there was absolutely
> no server traffic. Verified through both the HTTP logs and the mod_jk
> logs. The CPU spiked and recovered back to average levels.
> 2. Used memory spiked at 10GB from a pre incident average of 500MB
> throughout 2 busy days without incident
> 3. Used memory has only gone back down to 4GB and is holding at this level
> 4. The Used physical memory went up from 2GB to 14GB and has stayed there
> 5. Garbage collector time spikes to 24.0. I think with JavaMelody it means
> that GC took 24% of  of the CPU??
>
> So I think our issues are related to GC. Is there a way to trigger more
> frequent GC which will hopefully be less resource intensive?
>
> And why have the memory usage levels not recovered?
>
> Z.
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
Zoran,

First I would like to recommend the following document for reading:
http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html#cms

It explains the GC in JVM 1.6 including the Concurrent Collector settings
which is the one you are using. The values for the GC in the log file are
the time the particular collector spent for the operation so the 24.0 would
probably mean 24 seconds, which might mean that for 24 seconds your
applications might be unresponsive during the CMS GC.

As explained in the document from the above link the GC has minor and major
collecting phases. During the minor collection the objects are GC'ed from
the so called young generation or promoted in the old (tenured) generation.
More of this objects pile up in the old generation more frequent the major
GC needs to run. The major ones take usually much longer (they have to
clean much bigger space) time than the minor ones but the minor ones have
to run more frequently. Now, what you need to find is what is causing your
problem really? If your application creates lot of new objects then you'll
have lots of minor GC running. More of this objects survive, they get moved
to the old generation space and then you'll have lots of major GC running
as well. The danger here is that you might end up with constantly running
GC which will render your application unusable due to pauses. So basically
badly written application can cause lots of problems, not closing
connections and freeing objects etc etc, and in that case even the best GC
tunning in the world will not help you, your application(s) will eventually
get to halt.

So read the document carefully and decide which user case is best for you.
If you are creating lots of new objects then maybe increasing the minor
space (default new/old ratio is 1:3) can help.

Also paste here the results of the GC logs. The link I provided has some
more useful settings and recommendations for the CMS collector. This
collector stops the application threads twice during the operation so you
need to check those times too.

Cheers & Pozdrav,
Igor


Re: mod_jk how to add JK_WORKER_NAME to http-header

2013-02-26 Thread Igor Cicimov
On 27/02/2013 5:42 AM, "Jochen Wißmann"  wrote:
>
> Hello,
>
> i am trying to find an easy way to determine from the http-client side,
which  AJP13-worker handled my request.
> So my basic idea is to use mod_header to add mod_jk`s env-variable
JK_WORKER_NAME to the Header of the http-response.
> I tried to get something like this working:
>
> httpd.conf:
> ...
> Header add TC-Server "%{JK_WORKER_NAME}e"

I think this should be

Header add TC-Server "%{JK_WORKER_NAME}n"

Please paste here the worker.properties file too.

> ...
>
> All my previous attempts resulted in http-responses looking like this:
>
> < HTTP/1.1 200 OK
> < Set-Cookie: ARPT=LRWQXVS110.160.11.26CKMLQ; path=/
> < Date: Tue, 26 Feb 2013 18:25:31 GMT
> < Server: Apache/2.2.22 (Unix) mod_jk/1.2.36 mod_ssl/2.2.22
OpenSSL/0.9.8x DAV/2
> < Set-Cookie: JSESSIONID=A4052BF60BA2007F0B0F47E2699AFDE.liferay0; Path=/
> < Set-Cookie: GUEST_LANGUAGE_ID=en_US; Expires=Wed, 26-Feb-2014 18:25:31
GMT; Path=/
> < Set-Cookie: COOKIE_SUPPORT=true; Expires=Wed, 26-Feb-2014 18:25:31 GMT;
Path=/
> < Liferay-Portal: Liferay Portal Community Edition 6.0.6 CE (Bunyan /
Build 6006 / February 17, 2011)
> < ETag: "838b4ae2"
> < Content-Length: 8043
> < X-Server-Ip: 110.160.11.26
> < TC-Server: (null)
> < Content-Type: text/html;charset=utf-8
>
> Why do i get "TC-Server: (null)" ?
> Using the Variable JK_WORKER_NAME to log the worker's name via
mod_log_config works fine.
>
> Am i missing something? Is it even possible to access the env-variable
JK_WORKER_NAME with module mod_header?
> Could anyone please help?
> Thanks!
>
> Jochen
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: mod_jk how to add JK_WORKER_NAME to http-header

2013-02-26 Thread Igor Cicimov
On 27/02/2013 10:47 AM, "Jochen Wißmann"  wrote:
>
> On 26.02.2013 22:38, Christopher Schultz wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> Jochen,
>>
>> On 2/26/13 10:41 AM, Jochen Wißmann wrote:
>>>
>>> I tried to get something like this working:
>>>
>>> httpd.conf: ... Header add TC-Server "%{JK_WORKER_NAME}e"
>>
>> This looks like it should work from my brief review of the documentation.
>>
>>> < TC-Server: (null)
>>>
>>> Why do i get "TC-Server: (null)" ? Using the Variable
>>> JK_WORKER_NAME to log the worker's name via mod_log_config works
>>> fine.
>>>
>>> Am i missing something? Is it even possible to access the
>>> env-variable JK_WORKER_NAME with module mod_header?
>>
>> The httpd documentation says so.
>>
>> Can you give us more of your httpd.conf? Perhaps the "Header"
>> directive isn't in a place where the environment variable has been
>> set, goes out of scope, etc.
>>
>> - -chris
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iEYEAREIAAYFAlEtK1AACgkQ9CaO5/Lv0PAdmwCgvDx2p5ZNdLAU6E7xXIg4uuu6
>> tCcAoLWtF78/eXNDXvmV2FeR6TIOq0qj
>> =f/sj
>> -END PGP SIGNATURE-
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> Hi Christopher,
>
> my setup looks like this.
> * os: ubuntu, running apache  2.2 with mod_jk 1.2.36
> * AJP13-Worker: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build
6006 / February 17, 2011) , which is based on tomcat-6.0.29
>
> 000-default:
> 
> # Load mod_jk configuration
> Include mod-jk.conf
>
> 
> ServerAdmin webmaster@localhost
> DocumentRoot /var/www
> 
> Options FollowSymLinks
> AllowOverride None
> 
> 
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> 
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> 
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> 
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog ${APACHE_LOG_DIR}/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> 
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> 
> Header add X-Server-Ip "%{SERVER_ADDR}e"
> Header merge TC-Server-Ip "%{JK_WORKER_NAME}e"
> 
>
> mod_jk.conf:
> -
> # Load mod_jk module
> # Specify the filename of the mod_jk lib
> LoadModule jk_module modules/mod_jk.so
>
> # Where to find workers.properties
> JkWorkersFile workers.properties
>
> # Where to put jk logs
> JkLogFile ${APACHE_LOG_DIR}/mod_jk.log
>
> # Set the jk log level [debug/error/info]
> JkLogLevel info
>
> # LogFormat
> LogFormat "%h %l %u %t \"%r\" %>s %b %{JK_WORKER_NAME}n
%{JK_LB_FIRST_NAME}n \
>  %{JK_LB_FIRST_BUSY}n %{JK_LB_LAST_NAME}n
%{JK_LB_LAST_BUSY}n" JkLogFile
> # Select the log format
> JkLogStampFormat  "%Y-%m-%d %H:%M:%S,%Q "
> #SetEnv JK_WORKER_NAME {JK_WORKER_NAME}n
> Header add TC-Server-Ip "%{JK_NOTE_WORKER_NAME}e"
> # JkOptions indicates to send SSK KEY SIZE
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>
> # JkRequestLogFormat
> JkRequestLogFormat " %w %V %U %T %s %R"
>
> # You can use external file for mount points.
> # It will be checked for updates each 60 seconds.
> # The format of the file is: /url=worker
> # /examples/*=loadbalancer
> JkMountFile uriworkermap.properties
>
> JkMountCopy all
>
> # Add shared memory.
> # This directive is present with 1.2.10 and
> # later versions of mod_jk, and is needed for
> # for load balancing to work properly
> JkShmFile /var/log/apache2/jk.shm
>
> worker.properties:
> 
> # Define list of workers that will be used
> # for mapping requests
> worker.list=status,liferay
> # Status worker for managing load balancer
> worker.status.type=status
>
> # Liferay-Load-balancer
> worker.liferay.port=8009
> worker.liferay.host=127.0.0.1
> worker.liferay.type=ajp13
>
> uriworkermap.properties:
> --
> # Mount the Servlet context to the ajp13 worker
> /jkstatus/*=status
>
> # Liferay
> /c=liferay
> /c/*=liferay
> /group=liferay
> /group/*=liferay
> /html/*=liferay
> /image/*=liferay
> /language/*=liferay
> /layouttpl/*=liferay
> /user=liferay
> /user/*=liferay
> /web=liferay
> /web/*=liferay
> /kepol=liferay
> /kepol/*=liferay
>
> # Liferay Languages
> /da=liferay
> /da/*=liferay
> /de=liferay
> /de/*=liferay
> /en=liferay

Re: mod_jk how to add JK_WORKER_NAME to http-header

2013-02-26 Thread Igor Cicimov
On 27/02/2013 10:47 AM, "Jochen Wißmann"  wrote:
>
> On 26.02.2013 22:38, Christopher Schultz wrote:
>>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA256
>>
>> Jochen,
>>
>> On 2/26/13 10:41 AM, Jochen Wißmann wrote:
>>>
>>> I tried to get something like this working:
>>>
>>> httpd.conf: ... Header add TC-Server "%{JK_WORKER_NAME}e"
>>
>> This looks like it should work from my brief review of the documentation.
>>
>>> < TC-Server: (null)
>>>
>>> Why do i get "TC-Server: (null)" ? Using the Variable
>>> JK_WORKER_NAME to log the worker's name via mod_log_config works
>>> fine.
>>>
>>> Am i missing something? Is it even possible to access the
>>> env-variable JK_WORKER_NAME with module mod_header?
>>
>> The httpd documentation says so.
>>
>> Can you give us more of your httpd.conf? Perhaps the "Header"
>> directive isn't in a place where the environment variable has been
>> set, goes out of scope, etc.
>>
>> - -chris
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
>> Comment: GPGTools - http://gpgtools.org
>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>
>> iEYEAREIAAYFAlEtK1AACgkQ9CaO5/Lv0PAdmwCgvDx2p5ZNdLAU6E7xXIg4uuu6
>> tCcAoLWtF78/eXNDXvmV2FeR6TIOq0qj
>> =f/sj
>> -END PGP SIGNATURE-
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
> Hi Christopher,
>
> my setup looks like this.
> * os: ubuntu, running apache  2.2 with mod_jk 1.2.36
> * AJP13-Worker: Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build
6006 / February 17, 2011) , which is based on tomcat-6.0.29
>
> 000-default:
> 
> # Load mod_jk configuration
> Include mod-jk.conf
>
> 
> ServerAdmin webmaster@localhost
> DocumentRoot /var/www
> 
> Options FollowSymLinks
> AllowOverride None
> 
> 
> Options Indexes FollowSymLinks MultiViews
> AllowOverride None
> Order allow,deny
> allow from all
> 
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
> 
> AllowOverride None
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
> Order allow,deny
> Allow from all
> 
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel warn
>
> CustomLog ${APACHE_LOG_DIR}/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> 
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> 
> Header add X-Server-Ip "%{SERVER_ADDR}e"
> Header merge TC-Server-Ip "%{JK_WORKER_NAME}e"
> 
>
> mod_jk.conf:
> -
> # Load mod_jk module
> # Specify the filename of the mod_jk lib
> LoadModule jk_module modules/mod_jk.so
>
> # Where to find workers.properties
> JkWorkersFile workers.properties
>
> # Where to put jk logs
> JkLogFile ${APACHE_LOG_DIR}/mod_jk.log
>
> # Set the jk log level [debug/error/info]
> JkLogLevel info
>
> # LogFormat
> LogFormat "%h %l %u %t \"%r\" %>s %b %{JK_WORKER_NAME}n
%{JK_LB_FIRST_NAME}n \
>  %{JK_LB_FIRST_BUSY}n %{JK_LB_LAST_NAME}n
%{JK_LB_LAST_BUSY}n" JkLogFile
> # Select the log format
> JkLogStampFormat  "%Y-%m-%d %H:%M:%S,%Q "
> #SetEnv JK_WORKER_NAME {JK_WORKER_NAME}n
> Header add TC-Server-Ip "%{JK_NOTE_WORKER_NAME}e"
> # JkOptions indicates to send SSK KEY SIZE
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
>
> # JkRequestLogFormat
> JkRequestLogFormat " %w %V %U %T %s %R"
>
> # You can use external file for mount points.
> # It will be checked for updates each 60 seconds.
> # The format of the file is: /url=worker
> # /examples/*=loadbalancer
> JkMountFile uriworkermap.properties
>
> JkMountCopy all
>
> # Add shared memory.
> # This directive is present with 1.2.10 and
> # later versions of mod_jk, and is needed for
> # for load balancing to work properly
> JkShmFile /var/log/apache2/jk.shm
>
> worker.properties:
> 
> # Define list of workers that will be used
> # for mapping requests
> worker.list=status,liferay
> # Status worker for managing load balancer
> worker.status.type=status
>
> # Liferay-Load-balancer
> worker.liferay.port=8009
> worker.liferay.host=127.0.0.1
> worker.liferay.type=ajp13
>
> uriworkermap.properties:
> --
> # Mount the Servlet context to the ajp13 worker
> /jkstatus/*=status
>
> # Liferay
> /c=liferay
> /c/*=liferay
> /group=liferay
> /group/*=liferay
> /html/*=liferay
> /image/*=liferay
> /language/*=liferay
> /layouttpl/*=liferay
> /user=liferay
> /user/*=liferay
> /web=liferay
> /web/*=liferay
> /kepol=liferay
> /kepol/*=liferay
>
> # Liferay Languages
> /da=liferay
> /da/*=liferay
> /de=liferay
> /de/*=liferay
> /en=liferay

Re: How to allow only TLS 1.1 connections to Tomcat (6.0) server with https ?

2013-03-04 Thread Igor Cicimov
On 05/03/2013 5:10 PM, "Brijesh Deo"  wrote:
>
> Hi,
> Is there a way to make TLS 1.1 required for https connection with Tomcat
server. I am currently on Tomcat 6.0.32 with JRE 1.7 on Windows 7. I tried
setting [sslProtocol="TLSv1.1"] in the Connector definition in server.xml
but that did not stop TLS 1.0 connections from being accepted. I am not
using OpenSSL and instead using JSSE as the TLS provider.
> Is it possible to do it this way? Or do I need to upgrade to Tomcat 7.0
to be able to allow only TLS 1.1 connections with https? Please let me know
how to do this.

You need java7 for tls1.1 and 1.2 as far as i know.


Re: mod_jk 1.2.37 never send ping rq

2013-03-06 Thread Igor Cicimov
On Thu, Mar 7, 2013 at 3:03 AM,  wrote:

> hi all
>
> i setup apache <--> mod_jk <--> tomcat the firsttime with firewall. what i
> saw was a not working page. after search and read the mod_jk docs
> i see and found the reason. the firewall drop the jk connection. i try to
> set properties like keep_alive and ping but i never see with wireshark any
> package do exact the job, what i read from the doc (might i missunderstand
> something) --> send after some time a ping.
> i expect this on the ajp connection. i watch the complete traffic between
> apache and tomcat
>
> my config is stright forward:
>
> worker.list=jkstatus, tc
>
> worker.jkstatus.type=status
>
> worker.tc.type=lb
> worker.tc.balance_workers=1
>
> worker.1.type=ajp13
> worker.1.host=192.168.13.50
> worker.1.port=8009
> worker.1.socket_keepalive=1
> worker.1.ping_mode=A
> worker.1.ping_timeout=1
> worker.1.connection_ping_interval=9000
> worker.1.connection_pool_size=1
>
> worker.2.type=ajp13
> worker.2.host=192.168.13.51
> worker.2.port=8009
> worker.2.socket_keepalive=1
> worker.2.ping_mode=A
> worker.2.ping_timeout=1
> worker.2.connection_ping_interval=9000
> worker.2.connection_pool_size=1
>
> i play with the values but i never see something periodical at the network
> side.
>
> my system:
>
> redhat 6.4 / 64bit, apache 2.2.15 and mod_jk 1.2.37 --> tomcat latest
>
> any help / comment is wellcome
>
> thanks dietmar
>

Well in this case I can think of only one reason of this not to work: the
firewall is dropping the ICMP packets. What kind of firewall are we talking
about here? Is it hardware one or the iptables on tomcat server. Anyway,
easy to test, switch off the firewall and then check if you can see the
pings.


Re: mod_jk 1.2.37 never send ping rq

2013-03-06 Thread Igor Cicimov
> redhat 6.4 / 64bit, apache 2.2.15 and mod_jk 1.2.37 --> tomcat latest
>
> In case of RedHat also check for SELinux policy on the tomcat server. And
for other security things you might be running like maybe AppArmor etc.


Re: mod_jk 1.2.37 never send ping rq

2013-03-06 Thread Igor Cicimov
On 07/03/2013 4:25 PM, "Christopher Schultz" 
wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Igor,
>
> On 3/6/13 9:02 PM, Igor Cicimov wrote:
> > On Thu, Mar 7, 2013 at 3:03 AM, 
> > wrote:
> >
> >> hi all
> >>
> >> i setup apache <--> mod_jk <--> tomcat the firsttime with
> >> firewall. what i saw was a not working page. after search and
> >> read the mod_jk docs i see and found the reason. the firewall
> >> drop the jk connection. i try to set properties like keep_alive
> >> and ping but i never see with wireshark any package do exact the
> >> job, what i read from the doc (might i missunderstand something)
> >> --> send after some time a ping. i expect this on the ajp
> >> connection. i watch the complete traffic between apache and
> >> tomcat
> >>
> >> my config is stright forward:
> >>
> >> worker.list=jkstatus, tc
> >>
> >> worker.jkstatus.type=status
> >>
> >> worker.tc.type=lb worker.tc.balance_workers=1
> >>
> >> worker.1.type=ajp13 worker.1.host=192.168.13.50
> >> worker.1.port=8009 worker.1.socket_keepalive=1
> >> worker.1.ping_mode=A worker.1.ping_timeout=1
> >> worker.1.connection_ping_interval=9000
> >> worker.1.connection_pool_size=1
> >>
> >> worker.2.type=ajp13 worker.2.host=192.168.13.51
> >> worker.2.port=8009 worker.2.socket_keepalive=1
> >> worker.2.ping_mode=A worker.2.ping_timeout=1
> >> worker.2.connection_ping_interval=9000
> >> worker.2.connection_pool_size=1
> >>
> >> i play with the values but i never see something periodical at
> >> the network side.
> >>
> >> my system:
> >>
> >> redhat 6.4 / 64bit, apache 2.2.15 and mod_jk 1.2.37 --> tomcat
> >> latest
> >>
> >> any help / comment is wellcome
> >>
> >> thanks dietmar
> >
> > Well in this case I can think of only one reason of this not to
> > work: the firewall is dropping the ICMP packets. What kind of
> > firewall are we talking about here? Is it hardware one or the
> > iptables on tomcat server. Anyway, easy to test, switch off the
> > firewall and then check if you can see the pings.
>
> Wrong, mod_jk does not use ICMP to "ping" the backend server. It uses
> (not surprisingly) TCP/IP packets using the AJP protocol.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEAREIAAYFAlE4IxgACgkQ9CaO5/Lv0PA0XwCgmx2kFWnfERmGvUWNhrNtPQt1
> yuUAn21J7iyaB8jyOEVv8+KC/tvJNfyB
> =s4Eq
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: mod_jk 1.2.37 never send ping rq

2013-03-06 Thread Igor Cicimov
On 07/03/2013 4:25 PM, "Christopher Schultz" 
wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Igor,
>
> On 3/6/13 9:02 PM, Igor Cicimov wrote:
> > On Thu, Mar 7, 2013 at 3:03 AM, 
> > wrote:
> >
> >> hi all
> >>
> >> i setup apache <--> mod_jk <--> tomcat the firsttime with
> >> firewall. what i saw was a not working page. after search and
> >> read the mod_jk docs i see and found the reason. the firewall
> >> drop the jk connection. i try to set properties like keep_alive
> >> and ping but i never see with wireshark any package do exact the
> >> job, what i read from the doc (might i missunderstand something)
> >> --> send after some time a ping. i expect this on the ajp
> >> connection. i watch the complete traffic between apache and
> >> tomcat
> >>
> >> my config is stright forward:
> >>
> >> worker.list=jkstatus, tc
> >>
> >> worker.jkstatus.type=status
> >>
> >> worker.tc.type=lb worker.tc.balance_workers=1
> >>
> >> worker.1.type=ajp13 worker.1.host=192.168.13.50
> >> worker.1.port=8009 worker.1.socket_keepalive=1
> >> worker.1.ping_mode=A worker.1.ping_timeout=1
> >> worker.1.connection_ping_interval=9000
> >> worker.1.connection_pool_size=1
> >>
> >> worker.2.type=ajp13 worker.2.host=192.168.13.51
> >> worker.2.port=8009 worker.2.socket_keepalive=1
> >> worker.2.ping_mode=A worker.2.ping_timeout=1
> >> worker.2.connection_ping_interval=9000
> >> worker.2.connection_pool_size=1
> >>
> >> i play with the values but i never see something periodical at
> >> the network side.
> >>
> >> my system:
> >>
> >> redhat 6.4 / 64bit, apache 2.2.15 and mod_jk 1.2.37 --> tomcat
> >> latest
> >>
> >> any help / comment is wellcome
> >>
> >> thanks dietmar
> >
> > Well in this case I can think of only one reason of this not to
> > work: the firewall is dropping the ICMP packets. What kind of
> > firewall are we talking about here? Is it hardware one or the
> > iptables on tomcat server. Anyway, easy to test, switch off the
> > firewall and then check if you can see the pings.
>
> Wrong, mod_jk does not use ICMP to "ping" the backend server. It uses
> (not surprisingly) TCP/IP packets using the AJP protocol.
>
> - -chris
Thanks Chris for correcting me i thought they are separate.


Re: Apache Accessing Tomcat Issue

2013-03-29 Thread Igor Cicimov
On 29/03/2013 10:29 AM, "Chris Arnold"  wrote:
>
> Apache Tomcat/7.0.30 on SLES11 SP2. I am trying to configure access to a
webapp using http://share.domain.com. This webapp uses port 8080 and works
fine from inside the LAN. However, we have an apache2 server acting as a
proxy and we want users to not have to type in a port number.
>
> Now when accessing http://share.domain.com, the result is directories and
files are listed, the jsp files are not running. Here is my complete setup:
>
You cant overlap apache and tomcat file system

> jk.conf-
>
> # simple configuration for apache (for AJP connector, modul mod_jk.so)
>
> 
>
> JkWorkersFile /opt/alfresco/tomcat/workers.properties
> JkLogFile /var/log/alfresco/mod_jk.log
> JkShmFile /var/log/alfresco/shm
>
> # Log level to be used by mod_jk
> JkLogLevel error
>
> # The following line mounts all JSP files and the /servlet/ uri to
tomcat
> #JkMount /servlets-examples/servlet/* ajp13
> JkMount /share/*.jsp ajp13
>
> 
>
>
> virtualhost-
>
> 
> ServerName share.domain.com
>
> #RewriteEngine On
> #RewriteCond %{REQUEST_URI} !^/share/
> #RewriteCond %{HTTPS} on
> #RewriteRule ^/. http://share.paradixent.com/share/ [P]
> #JkMount /share/* worker1
>
> 
>
>
> # The following line makes apache aware of the location of
> # the /jsp-examples context
> Alias /share "/opt/alfresco/tomcat/webapps/share"
> 
> Options Indexes FollowSymLinks
> allow from all
> 
>
> # The following line mounts all JSP files and the /servlet/ uri to
tomcat
> #JkMount /servlets-examples/servlet/* ajp13
> JkMount /share/*.jsp ajp13
>
> # The following line prohibits users from directly accessing WEB-INF
> 
> #AllowOverride None
> deny from all
> 
>
> # if not specified, the global error log is used
> ErrorLog /var/log/apache2domain.com-error_log
> CustomLog /var/log/apache2/domain.com-access_log combined
>
> 
>
> 
>
>
> httpd.conf-
>
> # mod_jk
> Include /opt/alfresco/tomcat/conf/jk.conf
>
>
> Mod_jk is loaded:
>
> web:~ # /usr/sbin/httpd2 -M
> Loaded Modules:
> ...
> jk_module (shared)
>  perl_module (shared)
>  php5_module (shared)
> Syntax OK
>
>
>
>
> Here is the log from apache:
>
> [Thu Mar 28 18:40:14 2013] [error] [client pub ip] proxy: Error reading
from remote server returned by /error/HTTP_INTERNAL_SERVER_ERROR.html.var
> [Thu Mar 28 18:40:28 2013] [error] [client pub ip] (70007)The timeout
specified has expired: proxy: error reading status line from remote server
share.paradixent.com
> [Thu Mar 28 18:40:28 2013] [error] [client pub ip] proxy: Error reading
from remote server returned by /error/HTTP_INTERNAL_SERVER_ERROR.html.var
>
>
> Any ideas why the folder and files are being listed instead of running?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


Re: Setting up tomcat to run on port 443 on ubuntu system

2013-03-29 Thread Igor Cicimov
If installed from package open /etc/default/tomcat7, uncomment thr last
line and make it
AUTHBIND=yes
and then youll be able to bind tomcat to port 80 and/or 443
 On 30/03/2013 1:22 AM, "Shyam Yadav"  wrote:

> Hi Ognjen,
>
> I did all the setting you have mentioned for Unix Daemon for Tomcat, but
> still i am getting the same problem.
> i.e.  Permission Denied.
>
> Thank you very much sir for helping me out but still its not working.
> This may be my mistake.
>
> Thanks & Regards,
> Shyam Yadav
>


Re: Serve same content to multiple URL's

2013-04-04 Thread Igor Cicimov
On 05/04/2013 7:26 AM, "Chris Arnold"  wrote:
>
> On Apr 4, 2013, at 2:38 PM, "Christopher Schultz" <
ch...@christopherschultz.net> wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA256
> >
> > Chris,
> >
> > On 4/4/13 12:28 PM, Chris Arnold wrote:
> >>
> >> I have tried to add a second worker (worker2) in workers.properties
> >> and added a virtualhost like: Here is the configured virtualhost
> >> for domain2: 2nd virtualhost: JkMount /share|/* worker2
> >> RedirectMatch ^/$ http://share.domain2.com/share/
> >
> > If you want the content to be identical, why do you need a second
worker?
>
> I didn't think I needed a second worker but because the working config
only worked for http://share.domain1.com and nothing else, I wanted to
verify it should work or I needed another worker and you verified I do not
need another worker and in fact, the existing config for
http://share.domain1.com should work for http://share.domain2.com
> >
> > Why do you need a second VirtualHost, even?
>
> Apache has to answer for that request (http://share.domain2.com) and pass
it to tomcat
> >
You just need to create Alias in the existing VirtualHost in Apache and the
Host in Tomcat.

> >> When i type http://share.domain2.com i arrive at 1 of our websites
> >> but not the tomcat content. When i type
> >> http://share.domain2.com/share i get a 404 error. Do i need to
> >> define another worker to accomplish this or should the defined
> >> worker work for any domain given there is a virtualhost defined?
> >
> > Workers don't care about VirtualHosts: the client's request headers
> > will be sent to Tomcat and another round of virtual host resolution
> > will occur over there. Having separate workers does not help anything.
> >
> > I'm not sure why you are getting 404s: any idea if it's a response
> > coming from httpd or Tomcat?
>
> No error logs in apache or tomcat which is weird?
>
> > If you browse to
> > http://share.domain2.com/ are you properly redirected (as I would
> > expect given the above configuration) to http://share.domain2.com/share?
>
> It doesn't appear so as a apache site answers the request.


  1   2   3   >