Re: mod_jk session stickiness on failover

2010-05-19 Thread Mark Thomas
On 19/05/2010 01:18, Steve Yates wrote:
 G'day John, the strategy I would employ in your particular case would be
 to utilise the JvmRouteBinderValve. Now the JvmRouteBinderValve was
 designed to be used within a clustered environment I cannot see why it
 cannot be configured stand-alone to simply detect for an incorrect route
 and modify the client-side cookie appropriately.

Because the first thing that that Valve does is to look if clustering or
a persistent manager is configured and does nothing neither is the case.
Hence my previous response. See the source code for details.

Mark

 
 RGS
 SY
 
 On 5/18/2010 8:35 PM, JohnRiley wrote:
 Hi,

 We are load balancing 3 non-clustered tomcat 6.0 servers with the mod_jk
 connector in apache 2.0. We have sticky sessions enabled and it works fine
 until one of the servers goes down. What happens then is that it start
 round-robin between the other two since none of them wants to accept the
 JSESSIONID with the route of the crashed tomcat server. 

 How can I make one of the other servers to create a new session with its own
 jvmRoute for that tomcat? Because right now we have a huge problem when
 taking down a server for maintenance. The user will change server on each
 request until the server that is down for maintenance is back up again.

 Do we really have to setup the tomcats in a cluster to accomplish this?

 Best Regards

 John Riley
   
 
 




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



Re: JAAS getRemoteUser security custom

2010-05-19 Thread Neville Peter
Hi,

I'm still not satisfied with the options so far and I'm sure I do not fully 
understand it:

Although the valve works in that I can set the principal on the catalina 
request, realm.authenticate(username,credentials) within the valve is not 
actually passing anything to my JAAS login module although the login module is 
being used. Therefore, I can not currently authenticate the user within the 
JAAS module correctly as there appears to be no data passed from the valve. 
Also, if I use the valve then what is the point of the servlet using 
LoginContext.login()?

If I choose not to use a valve then I appear to not have any access to the 
request object within JAAS. 
Even if I use org.apache.catalina.realm.JAASCallbackHandler, I do not get 
access to the request. So how are you able to add the principal to the request 
like you can do with the valve?

SecurityFilter not an option as it does not support SSO.

Thanks for the comments so far.





 
 Using a Valve will give you access to the the internal
 model of the
 request, so you can set Principals etc.
 
 I had the impression that a full JAAS implementation gave
 you access to
 the request and enabled the use of a Realm, but maybe it
 isn't what you
 need.
 
 The SecurityFilter project might be worth a look, before
 you commit to
 rolling your own.
 
 
 p





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



Re: Jmxproxy issue

2010-05-19 Thread Anurag Kapur
From what I know, you do not get detailed memory information on the jmx
proxy servlet without the JMX agent enabled.

You can enable it by adding the following JVM argument.
-Dcom.sun.management.jmxremote

I have tested this on Tomcat 5.5.27 with Java 1.5.0_14. With the above JVM
argument added to the Tomcat process you get detailed memory information
including Garbage collections stats on the jmxproxy servlet.

Hope this helps.

Regards
Anurag

--
Anurag Kapur
Senior Associate - Technology,
Sapient Corporation.

+44 (0) 7514 996 586

http://www.linkedin.com/in/anuragkapur

http://www.google.com/profiles/anuragkapur
--


On Fri, May 14, 2010 at 1:19 PM, Pid p...@pidster.com wrote:

 On 14/05/2010 12:49, Honey Bajaj wrote:
 
  Thanks again for responding, both the servers have exactly similar
 following configuration, and I am able to execute
 /jmxproxy/?qry=java.lang:type=OperatingSystem query successfully on one
 (i.e. getting the output) and for the other server the search string returns
 OK - Number of results: 0
 
  Apache Tomcat/5.5.9
  1.6.0_06-b02
  OS Version - 2.6.9-67.ELsmp
 
  I have also checked server.xml files and they are exactly similar.
  Any pointers on which configuration to look for.

 You could diff all of the text files in the tomcat/bin and tomcat/conf
 directories of the 'working' and 'not working' servers to see if they
 are as identical as you think.


 p

  Thanks,
  Honey
 
  -Original Message-
  From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
  Sent: Friday, May 14, 2010 4:31 PM
  To: Tomcat Users List
  Subject: Re: Jmxproxy issue
 
  2010/5/14 Pid p...@pidster.com:
  On 14/05/2010 10:59, Honey Bajaj wrote:
  Hi All,
 
  I have enabled manager application on tomcat 5.5.9 added the required
 context and security options.
  I am able to logon to the manager application both the status and
 jmxproxy are accessible but jmxproxy didn't contain any details related to
 java.lang:type (such as
  java.lang:type=GarbageCollector,name=Copy=GarbageCollector,name=Copy or
  java.lang:type=OperatingSystem)
 
 
  FYI:
  /jmxproxy/?qry=java.lang:type=OperatingSystem
  does work in pristine installation built from the current 6.0.x
  sources as of now, but does not in the current 5.5.x,
  both running with Sun JDK 6u20.
 
 
  I think it might be related to the following changelog entry of Tomcat
  6 (in version 6.0.21):
  Tomcat now uses the Platform MBean server by default (...)
 
  6.0.21 means that it is included in 6.0.24 and later releases. The
  above was not
  backported to 5.5 branch.
 
 
  Maybe there is some configuration that will allow seeing the above in
  5.5, but I doubt that there is. Also check, what JRE versions your
  servers are using.
 
  In any case, as Pid already said, you should consider upgrading.
 
  Tomcat 5.5.9 is really old (released 14 Oct 2005) - that's 35 internet
  years using the Standard Internet Time Notation.
 
 
 
  Best regards,
  Konstantin Kolinko
 
  -
  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
 





C3p0 datasource

2010-05-19 Thread Woude, Alexander van der
Hello guys,

I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 
6.0.26.

I have the following config in my server.xml:

GlobalNamingResources

!-- Editable user database that can also be used by
 UserDatabaseRealm to authenticate users --

Resource name=jdbc/servicesds auth=Container 
maxActive=100 maxIdle=30 maxWait=1
username=r password= 
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@//:1521/development
type=com.mchange.v2.c3p0.ComboPooledDataSource
factory=com.mchange.v2.c3p0.DataSources
minPoolSize=50
maxPoolSize=150
timeout=250
maxStatements=100
acquireRetryAttempts=4
acquireIncrement=1
/ 
/GlobalNamingResources


During startup of the server things already go wrong. 
In the http://localhost:8080/manager/resources I get an error.

the error is : 
FAIL - Encountered exception javax.naming.NamingException: Could not create 
resource factory instance 
[Root exception is java.lang.IllegalAccessException: Class 
org.apache.naming.factory.ResourceFactory 
can not access a member of class com.mchange.v2.c3p0.DataSources with modifiers 
private]

Any ideas?

Regards
Alexander






This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the 
intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any 
part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this 
message.


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



Tomcat 6.0.20 unable to create new native thread

2010-05-19 Thread tomcat
Hi all,

we have a problem with our tomcat 6.0.20 which throws occasionally the 
following exception:
java.lang.OutOfMemoryError: unable to create new native thread
 
Information about the system:
- Win2003 Server Standard Edition 32 bit
- 2GB RAM
- Apache 2.2.13 with open SSL and mod_jk 1.2.28 for the communication with 
tomcat
- 2 instances of tomcat 6.0.20 on different ports. No redundancy / clustering. 
Each tomcat serves different webapps.
- JDK 1.6.0_06

Only one tomcat throws the above noted exception.

Configuration-Details:
- Tomcat 1 (with the problem)
   - MaxPermSize=256m
   - JvmMs 128 
   - JvmMx 768
   - maxThreads for HTTP: 450
   - maxThreads for jk: 3000

- Tomcat 2 (no problem yet)
   - MaxPermSize=256m
   - JvmMs 128 
   - JvmMx 512
   - MaxThreads for HTTP: 800
   - MaxThreads for jk: 450

When Tomcat 1 was throwing the exception the server status was showing the 
following:
   - mem Free  116 MB
   - mem Total 242 MB
   - mem Max   739 MB
   - current Thread jk355
   - busy Threadjk333
   - current Thread HTTP  5
   - busy ThreadHTTP  3

   - all connections shown by netstat -an (not filtered): 4595
   - connections in state close_wait: 3152

The tomcat was not totally stuck. Already connected sessions seemed to have no 
problem, but new sessions (new login) threw the exception and did could not be 
created. The Taskmanager shows that all in all 1.39 GB of RAM are used - much 
below the 2GB Limit. 

On the other hand: Shouldn't  windows start to swap if the ram is full?

In which memory-area does windows handle the memory which is used for the 
threads? Is it shown in the taskmanager?

Can the OS take the mem which is still unused by the JVM (memMax-memTotal) for 
handling threads or is it reserved for the JVM after starting tomcat?


Due to problems with one of our webapps which sometimes does not close the 
threads completely (they stuck in close_wait-state) we increased the max 
threads of windows:

http://publib.boulder.ibm.com/infocenter/pvcvoice/51x/index.jsp?topic=/com.ibm.websphere.wvs.doc/wvs/tun_conwin.html

maxUserPorts have been set to about 30k if i remember correctly.

Does anyone have an idea to get rid of the exception?

kind regards,
Andreas
-- 
Feel free - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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



Re: C3p0 datasource

2010-05-19 Thread Pid
On 19/05/2010 13:03, Woude, Alexander van der wrote:
 Hello guys,
 
 I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 
 6.0.26.
 
 I have the following config in my server.xml:
 
 GlobalNamingResources
 
 !-- Editable user database that can also be used by
  UserDatabaseRealm to authenticate users --
 
 Resource name=jdbc/servicesds auth=Container 
 maxActive=100 maxIdle=30 maxWait=1
 username=r password= 
 driverClassName=oracle.jdbc.driver.OracleDriver
 url=jdbc:oracle:thin:@//:1521/development
 type=com.mchange.v2.c3p0.ComboPooledDataSource
   factory=com.mchange.v2.c3p0.DataSources

Is this the correct value for the factory?  I found an alternative
value, suitable for Tomcat 5.5 (which is different, yes, I know).

 factory=org.apache.naming.factory.BeanFactory


p



   minPoolSize=50
   maxPoolSize=150
   timeout=250
   maxStatements=100
   acquireRetryAttempts=4
   acquireIncrement=1
 / 
 /GlobalNamingResources
 
 
 During startup of the server things already go wrong. 
 In the http://localhost:8080/manager/resources I get an error.
 
 the error is : 
 FAIL - Encountered exception javax.naming.NamingException: Could not create 
 resource factory instance 
 [Root exception is java.lang.IllegalAccessException: Class 
 org.apache.naming.factory.ResourceFactory 
 can not access a member of class com.mchange.v2.c3p0.DataSources with 
 modifiers private]
 
 Any ideas?
 
 Regards
 Alexander
 
 
 
 
 
 
 This message contains information that may be privileged or confidential and 
 is the property of the Capgemini Group. It is 
 intended only for the person to whom it is addressed. If you are not the 
 intended recipient, you are not authorized to 
 read, print, retain, copy, disseminate, distribute, or use this message or 
 any part thereof. If you receive this message 
 in error, please notify the sender immediately and delete all copies of this 
 message.
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




signature.asc
Description: OpenPGP digital signature


Re: Tomcat 6.0.20 unable to create new native thread

2010-05-19 Thread Peter Crowther
On 19 May 2010 13:26,  tom...@habmalnefrage.de wrote:
 java.lang.OutOfMemoryError: unable to create new native thread

OK, so one possibility is that the Windows thread table is full.

   - maxThreads for HTTP: 450
   - maxThreads for jk: 3000

That's a huge number of threads for one process.

   - MaxThreads for HTTP: 800
   - MaxThreads for jk: 450

That's merely massive.

   - all connections shown by netstat -an (not filtered): 4595
   - connections in state close_wait: 3152

That has nothing to do with threads.

 On the other hand: Shouldn't  windows start to swap if the ram is full?

Yes.  But that's not the error you're getting.

 In which memory-area does windows handle the memory which is used for the 
 threads? Is it shown in the taskmanager?

Task manager, Processes tab, View, Select Columns..., tick Thread Count.

 Can the OS take the mem which is still unused by the JVM (memMax-memTotal) 
 for handling threads or is it reserved for the JVM after starting tomcat?

You are reserving heap and permgen memory when the JVM starts.  Thread
memory, and kernel resources for threads, are outside of this total.

 Due to problems with one of our webapps which sometimes does not close the 
 threads completely (they stuck in close_wait-state) we increased the max 
 threads of windows:

 http://publib.boulder.ibm.com/infocenter/pvcvoice/51x/index.jsp?topic=/com.ibm.websphere.wvs.doc/wvs/tun_conwin.html

That has nothing to do with threads (and CLOSE_WAIT is a feature of
TCP, not of threads).  That link contains no information about
increasing the maximum number of threads in Windows.  It links to
TCP/IP tuning.  Wrong link, or wrong assumption?

 maxUserPorts have been set to about 30k if i remember correctly.

That has nothing to do with threads.

 Does anyone have an idea to get rid of the exception?

*Decrease* the number of threads in use in Tomcat 1.  If you set the
HTTP and JK maxima to the same as Tomcat 2 (which is still very
large), what happens?  Why?

- Peter

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



RE: Tomcat 6.0.20 unable to create new native thread

2010-05-19 Thread Caldarale, Charles R
 From: tom...@habmalnefrage.de [mailto:tom...@habmalnefrage.de]
 Subject: Tomcat 6.0.20 unable to create new native thread
 Configuration-Details:
 - Tomcat 1 (with the problem)
- MaxPermSize=256m
- JvmMs 128
- JvmMx 768
- maxThreads for HTTP: 450
- maxThreads for jk: 3000

You'll never be able to get that many threads going on a 32-bit Windows system. 
 You need to scale it down to something reasonable (like the other config).

 
 Shouldn't  windows start to swap if the ram is full?

You're not out of RAM, you're out of virtual space for the process.

 In which memory-area does windows handle the memory which is used for
 the threads? Is it shown in the taskmanager?

No; I'm not aware of it being shown anywhere.

 Can the OS take the mem which is still unused by the JVM (memMax-
 memTotal) for handling threads or is it reserved for the JVM after
 starting tomcat?

It's reserved for the Java heap.

 Due to problems with one of our webapps which sometimes does not close
 the threads completely (they stuck in close_wait-state) we increased
 the max threads of windows:

So fix your webapp.

 Does anyone have an idea to get rid of the exception?

See above.

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



RE: C3p0 datasource

2010-05-19 Thread Woude, Alexander van der
Pid,

changing the factory give me the following:
FAIL - Encountered exception javax.naming.NamingException: No set method found 
for property: maxIdle

Van: Pid [...@pidster.com]
Verzonden: woensdag 19 mei 2010 14:39
Aan: Tomcat Users List
Onderwerp: Re: C3p0 datasource

On 19/05/2010 13:03, Woude, Alexander van der wrote:
 Hello guys,

 I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 
 6.0.26.

 I have the following config in my server.xml:

 GlobalNamingResources

 !-- Editable user database that can also be used by
  UserDatabaseRealm to authenticate users --

 Resource name=jdbc/servicesds auth=Container
 maxActive=100 maxIdle=30 maxWait=1
 username=r password= 
 driverClassName=oracle.jdbc.driver.OracleDriver
 url=jdbc:oracle:thin:@//:1521/development
 type=com.mchange.v2.c3p0.ComboPooledDataSource
   factory=com.mchange.v2.c3p0.DataSources

Is this the correct value for the factory?  I found an alternative
value, suitable for Tomcat 5.5 (which is different, yes, I know).

 factory=org.apache.naming.factory.BeanFactory


p



   minPoolSize=50
   maxPoolSize=150
   timeout=250
   maxStatements=100
   acquireRetryAttempts=4
   acquireIncrement=1
 /
 /GlobalNamingResources


 During startup of the server things already go wrong.
 In the http://localhost:8080/manager/resources I get an error.

 the error is :
 FAIL - Encountered exception javax.naming.NamingException: Could not create 
 resource factory instance
 [Root exception is java.lang.IllegalAccessException: Class 
 org.apache.naming.factory.ResourceFactory
 can not access a member of class com.mchange.v2.c3p0.DataSources with 
 modifiers private]

 Any ideas?

 Regards
 Alexander






 This message contains information that may be privileged or confidential and 
 is the property of the Capgemini Group. It is
 intended only for the person to whom it is addressed. If you are not the 
 intended recipient, you are not authorized to
 read, print, retain, copy, disseminate, distribute, or use this message or 
 any part thereof. If you receive this message
 in error, please notify the sender immediately and delete all copies of this 
 message.


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









This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not the 
intended recipient, you are not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any 
part thereof. If you receive this message 
in error, please notify the sender immediately and delete all copies of this 
message.


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



RE: C3p0 datasource

2010-05-19 Thread Caldarale, Charles R
 From: Woude, Alexander van der
 [mailto:alexander.vander.wo...@capgemini.com]
 Subject: C3p0 datasource
 
 I have some trouble in getting c3p0 ComboPooledDataSource working in
 Tomcat 6.0.26.

What version of c3p0?

What JVM?

What platform?

Are you running with a security manager?

 the error is :
 FAIL - Encountered exception javax.naming.NamingException: Could not
 create resource factory instance
 [Root exception is java.lang.IllegalAccessException: Class
 org.apache.naming.factory.ResourceFactory
 can not access a member of class com.mchange.v2.c3p0.DataSources with
 modifiers private]

The above would indicate that the version of c3p0 you're using is not quite 
spec compliant.

Is there anything else in the logs, such as a stack trace?

- 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



Re: C3p0 datasource

2010-05-19 Thread Pid
On 19/05/2010 13:52, Woude, Alexander van der wrote:
 Pid,
 
 changing the factory give me the following:
 FAIL - Encountered exception javax.naming.NamingException: No set method 
 found for property: maxIdle

I'd take out the maxIdle=30 attribute, then.


p

 
 Van: Pid [...@pidster.com]
 Verzonden: woensdag 19 mei 2010 14:39
 Aan: Tomcat Users List
 Onderwerp: Re: C3p0 datasource
 
 On 19/05/2010 13:03, Woude, Alexander van der wrote:
 Hello guys,

 I have some trouble in getting c3p0 ComboPooledDataSource working in Tomcat 
 6.0.26.

 I have the following config in my server.xml:

 GlobalNamingResources

 !-- Editable user database that can also be used by
  UserDatabaseRealm to authenticate users --

 Resource name=jdbc/servicesds auth=Container
 maxActive=100 maxIdle=30 maxWait=1
 username=r password= 
 driverClassName=oracle.jdbc.driver.OracleDriver
 url=jdbc:oracle:thin:@//:1521/development
 type=com.mchange.v2.c3p0.ComboPooledDataSource
   factory=com.mchange.v2.c3p0.DataSources
 
 Is this the correct value for the factory?  I found an alternative
 value, suitable for Tomcat 5.5 (which is different, yes, I know).
 
  factory=org.apache.naming.factory.BeanFactory
 
 
 p
 
 
 
   minPoolSize=50
   maxPoolSize=150
   timeout=250
   maxStatements=100
   acquireRetryAttempts=4
   acquireIncrement=1
 /
 /GlobalNamingResources


 During startup of the server things already go wrong.
 In the http://localhost:8080/manager/resources I get an error.

 the error is :
 FAIL - Encountered exception javax.naming.NamingException: Could not create 
 resource factory instance
 [Root exception is java.lang.IllegalAccessException: Class 
 org.apache.naming.factory.ResourceFactory
 can not access a member of class com.mchange.v2.c3p0.DataSources with 
 modifiers private]

 Any ideas?

 Regards
 Alexander






 This message contains information that may be privileged or confidential and 
 is the property of the Capgemini Group. It is
 intended only for the person to whom it is addressed. If you are not the 
 intended recipient, you are not authorized to
 read, print, retain, copy, disseminate, distribute, or use this message or 
 any part thereof. If you receive this message
 in error, please notify the sender immediately and delete all copies of this 
 message.


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

 
 
 
 
 
 
 
 
 This message contains information that may be privileged or confidential and 
 is the property of the Capgemini Group. It is 
 intended only for the person to whom it is addressed. If you are not the 
 intended recipient, you are not authorized to 
 read, print, retain, copy, disseminate, distribute, or use this message or 
 any part thereof. If you receive this message 
 in error, please notify the sender immediately and delete all copies of this 
 message.
 




signature.asc
Description: OpenPGP digital signature


Prevent JSP Session

2010-05-19 Thread Brett Birschbach
I am currently running Tomcat 6.0.24 on a Windows Vista machine.

The web app I am developing will be deployed to a cloud, where server affinity 
will be thrown to the wind.  Thus, instead of relying on tomcat to manage my 
session, I am instead managing the session via manual cookies and a database.

Being that I cannot leverage the tomcat session, I don't want to create a 
session at all.  This has a two-fold benefit:

1)  Slight performance increase due to avoiding session creation overhead

2)  I can put a session listener in place to log an error if ever a session 
is created, to ensure that we are not using the tomcat session in the 
development environment where everything would appear to be fine until we 
deploy to the cloud.

According to JSP spec, I believe I should be able to use the following 
directive to prevent a session from being created by my JSPs: %@ page 
session=false %.  However, even when doing so, I am still getting a session 
created by the internals of the JSP container.  Is there something I am doing 
wrong?  Is it possibly a bug in Tomcat 6.0.24 (couldn't find it on Bugzilla)?  
Or is it simply a necessary evil?

The generated JSP code that is triggering the session is:  pageContext = 
_jspxFactory.getPageContext(this, request, response, null, true, 8192, true);

Below is the relevant portion of an exact stack trace:
at 
org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:854)
at 
org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291)
at 
org.apache.catalina.connector.Request.doGetSession(Request.java:2392)
at 
org.apache.catalina.connector.Request.getSession(Request.java:2098)
at 
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
at 
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
at 
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
at 
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:493)
at 
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:146)
at 
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:124)
at 
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:107)
at 
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:63)
at 
org.apache.jsp.layouts.nav.layout_005fnav_002dadmin_jsp._jspService(layout_005fnav_002dadmin_jsp.java:44)
at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Thanks!

--
Brett Birschbach
HS2 Solutions, Inc
brett.birschb...@hs2solutions.com



CORBA and Tomcat

2010-05-19 Thread privat
Hello,

Does somebody know something about this:
java.lang.SecurityException: ORBSingleton: access denied

com.sun.corba.se.impl.orb.ORBSingleton.string_to_object(ORBSingleton.java:348)


I tried to connect to a CORBA-NameServer by using
a Servlet on Tomcat.

I also grant all premissions in the webapps.policy, but it doesn't work.
Thanks for your help.

best regards

Markus





RE: CORBA and Tomcat

2010-05-19 Thread Caldarale, Charles R
 From: pri...@samea.de [mailto:pri...@samea.de]
 Subject: CORBA and Tomcat
 
 Does somebody know something about this:
 java.lang.SecurityException: ORBSingleton: access denied
   com.sun.corba.se.impl.orb.ORBSingleton.string_to_object
(ORBSingleton.java:348)

Tomcat version?

JVM version?

Platform?

Stack traces?

http://www.catb.org/~esr/faqs/smart-questions.html

 I tried to connect to a CORBA-NameServer by using
 a Servlet on Tomcat.

That means it's your code, not Tomcat's.

 I also grant all premissions in the webapps.policy, 
 but it doesn't work.

That's not a file that supported versions of Tomcat are aware of.

 - 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



Re: CORBA and Tomcat

2010-05-19 Thread privat

Hello;

here are the requested informations:

 Server Informationen
 Tomcat Version JVM Version JVM Hersteller OS Name OS Version OS 
Architektur
 Apache Tomcat/5.5 1.5.0_14-b03 Sun Microsystems Inc. Linux 
2.6.18-6-686 i386



type Exception report

message

description The server encountered an internal error () that prevented it 
from fulfilling this request.


exception

org.apache.jasper.JasperException: ORBSingleton: access denied

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.SecurityException: ORBSingleton: access denied

com.sun.corba.se.impl.orb.ORBSingleton.string_to_object(ORBSingleton.java:348)
de.gad.gsi.naming.NameWrapper.init(NameWrapper.java:42)
de.gad.gsi.cbb.simpleTest.go(simpleTest.java:37)
org.apache.jsp.simple.index_jsp._jspService(index_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
- Original Message - 
From: Caldarale, Charles R chuck.caldar...@unisys.com

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, May 19, 2010 3:30 PM
Subject: RE: CORBA and Tomcat



From: pri...@samea.de [mailto:pri...@samea.de]
Subject: CORBA and Tomcat

Does somebody know something about this:
java.lang.SecurityException: ORBSingleton: access denied
com.sun.corba.se.impl.orb.ORBSingleton.string_to_object
   (ORBSingleton.java:348)


Tomcat version?

JVM version?

Platform?

Stack traces?

http://www.catb.org/~esr/faqs/smart-questions.html


I tried to connect to a CORBA-NameServer by using
a Servlet on Tomcat.


That means it's your code, not Tomcat's.


I also grant all premissions in the webapps.policy,
but it doesn't work.


That's not a file that supported versions of Tomcat are aware of.

- 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



Tomcat Jconsole

2010-05-19 Thread Ozgur Ozdemircili
Hi,

Im trying to connect to my tomcat server using Jconsole. I do get
Connection Failed

I have the following parameters in my tomcat startup.sh

export CATALINA_OPTS=-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
 set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=8999 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false

And My hostname resolves to my ip:

hostname -i
10.5.xx.xx

I can connect locally by openig vnc conneccion yet when I try from my
workstation it does not connect.

When I start tomcat I do not see 8999 open.I see the following error on my
catalina out:

java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming
]  { -help | start | stop }



Any ideas why I cannot connect remotely?



Özgür Özdemircili
http://www.acikkod.org
Code so clean you could eat off it


RE: Tomcat Jconsole

2010-05-19 Thread Caldarale, Charles R
 From: Ozgur Ozdemircili [mailto:ozgur.ozdemirc...@gmail.com]
 Subject: Tomcat Jconsole
 
 Im trying to connect to my tomcat server using Jconsole. I do get
 Connection Failed

What version of Tomcat?  What JVM?

 I have the following parameters in my tomcat startup.sh

You shouldn't be modifying startup.sh; create a setenv.sh script to contain 
environment variable manipulations.

 export CATALINA_OPTS=-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
  set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
 -Dcom.sun.management.jmxremote.port=8999 \
 -Dcom.sun.management.jmxremote.ssl=false \
 -Dcom.sun.management.jmxremote.authenticate=false

The above looks very broken: you've wiped out the heap size and -server 
settings.

 I can connect locally by openig vnc conneccion yet when I try from my
 workstation it does not connect.

JMX requires use of additional ports that are normally dynamically allocated; 
likely that your firewall is blocking them.  If you're running on a current 
version of Tomcat, look here to get around the problem:

http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html

See the section describing the JMX Remote Lifecycle Listener.

 When I start tomcat I do not see 8999 open.

Using what to see?

 I see the following error on my catalina out:
 
 java org.apache.catalina.startup.Catalina [ -config {pathname} ]
 [ -nonaming ]  { -help | start | stop }

Why do you think that's an error?

 - 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



Problem with IIS 7.0 plugin isapi_redirect on Windows 2008 64 bit

2010-05-19 Thread Ganesan, Chandru
Hi

I'm trying to configure the IIS 7.0 with latest isapi_redirect.dll (Ver 1.2.30) 
on Windows 2008 Server (64 bit). When I try to login to the Apache Tomcat 5.5 
Servlet container, it fails with
the error:

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed,
or is temporarily unavailable.

Also I don't see any logs getting generated in isapi.log file, so I'm at a loss
as to the root cause of this issue. I don't see isapi_redirect.dll getting 
loaded, however I notice isapi.dll being loaded.


Attaching isapi_redirect.properties file below. Thanks in advance for your 
input.


# The path to the ISAPI Redirector Extension, relative to the website
# This must be in a virtual directory with execute privileges
extension_uri=/jakarta/isapi_redirect.dll

# Full path to the log file for the ISAPI Redirector
log_file=c:\inetpub\scripts\isapi.log

# Log level (debug, info, warn, error or trace)
log_level=debug

# Full path to the workers.properties file
worker_file=c:\Inetpub\scripts\workers.properties

# Full path to the uriworkermap.properties file
worker_mount_file=c:\Inetpub\scripts\uriworkermap.properties

rewrite_rule_file=c:\Inetpub\scripts\rewrites.properties

Thanks
Chandru Ganesan



clustering errors in 6.0.26 with multiple contexts

2010-05-19 Thread Ronald Klop

Hello,

Since I'm running 6.0.26 I have clustering errors on startup of some contexts. 
I only see this on servers with multiple clustered contexts. I don't know if 
that is related.
In 6.0.24 everything worked ok for months.
Today I caught the stack below on startup after which I get a 60 second timeout 
on sessionreplication. Can this be anything which has changed in 6.0.26?

Ronald.

java.lang.IllegalStateException: setAttribute: Session already invalidated
   at 
org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1321)
   at 
org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:597)
   at org.apache.catalina.ha.session.DeltaRequest.execute(DeltaRequest.java:164)
   at 
org.apache.catalina.ha.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1403)
   at 
org.apache.catalina.ha.session.DeltaManager.messageReceived(DeltaManager.java:1357)
   at 
org.apache.catalina.ha.session.DeltaManager.messageDataReceived(DeltaManager.java:1093)
   at 
org.apache.catalina.ha.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java:87)
   at 
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:901)
   at 
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:882)
   at 
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:269)
   at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
   at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
   at 
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:110)
   at 
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
   at 
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:241)
   at 
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:225)
   at 
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:188)
   at 
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:91)
   at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:619)



Re: Tomcat 6.0.20 unable to create new native thread

2010-05-19 Thread André Warnier

tom...@habmalnefrage.de wrote:

cute domain name ;-)



   - all connections shown by netstat -an (not filtered): 4595
   - connections in state close_wait: 3152



 Due to problems with one of our webapps which sometimes does not close
  the threads completely (they stuck in close_wait-state) we increased
  the max threads of windows:

So fix your webapp.

 
I'll concentrate on that same one too.

We have an issue on some systems, which may be similar.  Sometimes the 
system becomes apparently incapable of responding to TCP connections at 
all, and we have linked this to a high number of connections in the same 
CLOSE_WAIT state.  In our case, they are due to a webapp (of which we do 
not have the source), which allocates some kind of connection object 
which itself contains a socket.  When the webapp terminates, it discards 
this connection object, but does not previously close() the socket.
These objects then sit on the Heap until the next GC, and meanwhile they 
keep their socket in the CLOSE_WAIT state.
When there are enough of them in that state, we start having severe 
problems on the system with other applications needing to connect to, or 
from, the system. (enough is a vague number ranging from hundreds to 
thousands, depending on the system).
Triggering a GC of Tomcat solves the problem, immediately : the 
discarded objects get cleaned up, which frees the underlying sockets, 
and the CLOSE_WAIT list disappears, and the system is back to normal.


I am not the great authority in those matters, but intuitively I would 
imagine that a socket is an OS-level structure, and that it uses some 
system resources, like RAM.  And if you have thousands of them lying 
around, it may matter.


The funny part about this, is that if you increase the Heap size, you 
actually make the matter worse : there will be more room for these 
discarded objects, delaying the time when a GC would occur.  So you can 
accumulate a lot more of them, and freeze a lot more resources with them.


To force a GC, one useful command line tool is available here :
http://code.google.com/p/jmxsh/


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



Re: Tomcat Jconsole

2010-05-19 Thread Ozgur Ozdemircili
Hi,
Again:

-Rhel 5.3 x64

-java version 1.6.0_16
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

-Apache tomcat 6.0.26

-Dual core Intel(R) Xeon(R) CPU E3110  @ 3.00GHz  and 4 GB memory each.


The startup.sh configuration is not broken. I didnt wipe out anything.

It is not firewall

Im using nmap and netstat to see the connecions open. I do not see the port
open in local, I do not see the port open, logically  from remote.

The error in catalina.out comes up when I add  the jxm options. Since it is
in Catalina.out I am asking if it is important..


Any more ideas?



http://www.mentby.com/caldarale-charles-r/Özgür Özdemircili
http://www.acikkod.org
Code so clean you could eat off it


On Wed, May 19, 2010 at 3:56 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Ozgur Ozdemircili [mailto:ozgur.ozdemirc...@gmail.com]
  Subject: Tomcat Jconsole
 
  Im trying to connect to my tomcat server using Jconsole. I do get
  Connection Failed

 What version of Tomcat?  What JVM?

  I have the following parameters in my tomcat startup.sh

 You shouldn't be modifying startup.sh; create a setenv.sh script to contain
 environment variable manipulations.

  export CATALINA_OPTS=-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
   set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
  -Dcom.sun.management.jmxremote.port=8999 \
  -Dcom.sun.management.jmxremote.ssl=false \
  -Dcom.sun.management.jmxremote.authenticate=false

 The above looks very broken: you've wiped out the heap size and -server
 settings.

  I can connect locally by openig vnc conneccion yet when I try from my
  workstation it does not connect.

 JMX requires use of additional ports that are normally dynamically
 allocated; likely that your firewall is blocking them.  If you're running on
 a current version of Tomcat, look here to get around the problem:

 http://tomcat.apache.org/tomcat-6.0-doc/config/listeners.html

 See the section describing the JMX Remote Lifecycle Listener.

  When I start tomcat I do not see 8999 open.

 Using what to see?

  I see the following error on my catalina out:
 
  java org.apache.catalina.startup.Catalina [ -config {pathname} ]
  [ -nonaming ]  { -help | start | stop }

 Why do you think that's an error?

  - 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




Re: Tomcat Jconsole

2010-05-19 Thread Hassan Schroeder
On Wed, May 19, 2010 at 6:38 AM, Ozgur Ozdemircili
ozgur.ozdemirc...@gmail.com wrote:

 I have the following parameters in my tomcat startup.sh

ripple:/tmp$ cat testenv
#!/bin/bash

export CATALINA_OPTS=-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
  -Dcom.sun.management.jmxremote.port=8999 \
  -Dcom.sun.management.jmxremote.ssl=false \
  -Dcom.sun.management.jmxremote.authenticate=false
echo $CATALINA_OPTS
ripple:/tmp$ ./testenv
-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
ripple:/tmp$ vi testenv
ripple:/tmp$ cat testenv
#!/bin/bash

export CATALINA_OPTS=-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
export CATALINA_OPTS=$CATALINA_OPTS -Dcom.sun.management.jmxremote \
  -Dcom.sun.management.jmxremote.port=8999 \
  -Dcom.sun.management.jmxremote.ssl=false \
  -Dcom.sun.management.jmxremote.authenticate=false
echo $CATALINA_OPTS
ripple:/tmp$ ./testenv
-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8999
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
ripple:/tmp$

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



RE: Tomcat Jconsole

2010-05-19 Thread Caldarale, Charles R
 From: Ozgur Ozdemircili [mailto:ozgur.ozdemirc...@gmail.com]
 Subject: Re: Tomcat Jconsole
 
 -Dual core Intel(R) Xeon(R) CPU E3110  @ 3.00GHz  and 4 GB memory each.

What does each mean?  Is the system running with 4 GB of memory or something 
more?

 The startup.sh configuration is not broken. I didnt wipe out anything.
 export CATALINA_OPTS=-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
  set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
 -Dcom.sun.management.jmxremote.port=8999 \
 -Dcom.sun.management.jmxremote.ssl=false \
 -Dcom.sun.management.jmxremote.authenticate=false

When you do an export of a variable, followed immediately by a set of the same 
variable, what do you think happens?  (The exact effect depends on the shell 
you're using.)

 I do not see the port open in local, I do not see the 
 port open, logically  from remote.

Because your CATALINA_OPTS settings are not visible.

 The error in catalina.out comes up when I add  the jxm options.
 Since it is in Catalina.out I am asking if it is important..

Again, why do you think it's an error?  Have you compared that catalina.out 
with a normal Tomcat startup?

Is there anything else of interest in the logs (not just catalina.out)?

 - 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



Re: Question on workers.properties file

2010-05-19 Thread savoym

Ranier - Thanks for the reply.  I have some questions on your response.  The
INT value that your get_server_value method returns how do I determine from
that what the userid is and more importantly, what calls this method and
populates the values for this method to run?

Sorry for the ignorance.

Thanks again.

Rainer Jung-3 wrote:
 
 static int get_server_value(LPEXTENSION_CONTROL_BLOCK lpEcb,
  char *name, char *buf, DWORD bufsz)
 {
  DWORD sz = bufsz;
  buf[0]   = '\0';
  if (!lpEcb-GetServerVariable(lpEcb-ConnID, name,
buf, (LPDWORD) sz))
  return JK_FALSE;
 
 
 
 On 18.05.2010 22:27, savoym wrote:

 I just got IIS to forward my request to Tomcat using the Apache
 Tomcat-Connectors doc.

 I am trying to authenticate the user login/id that executes the request
 to
 my web app to be able to grab the user login and use in my java  app.

 Has anyone on this list setup a server environment variable in the
 workers.properties file that would equal the
 REQUEST.SERVERVARIABLE(AUTH_USER) in IIS?

 Can I get the same thing from the HttpServletRequest object by using the
 getRemoteUser method when the request is made from IIS?

 Any help here would be appreciated.
 
 The source says: we forward GetServerVariable of REMOTE_USER to 
 Tomcat. in order to let Tomcat trust the forwarded auth data, you have 
 to set tomcatAuthentication=false as an attribute on the connector 
 element in server.xml.
 
 Microsoft docs say: AUTH_USER:
 
 The name of the user as it is derived from the authorization header sent 
 by the client, before the user name is mapped to a Windows account. This 
 variable is no different from REMOTE_USER. If you have an authentication 
 filter installed on your Web server that maps incoming users to 
 accounts, use LOGON_USER to view the mapped user name.
 
 Regards,
 
 Rainer
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Question-on-workers.properties-file-tp28599711p28610057.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: Tomcat Jconsole

2010-05-19 Thread Ozgur Ozdemircili
Hi,

The solution that Hassan sent worked.

Thanks a  lot.



Özgür Özdemircili
http://www.acikkod.org
Code so clean you could eat off it


On Wed, May 19, 2010 at 5:28 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Ozgur Ozdemircili [mailto:ozgur.ozdemirc...@gmail.com]
  Subject: Re: Tomcat Jconsole
 
  -Dual core Intel(R) Xeon(R) CPU E3110  @ 3.00GHz  and 4 GB memory each.

 What does each mean?  Is the system running with 4 GB of memory or
 something more?

  The startup.sh configuration is not broken. I didnt wipe out anything.
  export CATALINA_OPTS=-XX:MaxPermSize=512m -Xms512m -Xmx2048m -server
   set CATALINA_OPTS=-Dcom.sun.management.jmxremote \
  -Dcom.sun.management.jmxremote.port=8999 \
  -Dcom.sun.management.jmxremote.ssl=false \
  -Dcom.sun.management.jmxremote.authenticate=false

 When you do an export of a variable, followed immediately by a set of the
 same variable, what do you think happens?  (The exact effect depends on the
 shell you're using.)

  I do not see the port open in local, I do not see the
  port open, logically  from remote.

 Because your CATALINA_OPTS settings are not visible.

  The error in catalina.out comes up when I add  the jxm options.
  Since it is in Catalina.out I am asking if it is important..

 Again, why do you think it's an error?  Have you compared that catalina.out
 with a normal Tomcat startup?

 Is there anything else of interest in the logs (not just catalina.out)?

  - 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




Re: CORBA and Tomcat

2010-05-19 Thread privat

Hello;

if I put this:
ORB.init(args, null); instad of this  ORB.init();


I get this:

org.omg.CORBA.OBJECT_NOT_EXIST:   vmcid: 0x5854  minor code: 1 
completed: No

sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
java.lang.Class.newInstance0(Class.java:350)
java.lang.Class.newInstance(Class.java:303)

com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)

com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_0.getSystemException(ReplyMessage_1_0.java:94)

com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)

com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:430)

com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)

com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)

com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:213)
org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)

org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
de.gad.gsi.naming.NameWrapper.init(NameWrapper.java:44)
de.gad.gsi.cbb.simpleTest.go(simpleTest.java:37)
org.apache.jsp.simple.index_jsp._jspService(index_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
- Original Message - 
From: pri...@samea.de

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, May 19, 2010 3:34 PM
Subject: Re: CORBA and Tomcat



Hello;

here are the requested informations:

 Server Informationen
 Tomcat Version JVM Version JVM Hersteller OS Name OS Version OS 
Architektur
 Apache Tomcat/5.5 1.5.0_14-b03 Sun Microsystems Inc. Linux 
2.6.18-6-686 i386



type Exception report

message

description The server encountered an internal error () that prevented it 
from fulfilling this request.


exception

org.apache.jasper.JasperException: ORBSingleton: access denied
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.SecurityException: ORBSingleton: access denied
com.sun.corba.se.impl.orb.ORBSingleton.string_to_object(ORBSingleton.java:348)
de.gad.gsi.naming.NameWrapper.init(NameWrapper.java:42)
de.gad.gsi.cbb.simpleTest.go(simpleTest.java:37)
org.apache.jsp.simple.index_jsp._jspService(index_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
- Original Message - 
From: Caldarale, Charles R chuck.caldar...@unisys.com

To: Tomcat Users List users@tomcat.apache.org
Sent: Wednesday, May 19, 2010 3:30 PM
Subject: RE: CORBA and Tomcat



From: pri...@samea.de [mailto:pri...@samea.de]
Subject: CORBA and Tomcat

Does somebody know something about this:
java.lang.SecurityException: ORBSingleton: access denied
com.sun.corba.se.impl.orb.ORBSingleton.string_to_object
   (ORBSingleton.java:348)


Tomcat version?

JVM version?

Platform?

Stack traces?

http://www.catb.org/~esr/faqs/smart-questions.html


I tried to connect to a CORBA-NameServer by using
a Servlet on Tomcat.


That means it's your code, not Tomcat's.


I also grant all premissions in the webapps.policy,
but it doesn't work.


That's not a file that supported versions of Tomcat are aware of.

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

Tomat monitoring

2010-05-19 Thread Ozgur Ozdemircili
Hi,

I am looking for tomcat monitorization solutions.I am looking to choose
between Jconsole and Javameleody

Does anyone use one of those on their prod environment? Any problems with
either?

Can you please share your experiences on the subject?

Thanks!


Özgür Özdemircili
http://www.acikkod.org
Code so clean you could eat off it


HELP with my first webapp thats live!

2010-05-19 Thread Yucca Nel
I am waiting on a book I ordered a while ago related =
to JSF but they take about a month to get here from Amazon. During =
development my application contained no bugs during user case testing.I =
am now seeing issues related to a graphic table banner that uses a few =
commandlink jsf tags that take (or are meant to) users to various areas =
of my site. The problem is I get a 404 when interacting with the image =
links and my suspicions aree that the root cause is due to 2 reasons =
possibly:
1) commandlink does not start a new request thereby causing the url  to =
be appended to existing url making it incorrect.
2) I am having to deploy an exploded war because my hosting provider =
fails to see that I simply can not upload my war and start it.

any suggestions as to why this is happening?  The code behind this =
is=20

h:form
table id=3DTable_01 width=3D800
   height=3D200 border=3D0 cellpadding=3D0 =
cellspacing=3D0
tr
td colspan=3D9
h:commandLink action=3Dhome =
title=3D#{hmsg.mainHomeLink}
h:graphicImage =
url=3D/images/main-home.gif width=3D800
height=3D158
alt=3D#{hmsg.brokenImage} =
style=3Dborder-style:none/

/h:commandLink /td
/tr
tr
td colspan=3D9
h:graphicImage =
url=3D/images/jarbar-banner_02.png width=3D800 height=3D3 =
alt=3D//td

/tr
tr
td colspan=3D3
h:graphicImage =
url=3D/images/jarbar-banner_03.png width=3D227 height=3D1 =
alt=3D//td
td rowspan=3D2
h:commandLink =
action=3Dtutorialstitle=3D#{hmsg.tutorialLink}
h:graphicImage =
url=3D/images/tutorials.gif width=3D161 height=3D33
=
alt=3D#{hmsg.brokenImage}style=3Dborder-style:none/
/h:commandLink/td
td colspan=3D5
h:graphicImage =
url=3D/images/jarbar-banner_05.png width=3D412 height=3D1 =
alt=3D#{hmsg.brokenImage}//td
/tr
tr
td rowspan=3D2
h:graphicImage =
url=3D/images/jarbar-banner_06.png width=3D31 height=3D38 =
alt=3D#{hmsg.brokenImage}//td
td rowspan=3D2
h:commandLink title=3D#{hmsg.mainHomeLink} =
action=3Dhome
h:graphicImage url=3D/images/home.gif =
width=3D160 height=3D38
=
alt=3D#{hmsg.brokenImage}style=3Dborder-style:none/
/h:commandLink/td
td rowspan=3D2
h:graphicImage =
url=3D/images/jarbar-banner_08.png width=3D36 height=3D38 =
alt=3D#{hmsg.brokenImage}//td
td rowspan=3D2
h:graphicImage =
url=3D/images/jarbar-banner_09.png width=3D35 height=3D38 =
alt=3D#{hmsg.brokenImage}//td
td h:commandLink =
action=3Dlinkstitle=3D#{hmsg.linksLink}
h:graphicImage =
url=3D/images/downloads.gif width=3D154 height=3D32
=
alt=3D#{hmsg.brokenImage}style=3Dborder-style:none/
/h:commandLink
/td
td rowspan=3D2
h:graphicImage =
url=3D/images/jarbar-banner_11.png width=3D28 height=3D38 =
alt=3D#{hmsg.brokenImage}//td
td
h:outputLink =
value=3D/pages/user/secure/contact.jsf

h:graphicImage =
url=3D/images/contact.png width=3D173 height=3D32
=
alt=3D#{hmsg.brokenImage}style=3Dborder-style:none/
/h:outputLink/td
td rowspan=3D2
h:graphicImage =
url=3D/images/jarbar-banner_13.png width=3D22 height=3D38 =
alt=3D#{hmsg.brokenImage}//td
/tr
tr
td
h:graphicImage =
url=3D/images/jarbar-banner_14.png width=3D161 height=3D6 =
alt=3D#{hmsg.brokenImage}//td
td
h:graphicImage =
url=3D/images/jarbar-banner_15.png width=3D154 height=3D6 =
alt=3D#{hmsg.brokenImage}//td
td
h:graphicImage =
url=3D/images/jarbar-banner_16.png width=3D173 height=3D6 =
alt=3D#{hmsg.brokenImage}//td
/tr
/table/h:form
   =20



where the actions directly linked to the respective pages in =
facesconfig.xml

more specifically, if I am currently on url/welcome.jsf and click home I =
get 404 as 

Re: mod_jk session stickiness on failover

2010-05-19 Thread JohnRiley

Right on target. I noticed that it was the emptySessionPath=true that
messed things up for me. When I removed it I got back to the wanted
behavior. However, the emptySessionPath is needed since we are using
mod_rewrite to change the url:s of the backend application. Otherwise we get
a JSessionID with a /path rather than /. 

When I removed the emptySessionPath we got back a new cookie with the
correct route. When I have it on I get no sessionId back at all. So the
solution would be that the root-context and my application should have the
same JSESSIONID (is it possible) or I can deploy my applicaiton in the root
directory.

/Johan



Rainer Jung-3 wrote:
 
 On 18.05.2010 12:35, JohnRiley wrote:

 Hi,

 We are load balancing 3 non-clustered tomcat 6.0 servers with the mod_jk
 connector in apache 2.0. We have sticky sessions enabled and it works
 fine
 until one of the servers goes down. What happens then is that it start
 round-robin between the other two since none of them wants to accept the
 JSESSIONID with the route of the crashed tomcat server.

 How can I make one of the other servers to create a new session with its
 own
 jvmRoute for that tomcat? Because right now we have a huge problem when
 taking down a server for maintenance. The user will change server on each
 request until the server that is down for maintenance is back up again.

 Do we really have to setup the tomcats in a cluster to accomplish this?
 
 Not sure I understand the real problem. If the app does not accept the 
 sessionid, I would expect it to create a new session (and a new 
 sessionid) using the correct local route.
 
 Do you use emptySessionPath in the connector configuration inside 
 server.xml?
 
 Can't you add a simple servlet filter overwriting the JSESSIONID cookie 
 if it's route doesn't match the local route?
 
 Regards,
 
 Rainer
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/mod_jk-session-stickiness-on-failover-tp28594156p28611785.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: Tomat monitoring

2010-05-19 Thread ziggy25

I use tomcat probe

Try it its quite good
--Original Message--
From: Ozgur Ozdemircili
To: Tomcat Users List
ReplyTo: Tomcat Users List
Subject: Tomat monitoring
Sent: May 19, 2010 17:40

Hi,

I am looking for tomcat monitorization solutions.I am looking to choose
between Jconsole and Javameleody

Does anyone use one of those on their prod environment? Any problems with
either?

Can you please share your experiences on the subject?

Thanks!


Özgür Özdemircili
http://www.acikkod.org
Code so clean you could eat off it



Sent from my BlackBerry® smartphone

Re: mod_jk session stickiness on failover

2010-05-19 Thread JohnRiley

Ok, even if I execute a jsp-page in tomcat root and get a cookie with path=/
I get this problem so it has nothing to to with sharing sessions between
applications or cookie not reaching it correctly. Things just seems to stop
working properly when I add  emptySessionPath=true. 

Any idéas?

/John


JohnRiley wrote:
 
 Right on target. I noticed that it was the emptySessionPath=true that
 messed things up for me. When I removed it I got back to the wanted
 behavior. However, the emptySessionPath is needed since we are using
 mod_rewrite to change the url:s of the backend application. Otherwise we
 get a JSessionID with a /path rather than /. 
 
 When I removed the emptySessionPath we got back a new cookie with the
 correct route. When I have it on I get no sessionId back at all. So the
 solution would be that the root-context and my application should have the
 same JSESSIONID (is it possible) or I can deploy my applicaiton in the
 root directory.
 
 /Johan
 
 
 
 Rainer Jung-3 wrote:
 
 On 18.05.2010 12:35, JohnRiley wrote:

 Hi,

 We are load balancing 3 non-clustered tomcat 6.0 servers with the mod_jk
 connector in apache 2.0. We have sticky sessions enabled and it works
 fine
 until one of the servers goes down. What happens then is that it start
 round-robin between the other two since none of them wants to accept the
 JSESSIONID with the route of the crashed tomcat server.

 How can I make one of the other servers to create a new session with its
 own
 jvmRoute for that tomcat? Because right now we have a huge problem when
 taking down a server for maintenance. The user will change server on
 each
 request until the server that is down for maintenance is back up again.

 Do we really have to setup the tomcats in a cluster to accomplish this?
 
 Not sure I understand the real problem. If the app does not accept the 
 sessionid, I would expect it to create a new session (and a new 
 sessionid) using the correct local route.
 
 Do you use emptySessionPath in the connector configuration inside 
 server.xml?
 
 Can't you add a simple servlet filter overwriting the JSESSIONID cookie 
 if it's route doesn't match the local route?
 
 Regards,
 
 Rainer
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/mod_jk-session-stickiness-on-failover-tp28594156p28612120.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: Question on workers.properties file

2010-05-19 Thread Rainer Jung

On 19.05.2010 17:37, savoym wrote:


Ranier - Thanks for the reply.  I have some questions on your response.  The
INT value that your get_server_value method returns how do I determine from
that what the userid is and more importantly, what calls this method and
populates the values for this method to run?

Sorry for the ignorance.


Sorry the code snippet wasn' actually meant to be included. i tried to 
answer your question below the original post.


The function is used internally, and the int value is only a return code 
(success or not). The function returns a string the the provided buffer 
buf, but that's all opaque to you. Check again for what I wrote below 
your original post.


Regards,

Rainer


Thanks again.

Rainer Jung-3 wrote:


static int get_server_value(LPEXTENSION_CONTROL_BLOCK lpEcb,
  char *name, char *buf, DWORD bufsz)
{
  DWORD sz = bufsz;
  buf[0]   = '\0';
  if (!lpEcb-GetServerVariable(lpEcb-ConnID, name,
buf, (LPDWORD)sz))
  return JK_FALSE;



On 18.05.2010 22:27, savoym wrote:


I just got IIS to forward my request to Tomcat using the Apache
Tomcat-Connectors doc.

I am trying to authenticate the user login/id that executes the request
to
my web app to be able to grab the user login and use in my java  app.

Has anyone on this list setup a server environment variable in the
workers.properties file that would equal the
REQUEST.SERVERVARIABLE(AUTH_USER) in IIS?

Can I get the same thing from the HttpServletRequest object by using the
getRemoteUser method when the request is made from IIS?

Any help here would be appreciated.


The source says: we forward GetServerVariable of REMOTE_USER to
Tomcat. in order to let Tomcat trust the forwarded auth data, you have
to set tomcatAuthentication=false as an attribute on the connector
element in server.xml.

Microsoft docs say: AUTH_USER:  

The name of the user as it is derived from the authorization header sent
by the client, before the user name is mapped to a Windows account. This
variable is no different from REMOTE_USER. If you have an authentication
filter installed on your Web server that maps incoming users to
accounts, use LOGON_USER to view the mapped user name.

Regards,

Rainer



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



Re: mod_jk session stickiness on failover

2010-05-19 Thread Rainer Jung

On 19.05.2010 20:12, JohnRiley wrote:


Ok, even if I execute a jsp-page in tomcat root and get a cookie with path=/
I get this problem so it has nothing to to with sharing sessions between
applications or cookie not reaching it correctly. Things just seems to stop
working properly when I add  emptySessionPath=true.

Any idéas?


Yes: emptySessionPath does two things:

- it sets the cookie path to /, so that all contexts receive the same 
same session cookie
- if a context gets a cookie and doesn't already have a session with the 
requested ID, it creates a new session with the requested ID.


The second feature is where it fails for you, because now the jvmRoute 
is wrong.


I would try working around using a servlet filter, but I'm not sure, how 
early in request processing emptySessionPath kicks in.


There is a patch proposed for inclusion in TC 6 to make the session 
cookie path configurable. Not unlikely it will make it into 6.0.27. You 
can have a look at


http://people.apache.org/~markt/patches/2010-05-18-bug48379.patch

Regards,

Rainer


JohnRiley wrote:


Right on target. I noticed that it was the emptySessionPath=true that
messed things up for me. When I removed it I got back to the wanted
behavior. However, the emptySessionPath is needed since we are using
mod_rewrite to change the url:s of the backend application. Otherwise we
get a JSessionID with a /path rather than /.

When I removed the emptySessionPath we got back a new cookie with the
correct route. When I have it on I get no sessionId back at all. So the
solution would be that the root-context and my application should have the
same JSESSIONID (is it possible) or I can deploy my applicaiton in the
root directory.

/Johan



Rainer Jung-3 wrote:


On 18.05.2010 12:35, JohnRiley wrote:


Hi,

We are load balancing 3 non-clustered tomcat 6.0 servers with the mod_jk
connector in apache 2.0. We have sticky sessions enabled and it works
fine
until one of the servers goes down. What happens then is that it start
round-robin between the other two since none of them wants to accept the
JSESSIONID with the route of the crashed tomcat server.

How can I make one of the other servers to create a new session with its
own
jvmRoute for that tomcat? Because right now we have a huge problem when
taking down a server for maintenance. The user will change server on
each
request until the server that is down for maintenance is back up again.

Do we really have to setup the tomcats in a cluster to accomplish this?


Not sure I understand the real problem. If the app does not accept the
sessionid, I would expect it to create a new session (and a new
sessionid) using the correct local route.

Do you use emptySessionPath in the connector configuration inside
server.xml?

Can't you add a simple servlet filter overwriting the JSESSIONID cookie
if it's route doesn't match the local route?

Regards,

Rainer

-
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: Question on workers.properties file

2010-05-19 Thread savoym

Ranier,

Thank you for the clarification.

As far as your instruction, let me ask the following if you don't mind:

What source are you referring to?  Do you have a URL for this source?

Also, I've been trying to pickup this AUTH_USER from the
HttpServletRequest.  Is that not where I can pick it up from?  I thought I
could access it from the client request via the tomcat connector but I did
not know how to do that.  

That is what I'm trying to get at to pass into my authentication method. 
Again, any help/direction would be greatly appreciated.

Thanks again so much.


Rainer Jung-3 wrote:
 
 On 19.05.2010 17:37, savoym wrote:

 Ranier - Thanks for the reply.  I have some questions on your response. 
 The
 INT value that your get_server_value method returns how do I determine
 from
 that what the userid is and more importantly, what calls this method and
 populates the values for this method to run?

 Sorry for the ignorance.
 
 Sorry the code snippet wasn' actually meant to be included. i tried to 
 answer your question below the original post.
 
 The function is used internally, and the int value is only a return code 
 (success or not). The function returns a string the the provided buffer 
 buf, but that's all opaque to you. Check again for what I wrote below 
 your original post.
 
 Regards,
 
 Rainer
 
 Thanks again.

 Rainer Jung-3 wrote:

 static int get_server_value(LPEXTENSION_CONTROL_BLOCK lpEcb,
   char *name, char *buf, DWORD bufsz)
 {
   DWORD sz = bufsz;
   buf[0]   = '\0';
   if (!lpEcb-GetServerVariable(lpEcb-ConnID, name,
 buf, (LPDWORD)sz))
   return JK_FALSE;



 On 18.05.2010 22:27, savoym wrote:

 I just got IIS to forward my request to Tomcat using the Apache
 Tomcat-Connectors doc.

 I am trying to authenticate the user login/id that executes the request
 to
 my web app to be able to grab the user login and use in my java  app.

 Has anyone on this list setup a server environment variable in the
 workers.properties file that would equal the
 REQUEST.SERVERVARIABLE(AUTH_USER) in IIS?

 Can I get the same thing from the HttpServletRequest object by using
 the
 getRemoteUser method when the request is made from IIS?

 Any help here would be appreciated.

 The source says: we forward GetServerVariable of REMOTE_USER to
 Tomcat. in order to let Tomcat trust the forwarded auth data, you have
 to set tomcatAuthentication=false as an attribute on the connector
 element in server.xml.

 Microsoft docs say: AUTH_USER:  

 The name of the user as it is derived from the authorization header sent
 by the client, before the user name is mapped to a Windows account. This
 variable is no different from REMOTE_USER. If you have an authentication
 filter installed on your Web server that maps incoming users to
 accounts, use LOGON_USER to view the mapped user name.

 Regards,

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

-- 
View this message in context: 
http://old.nabble.com/Question-on-workers.properties-file-tp28599711p28612937.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: HELP with my first webapp thats live!

2010-05-19 Thread André Warnier

Yucca Nel wrote:

I am waiting on a book I ordered a while ago related =
to JSF but they take about a month to get here from Amazon. 


Try this :
http://www.lmgtfy.com/?q=jsf+tutorial

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



Re: Question on workers.properties file

2010-05-19 Thread André Warnier

savoym wrote:

I just got IIS to forward my request to Tomcat using the Apache
Tomcat-Connectors doc. 


I am trying to authenticate the user login/id that executes the request to
my web app to be able to grab the user login and use in my java  app. 

Can you explain a little bit more in detail, or maybe just in another 
way, what you are trying to achieve ?
Are users already authenticated by IIS (as per their Windows Domain 
user-id), before IIS forwards the request to Tomcat ? And do you want to 
retrieve this user-id in Tomcat ?



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



Re: Prevent JSP Session

2010-05-19 Thread Bill Au
I an actually facing the same situation.  Is it possible to disable JSP
sessions once and for all with a configuration setting?  Adding the page
directive to disable session to each JSP should work but I am afraid that
our developers will not always remember to do so.

Bill

On Wed, May 19, 2010 at 9:24 AM, Brett Birschbach 
brett.birschb...@hs2solutions.com wrote:

 Always happens...as soon as I ask the question, I figure out the answer.

 The problem is I am running c:import tags to import some JSPs, and those
 imported JSPs do not have the %@ page session=false % directive.  If I
 add the directive to those JSPs, I'm golden.

 --
 Brett Birschbach
 HS2 Solutions, Inc
 brett.birschb...@hs2solutions.com
 (773) 296-2600 x501


 -Original Message-
 From: Brett Birschbach [mailto:brett.birschb...@hs2solutions.com]
 Sent: Wednesday, May 19, 2010 8:16 AM
 To: users@tomcat.apache.org
 Subject: Prevent JSP Session

 I am currently running Tomcat 6.0.24 on a Windows Vista machine.

 The web app I am developing will be deployed to a cloud, where server
 affinity will be thrown to the wind.  Thus, instead of relying on tomcat to
 manage my session, I am instead managing the session via manual cookies and
 a database.

 Being that I cannot leverage the tomcat session, I don't want to create a
 session at all.  This has a two-fold benefit:

 1)  Slight performance increase due to avoiding session creation
 overhead

 2)  I can put a session listener in place to log an error if ever a
 session is created, to ensure that we are not using the tomcat session in
 the development environment where everything would appear to be fine until
 we deploy to the cloud.

 According to JSP spec, I believe I should be able to use the following
 directive to prevent a session from being created by my JSPs: %@ page
 session=false %.  However, even when doing so, I am still getting a
 session created by the internals of the JSP container.  Is there something I
 am doing wrong?  Is it possibly a bug in Tomcat 6.0.24 (couldn't find it on
 Bugzilla)?  Or is it simply a necessary evil?

 The generated JSP code that is triggering the session is:  pageContext
 = _jspxFactory.getPageContext(this, request, response, null, true, 8192,
 true);

 Below is the relevant portion of an exact stack trace:
at
 org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:854)
at
 org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291)
at
 org.apache.catalina.connector.Request.doGetSession(Request.java:2392)
at
 org.apache.catalina.connector.Request.getSession(Request.java:2098)
at
 org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)
at
 javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:216)
at
 org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:544)
at
 org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:493)
at
 org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:146)
at
 org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:124)
at
 org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:107)
at
 org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:63)
at
 org.apache.jsp.layouts.nav.layout_005fnav_002dadmin_jsp._jspService(layout_005fnav_002dadmin_jsp.java:44)
at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 Thanks!

 --
 Brett Birschbach
 HS2 Solutions, Inc
 brett.birschb...@hs2solutions.com


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




Re: mod_jk session stickiness on failover

2010-05-19 Thread Mark Thomas
On 19/05/2010 18:48, JohnRiley wrote:
 
 Right on target. I noticed that it was the emptySessionPath=true that
 messed things up for me. When I removed it I got back to the wanted
 behavior. However, the emptySessionPath is needed since we are using
 mod_rewrite to change the url:s of the backend application. Otherwise we get
 a JSessionID with a /path rather than /. 

Again, something that is easy to fix if you are using mod_proxy rather
than mod_jk.

You should be able to use mod_headers to re-write the cookie header on
the way back to correct the path.

Mark



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



Re: Question on workers.properties file

2010-05-19 Thread savoym

Yes.  The users are already being authenticated by IIS before IIS forwards
the request to Tomcat.  And yes, I am wanting to retrieve in my java app
this userid from what I thought would be through the HttpServletRequest
class.  However, that is not working.  I tried to retrieve it using this
class on the header Authorization but I am still getting a NULL value. 

I understood, that maybe through the workers.properties file I could SET a
server environment variable using the Request.ServerVariable(AUTH_USER)
method but I'm not sure how to accomplish that if that is a possibility.

I guess I'm just not sure how to get at the USERID that IIS should already
have in some form or fashion.

I hope that is more clear.  I appreciate very much the question and reply.

Regards.



awarnier wrote:
 
 savoym wrote:
 I just got IIS to forward my request to Tomcat using the Apache
 Tomcat-Connectors doc. 
 
 I am trying to authenticate the user login/id that executes the request
 to
 my web app to be able to grab the user login and use in my java  app. 
 
 Can you explain a little bit more in detail, or maybe just in another 
 way, what you are trying to achieve ?
 Are users already authenticated by IIS (as per their Windows Domain 
 user-id), before IIS forwards the request to Tomcat ? And do you want to 
 retrieve this user-id in Tomcat ?
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Question-on-workers.properties-file-tp28599711p28615200.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



clearThreadLocalMap

2010-05-19 Thread Leo Donahue - PLANDEVX
These show up in my Catalina logs, not very often - maybe half a dozen per day. 
 Does this mean I didn't clean up my variables correctly in my webapp?

May 18, 2010 7:51:01 PM org.apache.catalina.loader.WebappClassLoader 
clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type [null] (value 
[javax.faces.context.facescontex...@724356]) and a value of type [null] (value 
[null]) but failed to remove it when the web application was stopped. To 
prevent a memory leak, the ThreadLocal has been forcibly removed.

Using CATALINA_BASE:   C:\apache-tomcat-6.0.24
Using CATALINA_HOME:   C:\apache-tomcat-6.0.24
Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.24\temp
Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_14
Using CLASSPATH:   C:\apache-tomcat-6.0.24\bin\bootstrap.jar
Server version: Apache Tomcat/6.0.24
Server built:   January 19 2010 1439
Server number:  6.0.0.0
OS Name:Windows 2003
OS Version: 5.2
Architecture:   x86
JVM Version:1.6.0_14-b08
JVM Vendor: Sun Microsystems Inc.

Leo



Re: clearThreadLocalMap

2010-05-19 Thread Mark Thomas
On 19/05/2010 23:46, Leo Donahue - PLANDEVX wrote:
 These show up in my Catalina logs, not very often - maybe half a dozen per 
 day.  Does this mean I didn't clean up my variables correctly in my webapp?

Looks like a false positive. It is fixed in 6.0.26.

Mark

 
 May 18, 2010 7:51:01 PM org.apache.catalina.loader.WebappClassLoader 
 clearThreadLocalMap
 SEVERE: A web application created a ThreadLocal with key of type [null] 
 (value [javax.faces.context.facescontex...@724356]) and a value of type 
 [null] (value [null]) but failed to remove it when the web application was 
 stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
 
 Using CATALINA_BASE:   C:\apache-tomcat-6.0.24
 Using CATALINA_HOME:   C:\apache-tomcat-6.0.24
 Using CATALINA_TMPDIR: C:\apache-tomcat-6.0.24\temp
 Using JRE_HOME:C:\Program Files\Java\jdk1.6.0_14
 Using CLASSPATH:   C:\apache-tomcat-6.0.24\bin\bootstrap.jar
 Server version: Apache Tomcat/6.0.24
 Server built:   January 19 2010 1439
 Server number:  6.0.0.0
 OS Name:Windows 2003
 OS Version: 5.2
 Architecture:   x86
 JVM Version:1.6.0_14-b08
 JVM Vendor: Sun Microsystems Inc.
 
 Leo
 
 




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



Re: too man open files?

2010-05-19 Thread Licht Jiang
Thanks for your help. I found out that actually those 3 xml files:
._Push.xml, ._host-manager.xml and ._manager.xml should not be there.
There were there may be because an unexpected termination of tomcat. I
deleted them and actually removed Push.xml as well and everything goes
back to normal.

On Sat, May 15, 2010 at 2:21 AM, Pid p...@pidster.com wrote:
 On 14/05/2010 22:44, Licht Jiang wrote:
 I run a servlet on tomcat 5.5.27, jvm 1.6.0_10-b33, and fedora
 2.6.21.7-2.fc8xen. The service has a problem: after running for a
 certain time, the servlet becomes unavailable because of too many
 open files exception:

 2010-05-13 23:58:14,575 DEBUG  - Reload config...
 2010-05-13 23:58:14,575 ERROR  - java.io.FileNotFoundException:
 /root/Applications/tomcat-dev/webapps/MyServices/WEB-INF/classes/conf/MyConf.properties
 (Too many open files)

 To find out actually what files were opened too many times, I listed
 all of them and some of them are shown below:

 Shutdown Tomcat  check it has definitely stopped running.

 Please provide a complete directory listing for:

  /root/Applications/tomcat-dev/conf/Catalina/localhost
  /root/Applications/tomcat-dev/webapps

 Please provide the contents of your server.xml, with all comments  any
 passwords removed.

 Please post the code you are using in your servlet, to open  read
 MyConf.properties.


 p



 ...
 java    11515 root  282r   REG    8,1      197 182030
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._manager.xml
 java    11515 root  283r   REG    8,1      197 182028
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._host-manager.xml
 java    11515 root  284r   REG    8,1      197 182032
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._Push.xml
 java    11515 root  285r   REG    8,1      197 182030
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._manager.xml
 java    11515 root  286r   REG    8,1      197 182028
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._host-manager.xml
 java    11515 root  287r   REG    8,1      197 182032
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._Push.xml
 java    11515 root  288r   REG    8,1      197 182028
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._host-manager.xml
 java    11515 root  289r   REG    8,1      197 182032
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._Push.xml
 java    11515 root  290r   REG    8,1      197 182030
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._manager.xml
 java    11515 root  291r   REG    8,1      197 182028
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._host-manager.xml
 java    11515 root  292r   REG    8,1      197 182032
 /root/Applications/tomcat-dev/conf/Catalina/localhost/._Push.xml
 ...

 where java 11515 is tomcat. MyConf.properties does not appear on
 the above list. So, it is obvious the problem is due to those 3 xml
 files. Seems that tomcat keeps opening these 3 xml files until the
 limit is reached.

 So, my question is why tomcat keeps opening them and what is the
 trigger of the operation? For your reference, these 3 files are
 listed:

 _Push.xml___

 !-- The contents of this file will be loaded for each web application --
 Context

     !-- Default set of monitored resources --
     WatchedResourceWEB-INF/web.xml/WatchedResource

     !-- Uncomment this to disable session persistence across Tomcat
 restarts --
     Manager pathname= /

     Resource name=jdbc/CEDB auth=Container type=javax.sql.DataSource
                maxActive=20 maxIdle=30 maxWait=1
                username=username password=secret
 driverClassName=com.mysql.jdbc.Driver
                url=jdbc:mysql://hostname:1234/ABCD?autoReconnect=true
                validationQuery=select count(*) from Partner;
 testOnReturn=true testWhileIdle=true
                removeAbandoned=true logAbandoned=true  /

 /Context

 _manager.xml___

 ?xml version=1.0 encoding=UTF-8?
 !--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the License); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an AS IS BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 --
 !--

     Context configuration file for the Tomcat Manager Web App

     $Id: manager.xml 565211 2007-08-13 00:09:38Z markt $

 --


 Context docBase=${catalina.home}/server/webapps/manager
          privileged=true antiResourceLocking=false 
 

Keeping tomcat up-to-date on linux

2010-05-19 Thread Dale Ogilvie
Hi,

The current release is 6.0.26, March 2010.

RHEL5.x is running with Tomcat 5.5.

Fedora 12 is on 6.0.20, June 2009 vintage. 

Ubuntu 10.04 is on 6.0.24 from Jan 2010.

Ideally, the equivalent of a yum update would track tomcat releases so
that soon after a tomcat release the tomcat6 package would move to the
next minor release. Does this happen for any distro out there?

What do people do to keep their tomcat patched up?

Thanks

Dale


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



Re: Keeping tomcat up-to-date on linux

2010-05-19 Thread Hassan Schroeder
On Wed, May 19, 2010 at 7:03 PM, Dale Ogilvie
dale.ogil...@trimble.co.nz wrote:

 What do people do to keep their tomcat patched up?

I watch this list for announcements of new releases and install them :-)

Of course, reading the release notes lets me decide how urgently that
needs to happen and/or how much testing I want to do before going to
production with a new version.

FWIW,
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



RE: Keeping tomcat up-to-date on linux

2010-05-19 Thread Dale Ogilvie
Hassan Schroeder wrote:

 I watch this list for announcements of new releases and install them
:-)

I'm hoping for something a bit more distro managed. Presumably your
method means you have to maintain your own init.d scripts and use the
tar xzvf method of installation, outside of your distro package
management system.

On Windows, I at least have an installer that takes care of these tasks
for me.

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



Re: Keeping tomcat up-to-date on linux

2010-05-19 Thread Hassan Schroeder
On Wed, May 19, 2010 at 7:39 PM, Dale Ogilvie
dale.ogil...@trimble.co.nz wrote:

 I'm hoping for something a bit more distro managed. Presumably your
 method means you have to maintain your own init.d scripts and use the
 tar xzvf method of installation, outside of your distro package
 management system.

I don't recall ever having to change anything but the paths in the init.d
script, but yes, I do use `tar xvfz` to install. Which means I can install in
parallel to any other running instance(s) and test before cutting over.

The inability to do that with any package managers I'm aware of, plus
the release gap, is why I don't bother with them. Untarring a file just
doesn't seem all that onerous to me.

 On Windows, I at least have an installer that takes care of these tasks
 for me.

On Windows, I -- oh wait, I don't use Windows :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



RE: Keeping tomcat up-to-date on linux

2010-05-19 Thread Dale Ogilvie
 
Yes, the release gap is an issue for me as well. Hence this email trail
:-)

Parallelism is achieved for us for other software by package updating
the test/dev server and testing that prior to performing the same
updates on prod. There is no need for us to have two versions of tomcat
running on the same host. So, if the package manager would just stay
up-to-date with tomcat releases it would mean we wouldn't have to have
special practices for Tomcat 6.

I'm pleased to hear that the upgrade process is trivial with your setup.
If you're going to have special practices, they might as well be simple.

On what did you base your init.d scripts? And what is your underlying
distro? We use redhat/fedora.

Dale

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



Re: Keeping tomcat up-to-date on linux

2010-05-19 Thread Hassan Schroeder
On Wed, May 19, 2010 at 8:55 PM, Dale Ogilvie
dale.ogil...@trimble.co.nz wrote:

 I'm pleased to hear that the upgrade process is trivial with your setup.
 If you're going to have special practices, they might as well be simple.

Since I don't use package management for anything important, it's
not special practice :-)

 On what did you base your init.d scripts?

Don't remember, actually; I've been using pretty much the same
basic version for a long time. I mean, it's just a shell script, eh?

 And what is your underlying distro? We use redhat/fedora.

As a consultant, whatever the client's running; my own dev desktop
system is SuSE, my own production server is RHEL, and I've got a
couple of different Linux VMs on my MBP for testing. That changes
periodically. And of course I'm running multiple Tomcats on the Mac
too :-)

Which, now that I think of it, is a good reason to install from the
tar file; it's the same everywhere. I don't have to use yum here,
rpm there -- the same simple drill works *everywhere*.

Obviously, your situation sounds quite different from mine :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



Re: Keeping tomcat up-to-date on linux

2010-05-19 Thread Thad Humphries
Exactly right, Hassan. I think it is extremely unwise to leave any critical
portion of one's system--personal, development, or production--at the hands
of the distro. I've used Linux for over a decade, and install Apache, Java,
Tomcat, etc. by hand. ALWAYS. Oft times I build Apache myself.

On Wed, May 19, 2010 at 10:25 PM, Hassan Schroeder 
hassan.schroe...@gmail.com wrote:

 On Wed, May 19, 2010 at 7:03 PM, Dale Ogilvie
 dale.ogil...@trimble.co.nz wrote:

  What do people do to keep their tomcat patched up?

 I watch this list for announcements of new releases and install them :-)

 Of course, reading the release notes lets me decide how urgently that
 needs to happen and/or how much testing I want to do before going to
 production with a new version.

 FWIW,


-- 
Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be --Christopher
Marlowe, 'Doctor Faustus' (v, 121-24)