RE: CLOSE_WAIT and what to do about it

2009-04-14 Thread Peter Crowther
 From: André Warnier [mailto:a...@ice-sa.com]
  public void close()
  throws SomeException
  {
  putEndRequest();
  flush();
  socket = null;
  }
 flush() being another function which reads the socket until there's
 nothing left to read, and throws away the result.
 socket is a property of the object created by this class, obtained
 somewhere else from a java.net.Socket object.
 Looking at that code above, it is obvious that socket is open, until
 it is set to null, without previously doing a socket.close().
 I don't know Java enough to know if this alone could cause that socket
 to be lingering until the GC, but I kind of suspect so.

Nice piece of detective work, André!  Yes, that code's broken - the socket's 
not referenced but not closed, so it will stay open until a GC tidies it up.

$deity only knows what the original developer was thinking when they wrote that.

- Peter

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



Help with mod_jk and Apache 2.2

2009-04-14 Thread Security Management
So, I have Tomcat 5.5, apache 2.2 on a linux 32 bit machine.  Tomcat and my
webapp work great, I just can't seem to get the connector working.  Sorry if
this is a basic question, but even with the debugging on I can't see what is
wrong.  I have listed 3 files here, my httpd config, my workers.properties,
and my uri mappings file.  I would appreciate any advice.  Here is the error
I'm getting:

[Tue Apr 14 09:20:34 2009] [565:3085756960] [debug] jk_child_init::mod_jk.c
(3068): Initialized mod_jk/1.2.28
[Tue Apr 14 09:20:43 2009] [558:3085756960] [debug] jk_translate::mod_jk.c
(3419): missing uri map for sirrus.smc:/appsuite/
[Tue Apr 14 09:20:43 2009] [558:3085756960] [debug]
jk_map_to_storage::mod_jk.c (3579): missing uri map for sirrus.smc/appsuite/

I have tried changing the hostname from localhost to sirrus.smc, but with no
luck.

Here is the mod_jk config:

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkMountFile /etc/httpd/conf.d/uriworkermap.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkShmFile /var/log/httpd/JkShmFile


Here is the workers.properties:

workers.tomcat_home=/var/www/apache-tomcat-5.5.27/

# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=/usr/java/latest

# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=/

# The workers that your plugins should create and work with
#
worker.list=worker1

#-- DEFAULT ajp13 WORKER DEFINITION --
#-
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.worker1.type=ajp13
worker.worker1.host=localhost

Here is the JkMountFile:

/appsuite=worker1


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



Re: Help with mod_jk and Apache 2.2

2009-04-14 Thread André Warnier

Security Management wrote:

So, I have Tomcat 5.5, apache 2.2 on a linux 32 bit machine.  Tomcat and my
webapp work great, I just can't seem to get the connector working.  Sorry if
this is a basic question, but even with the debugging on I can't see what is
wrong.  I have listed 3 files here, my httpd config, my workers.properties,
and my uri mappings file.  I would appreciate any advice.  Here is the error
I'm getting:

[Tue Apr 14 09:20:34 2009] [565:3085756960] [debug] jk_child_init::mod_jk.c
(3068): Initialized mod_jk/1.2.28
[Tue Apr 14 09:20:43 2009] [558:3085756960] [debug] jk_translate::mod_jk.c
(3419): missing uri map for sirrus.smc:/appsuite/
[Tue Apr 14 09:20:43 2009] [558:3085756960] [debug]
jk_map_to_storage::mod_jk.c (3579): missing uri map for sirrus.smc/appsuite/

I have tried changing the hostname from localhost to sirrus.smc, but with no
luck.

Here is the mod_jk config:

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkMountFile /etc/httpd/conf.d/uriworkermap.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkShmFile /var/log/httpd/JkShmFile


Here is the workers.properties:

workers.tomcat_home=/var/www/apache-tomcat-5.5.27/

# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=/usr/java/latest

# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=/

# The workers that your plugins should create and work with
#
worker.list=worker1

#-- DEFAULT ajp13 WORKER DEFINITION --
#-
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.worker1.type=ajp13
worker.worker1.host=localhost


here you seem to be missing a line
 worker.worker1.port=   ( = the port on which your Tomcat AJP 
connector is listening)




Here is the JkMountFile:

/appsuite=worker1

add
/appsuite/* = worker1

explanation : /appsuite will match just that, /appsuite. It is not 
to be interpreted as /appsuite and anything below it.

To say /appsuite and anything below it, you need the two lines.
You could also use /appsuite*, but then it would also match 
/appsuiteandanythingelse, which is probably not what you want.





-
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: Help with mod_jk and Apache 2.2

2009-04-14 Thread Antonio Vidal Ferrer
Hi.

I guess the = sign in your jkmount file is wrong.
It should say:
/appsuite   worker1


Best,

Toni

-Original Message-
From: Security Management [mailto:list-subscripti...@secmgmt.com] 
Sent: martes, 14 de abril de 2009 15:29
To: 'Tomcat Users List'
Subject: Help with mod_jk and Apache 2.2

So, I have Tomcat 5.5, apache 2.2 on a linux 32 bit machine.  Tomcat and my
webapp work great, I just can't seem to get the connector working.  Sorry if
this is a basic question, but even with the debugging on I can't see what is
wrong.  I have listed 3 files here, my httpd config, my workers.properties,
and my uri mappings file.  I would appreciate any advice.  Here is the error
I'm getting:

[Tue Apr 14 09:20:34 2009] [565:3085756960] [debug] jk_child_init::mod_jk.c
(3068): Initialized mod_jk/1.2.28
[Tue Apr 14 09:20:43 2009] [558:3085756960] [debug] jk_translate::mod_jk.c
(3419): missing uri map for sirrus.smc:/appsuite/
[Tue Apr 14 09:20:43 2009] [558:3085756960] [debug]
jk_map_to_storage::mod_jk.c (3579): missing uri map for sirrus.smc/appsuite/

I have tried changing the hostname from localhost to sirrus.smc, but with no
luck.

Here is the mod_jk config:

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkMountFile /etc/httpd/conf.d/uriworkermap.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkShmFile /var/log/httpd/JkShmFile


Here is the workers.properties:

workers.tomcat_home=/var/www/apache-tomcat-5.5.27/

# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=/usr/java/latest

# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=/

# The workers that your plugins should create and work with
#
worker.list=worker1

#-- DEFAULT ajp13 WORKER DEFINITION --
#-
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.worker1.type=ajp13
worker.worker1.host=localhost

Here is the JkMountFile:

/appsuite=worker1


-
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: Help with mod_jk and Apache 2.2

2009-04-14 Thread André Warnier

Antonio Vidal Ferrer wrote:

Hi.

I guess the = sign in your jkmount file is wrong.
It should say:
/appsuite   worker1


Not according to this :
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html



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



RE: Help with mod_jk and Apache 2.2

2009-04-14 Thread Security Management
Yeah, I saw that, and it's now:

/smc-appsuite|/*=worker1

Which should match /appsuite/ and /appsuite/*

Still not working, though.  Same problem.  Any more ideas?

Thanks for the help,
Mike.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 10:03 AM
To: Tomcat Users List
Subject: Re: Help with mod_jk and Apache 2.2

Antonio Vidal Ferrer wrote:
 Hi.
 
 I guess the = sign in your jkmount file is wrong.
 It should say:
 /appsuite worker1
 
Not according to this :
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html



-
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



HTTP 500 Error in redirection

2009-04-14 Thread MMcElroy

Hi, I'm having a problem with my IIS redirect to Tomcat.

Whenever I access http://localhost/examples/helloworld.jsp, I get an HTTP
500 error, but if I try http://localhost:8080/examples/helloworld.jsp, I get
the hello world output.

Workers.properties:
workers.tomcat_home=C:\Program Files\Apache Software Foundation\Tomcat 5.5\

workers.java_home=C:\Program Files\Java\jre6\

ps=\

worker.list=testworker

worker.testworker.port=8009
worker.testworker.host=localhost
worker.testworker.type=ajp13

uriworkermap.properties:
/examples/*=testworker
/examples/*.jsp=testworker

jk_iis.log:  (Cut timestamp)
[info] jk_isapi_plugin.c (2405): Starting
Jakarta/ISAPI/isapi_redirector/1.2.28
[debug] jk_isapi_plugin.c (2423): Detected IIS version 5.1
[debug] jk_isapi_plugin.c (2428): Using registry.
[debug] jk_isapi_plugin.c (2431): Using log file C:\Program Files\Apache
Software Foundation\Tomcat 5.5\logs\jk_iis.log.
[debug] jk_isapi_plugin.c (2432): Using log level 0.
[debug] jk_isapi_plugin.c (2433): Using extension uri
/tomcat/isapi_redirector.dll.
[debug] jk_isapi_plugin.c (2434): Using worker file C:\Program Files\Apache
Software Foundation\Tomcat 5.5\conf\workers.properties.
[debug] jk_isapi_plugin.c (2435): Using worker mount file C:\Program
Files\Apache Software Foundation\Tomcat 5.5\conf\uriworkermap.properties.
[debug] jk_isapi_plugin.c (2437): Using rewrite rule file .
[debug] jk_isapi_plugin.c (2439): Using uri select 3.
[debug] jk_isapi_plugin.c (2440): Using no chunked encoding.
[debug] jk_isapi_plugin.c (2442): Using notification event
SF_NOTIFY_AUTH_COMPLETE (0x0400)
[debug] jk_isapi_plugin.c (2452): Using uri header TOMCATURI6A6B:.
[debug] jk_isapi_plugin.c (2453): Using query header TOMCATQUERY6A6B:.
[debug] jk_isapi_plugin.c (2454): Using worker header TOMCATWORKER6A6B:.
[debug] jk_isapi_plugin.c (2455): Using worker index
TOMCATWORKERIDX6A6B:.
[debug] jk_isapi_plugin.c (2456): Using translate header
TOMCATTRANSLATE6A6B:.
[debug] jk_isapi_plugin.c (2457): Using a default of 250 connections per
pool.
[trace] jk_uri_worker_map.c (204): enter
[trace] jk_uri_worker_map.c (240): exit
[debug] jk_map.c (491): Adding property '/examples/*' with value
'testworker' to map.
[debug] jk_map.c (491): Adding property '/examples/*.jsp' with value
'testworker' to map.
[debug] jk_uri_worker_map.c (1102): Loading urimaps from C:\Program
Files\Apache Software Foundation\Tomcat 5.5\conf\uriworkermap.properties
with reload check interval 60 seconds
[trace] jk_uri_worker_map.c (331): enter
[trace] jk_uri_worker_map.c (358): exit
[trace] jk_uri_worker_map.c (591): enter
[debug] jk_uri_worker_map.c (720): wildchar rule '/examples/*=testworker'
source 'uriworkermap' was added
[trace] jk_uri_worker_map.c (755): exit
[trace] jk_uri_worker_map.c (591): enter
[debug] jk_uri_worker_map.c (720): wildchar rule
'/examples/*.jsp=testworker' source 'uriworkermap' was added
[trace] jk_uri_worker_map.c (755): exit
[trace] jk_uri_worker_map.c (166): enter
[debug] jk_uri_worker_map.c (171): uri map dump after file load: index=0
file='C:\Program Files\Apache Software Foundation\Tomcat
5.5\conf\uriworkermap.properties' reject_unsafe=0 reload=60
modified=1239660488 checked=1239730570
[debug] jk_uri_worker_map.c (176): generation 0: size=0 nosize=0 capacity=0
[debug] jk_uri_worker_map.c (176): generation 1: size=2 nosize=0 capacity=4
[debug] jk_uri_worker_map.c (186): NEXT (1) map #0: uri=/examples/*.jsp
worker=testworker context=/examples/*.jsp source=uriworkermap type=Wildchar
len=15
[debug] jk_uri_worker_map.c (186): NEXT (1) map #1: uri=/examples/*
worker=testworker context=/examples/* source=uriworkermap type=Wildchar
len=11
[trace] jk_uri_worker_map.c (195): exit
[debug] jk_map.c (491): Adding property 'workers.tomcat_home' with value
'C:\Program Files\Apache Software Foundation\Tomcat 5.5\' to map.
[debug] jk_map.c (491): Adding property 'workers.java_home' with value
'C:\Program Files\Java\jre6\' to map.
[debug] jk_map.c (491): Adding property 'ps' with value '\' to map.
[debug] jk_map.c (491): Adding property 'worker.list' with value
'testworker' to map.
[debug] jk_map.c (491): Adding property 'worker.testworker.port' with value
'8009' to map.
[debug] jk_map.c (491): Adding property 'worker.testworker.host' with value
'localhost' to map.
[debug] jk_map.c (491): Adding property 'worker.testworker.type' with value
'ajp13' to map.
[trace] jk_map.c (766): enter
[debug] jk_map.c (774): Checking for references with prefix worker. with
wildcard (recursion 1)
[trace] jk_map.c (830): exit
[trace] jk_shm.c (97): enter
[debug] jk_shm.c (132): shared memory will contain 1 ajp workers of size 256
and 0 lb workers of size 320 with 0 members of size 384+256
[trace] jk_shm.c (139): exit
[trace] jk_shm.c (155): enter
[debug] jk_shm.c (254): Initialized shared memory JKISAPISHMEM_LOCALHOST_1
size=384 free=256 addr=0x172
[trace] jk_shm.c (260): exit
[trace] jk_worker.c (50): enter
[debug] jk_map.c (589): Dump of map: 

Help with PersistenceManager

2009-04-14 Thread Vinicius Carvalho
Hello all!
We have an application that serves a few users (currently we have
around 1300 sessions created, =~ 300 active), but due to our own bad
development team, our session is a monster session (We are fixing
this, but is gonna take time, since developers thought they could
store everything on the session, and since for 1 user the application
was running fine ... classical mistake)

Well, We are running out of Old space very, very quickly (2gb for old
space), and I was wondering if using the PersistenceManager would help
us, but at the docs it says its not fully tested.

One question I have is how many sessions does it store in memory and
how many goes to disk? What's the policy of the LRU implementation? We
are running a jboss 4.2.2, which I guess uses tomcat 5.5 right?

Any suggestions on using this sessionmanager please?

Regards

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



Re: Help with mod_jk and Apache 2.2

2009-04-14 Thread André Warnier

Security Management wrote:

Yeah, I saw that, and it's now:

/smc-appsuite|/*=worker1

Which should match /appsuite/ and /appsuite/*


Now wait a minute.  Why did this suddenly become /smc-appsuite, and 
not like before, /appsuite ?

If you keep changing the data between questions, it becomes hard to follow.



Still not working, though.  Same problem.  Any more ideas?

Thanks for the help,
Mike.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 10:03 AM

To: Tomcat Users List
Subject: Re: Help with mod_jk and Apache 2.2

Antonio Vidal Ferrer wrote:

Hi.

I guess the = sign in your jkmount file is wrong.
It should say:
/appsuite   worker1


Not according to this :
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html



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


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





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



RE: Help with mod_jk and Apache 2.2

2009-04-14 Thread Security Management
OK, I was switching the name to make sure the logs switched the name and
stuff.

It's consistent in the file.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 4:19 PM
To: Tomcat Users List
Subject: Re: Help with mod_jk and Apache 2.2

Security Management wrote:
 Yeah, I saw that, and it's now:
 
 /smc-appsuite|/*=worker1
 
 Which should match /appsuite/ and /appsuite/*

Now wait a minute.  Why did this suddenly become /smc-appsuite, and 
not like before, /appsuite ?
If you keep changing the data between questions, it becomes hard to follow.

 
 Still not working, though.  Same problem.  Any more ideas?
 
 Thanks for the help,
 Mike.
 
 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: Tuesday, April 14, 2009 10:03 AM
 To: Tomcat Users List
 Subject: Re: Help with mod_jk and Apache 2.2
 
 Antonio Vidal Ferrer wrote:
 Hi.

 I guess the = sign in your jkmount file is wrong.
 It should say:
 /appsuiteworker1

 Not according to this :
 http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 


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


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



Re: Help with mod_jk and Apache 2.2

2009-04-14 Thread André Warnier

Well, no, I didn't.  I just answered the wrong message.
Tip: respond to the list only, not (also) to the person's address.
Otherwise, that person gets each message twice : once because he 
subscribes to the list, and once your direct message.

Responding only to the list also saves trees and minimises global warming.


OOps, sorry. I think I sent a response to the wrong guy.
Antonio must be wondering now. ;-)


Security Management wrote:

OK, I was switching the name to make sure the logs switched the name and
stuff.

It's consistent in the file.


Anyway, I am lost now. Consistent with what ?
Would you mind re-posting the current content of your 3 files, as they
are now, consistent and all ?

Alternatively, do the following :
- comment your JkMountFile line
- instead add these two lines :
  JkMount /appsuite worker1
  JkMount /appsuite/* worker1

and tell us if that works.






-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 4:19 PM

To: Tomcat Users List
Subject: Re: Help with mod_jk and Apache 2.2

Security Management wrote:

Yeah, I saw that, and it's now:

/smc-appsuite|/*=worker1

Which should match /appsuite/ and /appsuite/*


Now wait a minute.  Why did this suddenly become /smc-appsuite, and 
not like before, /appsuite ?

If you keep changing the data between questions, it becomes hard to follow.


Still not working, though.  Same problem.  Any more ideas?

Thanks for the help,
Mike.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 10:03 AM

To: Tomcat Users List
Subject: Re: Help with mod_jk and Apache 2.2

Antonio Vidal Ferrer wrote:

Hi.

I guess the = sign in your jkmount file is wrong.
It should say:
/appsuite   worker1


Not according to this :
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html



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


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





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






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



RE: Help with mod_jk and Apache 2.2

2009-04-14 Thread Security Management
OK, here is the error (note that I have renamed it, I was just making sure I
was seeing what I thought I was).  Webapp works on 8080, apache restarts
without complaining, I verified the port is the default for the worker type
in server.xml, and I am stumped.  Thanks for looking!

Server.xml bit:

Connector port=8009 
   enableLookups=false redirectPort=8443 protocol=AJP/1.3
/

The error in the mod_jk logs:

[Tue Apr 14 16:57:03 2009] [16766:3085969952] [debug] jk_translate::mod_jk.c
(3419): missing uri map for sirrus.smc:/smc-appsuite/index
[Tue Apr 14 16:57:03 2009] [16766:3085969952] [debug]
jk_map_to_storage::mod_jk.c (3579): missing uri map for
sirrus.smc:/smc-appsuite/index
[Tue Apr 14 16:57:34 2009] [16767:3085969952] [debug] jk_translate::mod_jk.c
(3419): missing uri map for sirrus.smc:/smc-appsuite
[Tue Apr 14 16:57:34 2009] [16767:3085969952] [debug]
jk_map_to_storage::mod_jk.c (3579): missing uri map for
sirrus.smc:/smc-appsuite

Here is the mod_jk.conf bit:

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties

#JkMountFile /etc/httpd/conf.d/uriworkermap.properties
JkMount /smc-appsuite worker1
JkMount /smc-appsuite/* worker1

JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkShmFile /var/log/httpd/JkShmFile

Here is the workers.properties:

workers.tomcat_home=/var/www/apache-tomcat-5.5.27/

workers.java_home=/usr/java/latest

ps=/

worker.list=worker1

worker.worker1.type=ajp13
worker.worker1.host=localhost


-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 4:32 PM
To: Security Management
Subject: Re: Help with mod_jk and Apache 2.2

Antonio, ya me has perdido.

Would you mind re-posting the content of your 3 files, as they are now ?

Alternatively :
- comment the line JkMountFile
- add instead the two following lines
JkMount /appsuite worker1
JkMount /appsuite/* worker1

and tell us if that works.
(That is, assuming that your webapp is still at /appsuite in Tomcat)



Security Management wrote:
 OK, I was switching the name to make sure the logs switched the name and
 stuff.
 
 It's consistent in the file.
 
 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: Tuesday, April 14, 2009 4:19 PM
 To: Tomcat Users List
 Subject: Re: Help with mod_jk and Apache 2.2
 
 Security Management wrote:
 Yeah, I saw that, and it's now:

 /smc-appsuite|/*=worker1

 Which should match /appsuite/ and /appsuite/*
 
 Now wait a minute.  Why did this suddenly become /smc-appsuite, and 
 not like before, /appsuite ?
 If you keep changing the data between questions, it becomes hard to
follow.
 
 Still not working, though.  Same problem.  Any more ideas?

 Thanks for the help,
 Mike.

 -Original Message-
 From: André Warnier [mailto:a...@ice-sa.com] 
 Sent: Tuesday, April 14, 2009 10:03 AM
 To: Tomcat Users List
 Subject: Re: Help with mod_jk and Apache 2.2

 Antonio Vidal Ferrer wrote:
 Hi.

 I guess the = sign in your jkmount file is wrong.
 It should say:
 /appsuite   worker1

 Not according to this :
 http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html



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


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


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


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



uriworkermap.properties, documentation

2009-04-14 Thread André Warnier

Hi.

Re : http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html

While perusing the above document, it occurs to me that the following 
paragraph is a bit ambiguous :


quote
Virtual host integration


IIS


When using IIS you can restrict individual rules to special 
virtual hosts by prefixing the URI pattern with the virtual host 
information. The rules is that the url must be prefixed with the host name.

etc...

unquote

Are we talking about Virtual Hosts as defined in the front-end IIS 
server, or about Virtual Hosts (aka Host ..) in the backend server ?


If we are talking about virtual hosts in the front-end IIS server, then 
the example which follows seems a bit useless :


  # Use www.foo.org as virtual host
  /www.foo.org/myapp/*=myworker
  # Use www.bar.org as virtual host
  /www.bar.org/myapp/*=myworker
  # Normal mapping
  /mysecondapp/*=myworker

(since we are mapping everything to worker myworker anyway.)

Would this not be better ?

  # Request to /myapp from virtual host www.foo.org go to worker-foo
  /www.foo.org/myapp/*=worker-foo
  # Request to /myapp from virtual host www.bar.org go to worker-bar
  /www.bar.org/myapp/*=worker-bar
  # Normal mapping
  /mysecondapp/*=myworker

Or am I understanding this the wrong way around ?


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



Re: Help with mod_jk and Apache 2.2

2009-04-14 Thread André Warnier

Security Management wrote:

OK, here is the error (note that I have renamed it, I was just making sure I
was seeing what I thought I was).  Webapp works on 8080, apache restarts
without complaining, I verified the port is the default for the worker type
in server.xml, and I am stumped.  Thanks for looking!

Server.xml bit:

Connector port=8009 
   enableLookups=false redirectPort=8443 protocol=AJP/1.3

/

The error in the mod_jk logs:

[Tue Apr 14 16:57:03 2009] [16766:3085969952] [debug] jk_translate::mod_jk.c
(3419): missing uri map for sirrus.smc:/smc-appsuite/index
[Tue Apr 14 16:57:03 2009] [16766:3085969952] [debug]
jk_map_to_storage::mod_jk.c (3579): missing uri map for
sirrus.smc:/smc-appsuite/index
[Tue Apr 14 16:57:34 2009] [16767:3085969952] [debug] jk_translate::mod_jk.c
(3419): missing uri map for sirrus.smc:/smc-appsuite
[Tue Apr 14 16:57:34 2009] [16767:3085969952] [debug]
jk_map_to_storage::mod_jk.c (3579): missing uri map for
sirrus.smc:/smc-appsuite





Here is the mod_jk.conf bit:

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties

#JkMountFile /etc/httpd/conf.d/uriworkermap.properties
JkMount /smc-appsuite worker1
JkMount /smc-appsuite/* worker1

JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkShmFile /var/log/httpd/JkShmFile


I think I get it.
Are you by any chance using this within a VirtualHost in Apache ?
(I mean, are your browser HTTP calls directed to a VirtualHost ?)

If yes, then try adding a line
JkMountCopy All
to the lines above (in the main Apache server configuration), and retry.

If it now works, make sure you read this :
http://tomcat.apache.org/connectors-doc/reference/apache.html
and specifically the part about JkMountCopy.

You would only be one among many to get bitten by this..




Here is the workers.properties:

workers.tomcat_home=/var/www/apache-tomcat-5.5.27/

workers.java_home=/usr/java/latest


Note: As far as I know, the above two properties are deprecated, and 
should no  longer be used.




ps=/

worker.list=worker1

worker.worker1.type=ajp13
worker.worker1.host=localhost


I would still add
worker.worker1.port=8009




-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 4:32 PM

To: Security Management
Subject: Re: Help with mod_jk and Apache 2.2

Antonio, ya me has perdido.

Would you mind re-posting the content of your 3 files, as they are now ?

Alternatively :
- comment the line JkMountFile
- add instead the two following lines
JkMount /appsuite worker1
JkMount /appsuite/* worker1

and tell us if that works.
(That is, assuming that your webapp is still at /appsuite in Tomcat)



Security Management wrote:

OK, I was switching the name to make sure the logs switched the name and
stuff.

It's consistent in the file.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 4:19 PM

To: Tomcat Users List
Subject: Re: Help with mod_jk and Apache 2.2

Security Management wrote:

Yeah, I saw that, and it's now:

/smc-appsuite|/*=worker1

Which should match /appsuite/ and /appsuite/*
Now wait a minute.  Why did this suddenly become /smc-appsuite, and 
not like before, /appsuite ?

If you keep changing the data between questions, it becomes hard to

follow.

Still not working, though.  Same problem.  Any more ideas?

Thanks for the help,
Mike.

-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: Tuesday, April 14, 2009 10:03 AM

To: Tomcat Users List
Subject: Re: Help with mod_jk and Apache 2.2

Antonio Vidal Ferrer wrote:

Hi.

I guess the = sign in your jkmount file is wrong.
It should say:
/appsuite   worker1


Not according to this :
http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html



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


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




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





-
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: Installing Tomcat

2009-04-14 Thread Hassan Schroeder
On Tue, Apr 14, 2009 at 6:00 PM, Jonathan Mast
jhmast.develo...@gmail.com wrote:

 I've pretty much concluded that the problem is that the machine in question
 is SELinux-enabled and that is cause of Tomcat's inability to access the
 8080 port (even though I can see tomcat on the process list, a netstat -a
 indicates shows no entry for 8080).

sounds fixable...

 1) Why not run Tomcat as root?  We have Tomcat running as root on our
 current setup (Httpd 1.3.33, Tomcat 5.5, JDK 1.4), I presume Tomcat 6 (JDK
 1.6) running by itself must be more secure than our current situation.  Any
 comments?

Exposures are usually in apps; running any application with the
lowest possible privilege level reduces risk. But there's no law
against living dangerously -- we've probably all done it :-)

 2) My problem with jsvc is multiple:

 c) really, if all this stuff is the correct way to run Tomcat on linux,
 why doesn't come as part of the distribution?

uhhh... it does. And I've never had to do more than ./configure and
make on any platform to get it going.

But as already pointed out -- run Tomcat on any non-privileged port
and connect it to port 80 with iptables.

 4) I really want to avoid the complexity of httpd (see 2.a)

An easy goal to reach, luckily. :-)

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

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



Re: Installing Tomcat

2009-04-14 Thread Jonathan Mast
Hey Chris,

I've pretty much concluded that the problem is that the machine in question
is SELinux-enabled and that is cause of Tomcat's inability to access the
8080 port (even though I can see tomcat on the process list, a netstat -a
indicates shows no entry for 8080).

My ultimate goal was to just run Tomcat 6 (with JDK 1.6) on this machine but
I've given up on this particular machine for now.

But I have some questions/comments:

1) Why not run Tomcat as root?  We have Tomcat running as root on our
current setup (Httpd 1.3.33, Tomcat 5.5, JDK 1.4), I presume Tomcat 6 (JDK
1.6) running by itself must be more secure than our current situation.  Any
comments?

2) My problem with jsvc is multiple:
a) it involves a language so evil it can only be referred to in paraphrase:
the letter between B and D.  Have you actually read the instructions for it?
If you're using BSD, issue 'make foo' being sure to type only with your
toes, if Linux, issue 'makeamess foo' with your nose as typing
implement
b) can't they even bother to link to the Jakarta-Whatever package that I
must now download and lug around? I mean c'mon ;-[
c) really, if all this stuff is the correct way to run Tomcat on linux,
why doesn't come as part of the distribution?

3) N/A
4) I really want to avoid the complexity of httpd (see 2.a)



On Fri, Apr 10, 2009 at 1:27 PM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jonathan,

 On 4/9/2009 11:20 AM, Jonathan Mast wrote:
  ok, here is the plain vanilla, immaculate server.xml, straight from a
  fresh untarring of the tomcat 6 dist that i just re-installed, its still
  not working.

 I didn't realize you were using an unmodified configuration. My initial
 reaction is that you'll have to modify the default configuration in
 order to make it fit your needs.

 Here are the active connectors configured in the server.xml you posted:

 HTTP/1.1 connector on port 8080
 AJP/1.3 connector on port 8009

  I should say that apache httpd 2.0 is already running on this machine and
 my
  www.mysite.com is reachable there, so I figured www.mysite.com:8080would
  take me to tomcat.  Is that a correct assumption? IE. Should I be able to
 by
  httpd by tacking :8080 onto the url?

 Yes, going to http://www.mysite.com:8080/ should contact Tomcat, as long
 as your DNS resolution is working and there are no firewall issues.

 Tomcat may not start if something is already bound to port 8080, so you
 should make sure that Tomcat is starting correctly. See catalina.out for
 any messages to the contrary. catalina.out should be indicating which
 connectors are started when Tomcat starts up.

  If I kill apache httpd (I have no intention of using it going forward),
 will
  updating server.xml with port 80 rather than port 8080 automagically get
  everything to work, or is there other stuff I need to do before Tomcat
 will
  run as a standalone webserver?

 Running Tomcat on port 80 is problematic on *NIX systems unless you run
 Tomcat as root, which is not advised. See
 http://tomcat.apache.org/tomcat-6.0-doc/setup.html for some ideas for
 how to bind Tomcat to port 80 on *NIX. (This page shows information on
 jsvc). You can also use iptables to essentially do port-forwarding.
 Basically, your options on Linux are:

 1. Run Tomcat as root (bad idea)
 2. Use jsvc (you don't want to do this ... why?)
 3. Use iptables to forward ports
 4. Front Tomcat with something that can more easily bind to port 80
 (httpd, etc.)

 But to answer your question: yes, running on port 80 will preclude your
 users from having to specify the port number in the URL.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAknfgW4ACgkQ9CaO5/Lv0PAE9QCdHBcwNoRMneWvLB8uYbA9r+Jd
 X1sAni8Jkkzg6dXmxcdaa00QweaemJrS
 =peWX
 -END PGP SIGNATURE-

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




Re: retrieve session data stored in db using JDBCStore.

2009-04-14 Thread jerrySheen

can someone please reply to the above post.:-((

-- 
View this message in context: 
http://www.nabble.com/retrieve-session-data-stored-in-db-using-JDBCStore.-tp23020556p23052044.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



Need to share JVM for both tomcat and RMI server

2009-04-14 Thread siranjeevi krishnan
Hi
I want to know about the possibility of sharing JVM for both tomcat and RMI
server.
Any ways to start tomcat from my RMI server.
How to programatically start tomcat like how startup.sh is doing?
Is it possible to start my RMI server inside tomcat?


Regards
Siranjeevi