Apache reverse proxy issue

2012-02-16 Thread Andres Aguado
Hi, although this space is for tomcat cuestion, i'd like to expose my
problem with an apache 2.2 server over win2k8, because i'm going
crazy, and if anyone could help me it'll be very appreciated.

Well, I've an apache 2.2 server over win2k8, and i want to configure
reverse proxy on it to send request to Websphere server

So, my httpd.conf file is written like this:

NameVirtualHost *:80
VirtualHost *:80
DocumentRoot C:\Program Files (x86)\Apache Software
Foundation\Apache2.2\htdocs\my_example
ServerName www.my_example.es
ServerRoot C:\Program Files (x86)\Apache Software Foundation\Apache2.2
DirectoryIndex index.html
ErrorLog C:\Program Files (x86)\Apache Software
Foundation\Apache2.2\logs\error.log
TransferLog C:\Program Files (x86)\Apache Software
Foundation\Apache2.2\logs\access.log
ProxyRequests Off
IfModule proxy_module
Proxy *
Order deny,allow
Allow from all
/Proxy
/IfModule
ProxyPreserveHost On
ProxyPass / https://was_server/
ProxyPassReverse / https://was_server/
/VirtualHost

Proxy modules enabled are mod_proxy.so and mod_proxy_http.so
But this configuration is not working.
I have not yet activated https on apache server, and want to send
http://my_example:80 to https://was_server, but and 500 internal
server error appears when i try to connect to my_example, and this
line seems to be written in error.log
[warn] proxy: No protocol handler was valid for the URL /. If you are
using a DSO version of mod_proxy, make sure the proxy submodules are
included in the configuration using LoadModule.

Could anyone help me please?

Thank you very much
Andres

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



Re: Is it possible to start multiple tomcat servers with port-offset mechanism

2012-02-16 Thread Konstantin Kolinko
2012/2/16 Pradeep Fernando pradee...@gmail.com:
 I want to start multiple tomcat server instances by giving a port
 offset kind of parameter. I dont want to hard code the port. A
 port.offset system property would be ideal.

 say my default port is 8080. with port.offset param  set to  '1'. it
 would be 8081.

 8080 + ${port.offset}

 Is there any mechanism to fulfill my requirement. ?

You can use properties substritution.
E.g.  create $CATALINA_BASE/bin/setenv.sh:
[[[
JAVA_OPTS=-Dmyportnumber=8083
]]]
and use port=${myportnumber} in server.xml

It is up to you how to calculate the port number.

Best regards,
Konstantin Kolinko

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



Re: Apache reverse proxy issue

2012-02-16 Thread Konstantin Kolinko
2012/2/16 Andres Aguado andriu@gmail.com:
 Hi, although this space is for tomcat cuestion, i'd like to expose my
 problem with an apache 2.2 server over win2k8, because i'm going
 crazy, and if anyone could help me it'll be very appreciated.

 Well, I've an apache 2.2 server over win2k8, and i want to configure
 reverse proxy on it to send request to Websphere server

 So, my httpd.conf file is written like this:

 NameVirtualHost *:80
 VirtualHost *:80
        DocumentRoot C:\Program Files (x86)\Apache Software
 Foundation\Apache2.2\htdocs\my_example
        ServerName www.my_example.es
        ServerRoot C:\Program Files (x86)\Apache Software 
 Foundation\Apache2.2
        DirectoryIndex index.html
        ErrorLog C:\Program Files (x86)\Apache Software
 Foundation\Apache2.2\logs\error.log
        TransferLog C:\Program Files (x86)\Apache Software
 Foundation\Apache2.2\logs\access.log
        ProxyRequests Off
        IfModule proxy_module

The above If is useless. If proxy_module is unavailable the config
parsing would fail on the ProxyRequests directive several lines
above.

                Proxy *
                        Order deny,allow
                        Allow from all
                /Proxy
        /IfModule
        ProxyPreserveHost On
        ProxyPass / https://was_server/
        ProxyPassReverse / https://was_server/
 /VirtualHost

 Proxy modules enabled are mod_proxy.so and mod_proxy_http.so
 But this configuration is not working.
 I have not yet activated https on apache server, and want to send
 http://my_example:80 to https://was_server, but and 500 internal
 server error appears when i try to connect to my_example, and this
 line seems to be written in error.log
 [warn] proxy: No protocol handler was valid for the URL /. If you are
 using a DSO version of mod_proxy, make sure the proxy submodules are
 included in the configuration using LoadModule.

 Could anyone help me please?

Proxying to https:// is handled by mod_ssl, as far as I know. If you
have not enabled that module and have not enabled proxying support in
it then you are out of luck.

Anyway, your question is offtopic on this list.

Best regards,
Konstantin Kolinko

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



Basic Authentication Valve not hitting on Tomcat7.0.20

2012-02-16 Thread Sachin Mehrotra
Hi

After upgrade from Tomcat 6 to Tomcat 7.0.20, our Basic Authentication
valve is not hitting. It seems it is overlooking our implementation of
Basic Authentication.
Below is the implementation:
We are having Realm that is doing authentication using our
authentication server. Before that we are having a Valve defined in
/META-INF/context.xml that is doing some pre-authentication based on
the token define in the HTTPs request.
If the token matches our creteria then Realm is hitting for actual Auth.

This was working fine when Tomcat  6 was there and we were able to see
the logging coming that was added to our Implementation of Baisc
Authenticator.

Plz help.

-- 
With Regards
Sachin Mehrotra

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



Re: Basic Authentication Valve not hitting on Tomcat7.0.20

2012-02-16 Thread Pid
On 16/02/2012 12:30, Sachin Mehrotra wrote:
 Hi
 
 After upgrade from Tomcat 6 to Tomcat 7.0.20, our Basic Authentication
 valve is not hitting. It seems it is overlooking our implementation of
 Basic Authentication.
 Below is the implementation:
 We are having Realm that is doing authentication using our
 authentication server. Before that we are having a Valve defined in
 /META-INF/context.xml that is doing some pre-authentication based on
 the token define in the HTTPs request.
 If the token matches our creteria then Realm is hitting for actual Auth.
 
 This was working fine when Tomcat  6 was there and we were able to see
 the logging coming that was added to our Implementation of Baisc
 Authenticator.

There's no guarantee that the internals of Tomcat remain the same
between releases.

Do your logs indicate your custom authenticator is active or does it
throw an error?

How had you configured the authenticator to work in Tomcat 6.0?


p



-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Is it possible to start multiple tomcat servers with port-offset mechanism

2012-02-16 Thread Pid
On 16/02/2012 11:34, Konstantin Kolinko wrote:
 2012/2/16 Pradeep Fernando pradee...@gmail.com:
 I want to start multiple tomcat server instances by giving a port
 offset kind of parameter. I dont want to hard code the port. A
 port.offset system property would be ideal.

 say my default port is 8080. with port.offset param  set to  '1'. it
 would be 8081.

 8080 + ${port.offset}

 Is there any mechanism to fulfill my requirement. ?
 
 You can use properties substritution.
 E.g.  create $CATALINA_BASE/bin/setenv.sh:
 [[[
 JAVA_OPTS=-Dmyportnumber=8083
 ]]]
 and use port=${myportnumber} in server.xml
 
 It is up to you how to calculate the port number.

+1  If you're generating an offset, why not just calculate the actual
port number?


p


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Basic Authentication Valve not hitting on Tomcat7.0.20

2012-02-16 Thread Sachin Mehrotra
Do your logs indicate your custom authenticator is active or does it
throw an error?
ANS-- tomcat logs and other logs doesn't show any exception or even
traces added in the valve class. In Tomcat 6 we are able to see logs
added in our implemementation of AuthenticatorBase class.


How had you configured the authenticator to work in Tomcat 6.0?
ANS--
In Server.xml we have defined Realm under Engine

 Realm className=com.xyz.platform.realm.Realm
realmPluginClass=com.xyz.org.realm.MyRealmPlugin/
/Engine

In Web.xml of the application we have defined following

security-constraint
web-resource-collection
web-resource-nameWeb application
name/web-resource-name
descriptionSimple constraint for web
resources/description
url-pattern/*/url-pattern
http-methodHEAD/http-method
http-methodPOST/http-method
http-methodGET/http-method
http-methodPUT/http-method
http-methodDELETE/http-method
/web-resource-collection
auth-constraint
descriptionSimple constraint/description
role-nameapp-user/role-name
/auth-constraint
user-data-constraint
transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
/security-constraint

login-config
auth-methodBASIC/auth-method
realm-nameMy App Realm/realm-name
/login-config


In context.xml inside META-INF of the application we have defined Valve

Context path=/myapp docBase=myapp debug=0 privileged=true
ResourceLink name=tomcatHelper global=MyTomcatHelper
type=com.my.app.tools.tomcat.MyTomcatHelper /
Valve className=com.my.realm.valve.AuthenticationValve
characterEncoding=UTF-8/
/Context

The same is present in Tomcat 7.0.20 but the AuthenticatioValve is not hitting.

One more thing that we have observed that in
CATALINA_HOME/conf/Catalina/localhost/ directory in7.0.20 we are not
having any xml while in Tomcat 6 we are having application context.xml
like files.


Thanks
Sachin


On 2/16/12, Pid p...@pidster.com wrote:
 On 16/02/2012 12:30, Sachin Mehrotra wrote:
 Hi

 After upgrade from Tomcat 6 to Tomcat 7.0.20, our Basic Authentication
 valve is not hitting. It seems it is overlooking our implementation of
 Basic Authentication.
 Below is the implementation:
 We are having Realm that is doing authentication using our
 authentication server. Before that we are having a Valve defined in
 /META-INF/context.xml that is doing some pre-authentication based on
 the token define in the HTTPs request.
 If the token matches our creteria then Realm is hitting for actual Auth.

 This was working fine when Tomcat  6 was there and we were able to see
 the logging coming that was added to our Implementation of Baisc
 Authenticator.

 There's no guarantee that the internals of Tomcat remain the same
 between releases.

 Do your logs indicate your custom authenticator is active or does it
 throw an error?

 How had you configured the authenticator to work in Tomcat 6.0?


 p



 --

 [key:62590808]




-- 
With Regards
Sachin Mehrotra

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



Re: Basic Authentication Valve not hitting on Tomcat7.0.20

2012-02-16 Thread Pid
On 16/02/2012 13:26, Sachin Mehrotra wrote:
 Do your logs indicate your custom authenticator is active or does it
 throw an error?
 ANS-- tomcat logs and other logs doesn't show any exception or even
 traces added in the valve class. In Tomcat 6 we are able to see logs
 added in our implemementation of AuthenticatorBase class.
 
 
 How had you configured the authenticator to work in Tomcat 6.0?
 ANS--
 In Server.xml we have defined Realm under Engine
 
  Realm className=com.xyz.platform.realm.Realm
 realmPluginClass=com.xyz.org.realm.MyRealmPlugin/
 /Engine



 In Web.xml of the application we have defined following
 
 security-constraint
 web-resource-collection
 web-resource-nameWeb application
 name/web-resource-name
 descriptionSimple constraint for web
 resources/description
 url-pattern/*/url-pattern
 http-methodHEAD/http-method
 http-methodPOST/http-method
 http-methodGET/http-method
 http-methodPUT/http-method
 http-methodDELETE/http-method
 /web-resource-collection
 auth-constraint
 descriptionSimple constraint/description
 role-nameapp-user/role-name
 /auth-constraint
 user-data-constraint
 
 transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
 /security-constraint
 
 login-config
 auth-methodBASIC/auth-method
 realm-nameMy App Realm/realm-name
 /login-config

Does BASIC authentication happen at all, or is this config ignored?


 In context.xml inside META-INF of the application we have defined Valve
 
 Context path=/myapp docBase=myapp debug=0 privileged=true

path isn't valid here.
docBase isn't valid here.
debug isn't a valid attribute.

Why do you need privileged set to true?

 ResourceLink name=tomcatHelper global=MyTomcatHelper
 type=com.my.app.tools.tomcat.MyTomcatHelper /
 Valve className=com.my.realm.valve.AuthenticationValve
 characterEncoding=UTF-8/

What happens if you remove this valve?


p

 /Context


 
 The same is present in Tomcat 7.0.20 but the AuthenticatioValve is not 
 hitting.
 
 One more thing that we have observed that in
 CATALINA_HOME/conf/Catalina/localhost/ directory in7.0.20 we are not
 having any xml while in Tomcat 6 we are having application context.xml
 like files.
 
 
 Thanks
 Sachin
 
 
 On 2/16/12, Pid p...@pidster.com wrote:
 On 16/02/2012 12:30, Sachin Mehrotra wrote:
 Hi

 After upgrade from Tomcat 6 to Tomcat 7.0.20, our Basic Authentication
 valve is not hitting. It seems it is overlooking our implementation of
 Basic Authentication.
 Below is the implementation:
 We are having Realm that is doing authentication using our
 authentication server. Before that we are having a Valve defined in
 /META-INF/context.xml that is doing some pre-authentication based on
 the token define in the HTTPs request.
 If the token matches our creteria then Realm is hitting for actual Auth.

 This was working fine when Tomcat  6 was there and we were able to see
 the logging coming that was added to our Implementation of Baisc
 Authenticator.

 There's no guarantee that the internals of Tomcat remain the same
 between releases.

 Do your logs indicate your custom authenticator is active or does it
 throw an error?

 How had you configured the authenticator to work in Tomcat 6.0?


 p



 --

 [key:62590808]


 
 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Application Scope Replication in 6.0.x

2012-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pid,

On 2/15/12 4:56 PM, Pid * wrote:
 On 15 Feb 2012, at 20:33, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 
 Gregory,
 
 On 2/15/12 11:11 AM, Gregory Werner wrote:
 I saw an email back in 2007 which went unanswered.
 Currently, I have load balancer running for a 2 Tomcat setup
 and session replication works as expected with the Tomcat
 6.0.x documentation. How does one go about implementing
 application scope replication with Tomcat.  If the answer is
 any better, a Tomcat 7.0.x answer would also be appreciated.
 
 Tomcat doesn't have any application-scope replication built-in:
 you'll have to roll this yourself.
 
 That's not entirely true.

I would say it was entirely untrue. :(

Thanks,

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk89GYUACgkQ9CaO5/Lv0PBBEACZAZCglRYGbVHCtA/sIHLmiiCL
nr0AoJaCDfjgilQUo8d9JE67mNORTp+O
=gAhy
-END PGP SIGNATURE-

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



Re: Application Scope Replication in 6.0.x

2012-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 2/15/12 4:21 PM, Caldarale, Charles R wrote:
 From: Gregory Werner [mailto:grjas...@gmail.com] Subject: Re:
 Application Scope Replication in 6.0.x
 
 Common data definitions which are used over and over and over
 again and don't change.  After the first time they are loaded, I
 want the info to be remembered for all users to access until
 Tomcat is brought down again.
 
 So why don't you do that in a ServletContextListener?

+1

If you need data available to the context, I would argue that it is
more efficient to load and manage it locally than to replicate it
across a cluster.

Then again, I don't like clustering in the first place.

(Sorry for pointing you in the wrong direction earlier).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk89GeMACgkQ9CaO5/Lv0PBjWwCcDavF339v1cAhCrw0XKbr39Y9
1kMAniUurW8Sz3M4Xb/Q9c77fUszkIFI
=OCY1
-END PGP SIGNATURE-

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



Re: Basic Authentication Valve not hitting on Tomcat7.0.20

2012-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sachin,

On 2/16/12 8:26 AM, Sachin Mehrotra wrote:
 login-config auth-methodBASIC/auth-method realm-nameMy App
 Realm/realm-name /login-config

I believe if you set auth-method to BASIC, Tomcat will add its own
Valve to the valve chain. If you don't set the auth-method here but
still add your Valve to context.xml, does that improve things?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk89G/cACgkQ9CaO5/Lv0PBJ7gCfSh2yiMKzX2J92jLSGLHn0hI7
Ia0AoI4nlntBd4lQ5+T9fO8qKep/1hc5
=rzun
-END PGP SIGNATURE-

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



Re: Application Scope Replication in 6.0.x

2012-02-16 Thread Gregory Werner
I didn't know that either.  It is simply a case of looking for the wrong
keywords.  I said application score replication they said context attribute
replication.  I gotta learn how to speak their language.

Even after I put
Context className=*org.apache.catalina.ha.context.ReplicatedContext*
in my context.xml

and make sure that my application's web.xml has
*distributable /*
*
*
the following:

   1. MapString, Date userCache = (MapString, Date)
   context.getAttribute(userCache);
   2. userCache.remove(remoteUserName);

returns a null userCache object (context is set in the ServletContextAware
method, setServletContext).  When I enumerate through all the context
attributes, I cannot see the stuff I am putting in it, just like the
default entries which wind up there.  Too weird.

-Greg

On Thu, Feb 16, 2012 at 9:59 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Chuck,

 On 2/15/12 4:21 PM, Caldarale, Charles R wrote:
  From: Gregory Werner [mailto:grjas...@gmail.com] Subject: Re:
  Application Scope Replication in 6.0.x
 
  Common data definitions which are used over and over and over
  again and don't change.  After the first time they are loaded, I
  want the info to be remembered for all users to access until
  Tomcat is brought down again.
 
  So why don't you do that in a ServletContextListener?

 +1

 If you need data available to the context, I would argue that it is
 more efficient to load and manage it locally than to replicate it
 across a cluster.

 Then again, I don't like clustering in the first place.

 (Sorry for pointing you in the wrong direction earlier).

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk89GeMACgkQ9CaO5/Lv0PBjWwCcDavF339v1cAhCrw0XKbr39Y9
 1kMAniUurW8Sz3M4Xb/Q9c77fUszkIFI
 =OCY1
 -END PGP SIGNATURE-

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




Re: Application Scope Replication in 6.0.x

2012-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gregory,

On 2/16/12 10:34 AM, Gregory Werner wrote:
 I didn't know that either.  It is simply a case of looking for the
 wrong keywords.  I said application score replication they said
 context attribute replication.  I gotta learn how to speak their
 language.
 
 Even after I put Context
 className=*org.apache.catalina.ha.context.ReplicatedContext* in
 my context.xml
 
 and make sure that my application's web.xml has *distributable
 /* * * the following:
 
 1. MapString, Date userCache = (MapString, Date) 
 context.getAttribute(userCache); 2.
 userCache.remove(remoteUserName);
 
 returns a null userCache object (context is set in the
 ServletContextAware method, setServletContext).

Is this all on the same server, or are you setting the attribute in
one context and watching for it's value to be available in a different
(replicated) one?

Just trying to understand the test case, here.

 When I enumerate through all the context attributes, I cannot see
 the stuff I am putting in it, just like the default entries which
 wind up there.  Too weird.

Remember that it's not magic replication: Tomcat doesn't know when you
modify the object itself. I suspect that if you modify the object
itself (say, by adding elements to the cache) you'll have to do this:

context.setAttribute(userCache, userCache);

...in order to trigger a re-replication across the cluster.

You might want to consider using something like memcached or even a
traditional database to share this kind of information: IMO they are
much better equipped to do the kinds of things you want to do (and
they are separated from the servlet API, which can either be a good
thing or a bad thing for you).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk89JAwACgkQ9CaO5/Lv0PA4RQCfR7uhnaYwJyE6eHrINKmWS0EJ
mbAAnA+7E3GV2CHgpvSnikQkfypDcCIc
=+iC3
-END PGP SIGNATURE-

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



Re: Application Scope Replication in 6.0.x

2012-02-16 Thread Gregory Werner
In-line responses.  Thanks for the ideas, I really do appreciate it.

On Thu, Feb 16, 2012 at 10:43 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Gregory,

 On 2/16/12 10:34 AM, Gregory Werner wrote:
  I didn't know that either.  It is simply a case of looking for the
  wrong keywords.  I said application score replication they said
  context attribute replication.  I gotta learn how to speak their
  language.
 
  Even after I put Context
  className=*org.apache.catalina.ha.context.ReplicatedContext* in
  my context.xml
 
  and make sure that my application's web.xml has *distributable
  /* * * the following:
 
  1. MapString, Date userCache = (MapString, Date)
  context.getAttribute(userCache); 2.
  userCache.remove(remoteUserName);
 
  returns a null userCache object (context is set in the
  ServletContextAware method, setServletContext).

 Is this all on the same server, or are you setting the attribute in
 one context and watching for it's value to be available in a different
 (replicated) one?


In this case it is a test environment.  We are trying to emulate two
distinct physical servers/load-balancing (which is the real case) on a
single physical machine with one Tomcat instance.  Looking at the logs we
can see some requests going to A and some going to B so it is load
balancing, but in the end I am only placing a single war file and starting
a single tomcat instance.


 Just trying to understand the test case, here.

  When I enumerate through all the context attributes, I cannot see
  the stuff I am putting in it, just like the default entries which
  wind up there.  Too weird.

 Remember that it's not magic replication: Tomcat doesn't know when you
 modify the object itself. I suspect that if you modify the object
 itself (say, by adding elements to the cache) you'll have to do this:

 context.setAttribute(userCache, userCache);


I do, that would be my next line.  I just stopped there because the
userCache I retrieve from the context is null so I get a
NullPointerException crashing things before I get an opportunity to put it
back in the cache.



 You might want to consider using something like memcached or even a
 traditional database to share this kind of information: IMO they are
 much better equipped to do the kinds of things you want to do (and
 they are separated from the servlet API, which can either be a good
 thing or a bad thing for you).

 - -chris



mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread modjklist
Hello. I'm trying to setup Adobe's Flexbuilder 4.6 software to access 
mydomain.com/mywebapp using port 80 on Apache Webserver 2.2.21 and connect 
using mod_jk 1.2.32 on a remote Linux CentOS 6.2 server. I'm puzzled by the 
mod_jk.log file, which I've included a snippet below and attached as a text 
file. I also attached an image of Adobe Flexbuilder's wizard. 


As you can see from the image, this wizard has a button called Validate 
Configuration that attempts to connect to the remote server provided in the 
input field labeled Root URL. If I enter the following into this Root URL 
field 


http://mydomain.com:8080/mywebapp 


the Adobe Flashbuilder software states that a connection was successfully made 
to the server. However, if I enter the following instead: 


http://mydomain.com/mywebapp 


the Adobe Flashbuilder software states that it cannot connect to the server. 


When I review the mod_jk.log file (attached as a file and also shown below), I 
see Adobe's request in the 2nd line (see red font ), where the mod_jk.log entry 
reports a missing uri map for host3.mydomain.com:/jitterapp/flex_wizard_... 


Later in this log snippet, as identified in green font , you'll see an entry 
for attempting to map URI ' /jitterapp/flex_wizard_... This entry was created 
when I opened a web browser and pointed it to the address Adobe was trying to 
access, which I obtained from the log file, that is, 
http://mydomain.com/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm.
 In this case, a match was found with JkMount and a worker assigned, and so 
mod_jk seems to be working. 


My question is, why does mod_jk work when I manually enter the web address 
Adobe is trying to access but not work when Adobe accesses it? Can you see 
anything in the log file that would indicate the address I entered is different 
than the address Adobe is using, that could explain this? I really need this 
working, so any help MUCH appreciated. Thanks in advance. 


For reference, the httpd.conf file includes the following (the ... indicates 
non-relevant code I removed for simplicity): 


LoadModule jk_module modules/mod_jk.so 

JkWorkersFile /etc/httpd/conf/workers.properties 
JkLogFile /etc/httpd/logs/mod_jk.log 
JkLogLevel debug 
JkLogStampFormat [%a %b %d %H:%M:%S %Y]  JkOptions +ForwardKeySize 
+ForwardURICompat -ForwardDirectories 
JkRequestLogFormat %w %V %T 
... 
Listen 0.0.0.0:80 
User nobody 
Group nobody 
ExtendedStatus On 
ServerAdmin webmas...@webxyz.net 
ServerName host3.mydomain.com 
LogLevel warn 
Timeout 300 
ServerSignature On 
... 
UserDir public_html 
... 

Location /whm-server-status 
SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from 127.0.0.1 
/Location 

Location /server-status 

SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from xx.xx.xxx.0/24 
/Location 


Location /server-info 
SetHandler server-info 
Order deny,allow 
Deny from all 
Allow from xx.xx.xxx.0/24 
/Location 
... 

NameVirtualHost 67.227.243.196:80 
NameVirtualHost * 
... 
VirtualHost xx.xxx.xxx.196:80 
ServerName mydomain.com 
ServerAlias www.mydomain.com host3.mydomain.com 
DocumentRoot /home/gkk/public_html 
ServerAdmin webmas...@mydomain.com 
UseCanonicalName Off 
JkMountCopy On 
JkMount /mydomain/* worker1 
JkMount /mydomain worker1 
/VirtualHost 



mod_jk.log file snippet-- 




[Thu Feb 16 06:46:37 2012] [13722:140020322740160] [debug] jk_handler::mod_jk.c 
(2662): Service finished with status=404 for worker=worker1 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for 
host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm
 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_map_to_storage::mod_jk.c (3647): missing uri map for 
host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm
 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for 
host3.mydomain.com:/404.shtml 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_map_to_storage::mod_jk.c (3647): missing uri map for 
host3.mydomain.com:/404.shtml 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for 
host3.mydomain.com:/cp_errordocument.shtml 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_map_to_storage::mod_jk.c (3647): missing uri map for 
host3.mydomain.com:/cp_errordocument.shtml 

[Thu Feb 16 06:49:46 2012] [13724:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/ 

[Thu Feb 16 06:49:46 2012] [13724:140020322740160] [debug] 
jk_map_to_storage::mod_jk.c (3647): missing uri map for host3.mydomain.com:/ 

[Thu Feb 16 06:49:46 2012] [13724:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for 
host3.mydomain.com:/index.html.var 

... 

[Thu Feb 16 

Re: Application Scope Replication in 6.0.x

2012-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gregory,

On 2/16/12 10:55 AM, Gregory Werner wrote:
 In this case it is a test environment.  We are trying to emulate
 two distinct physical servers/load-balancing (which is the real
 case) on a single physical machine with one Tomcat instance.
 Looking at the logs we can see some requests going to A and some
 going to B so it is load balancing, but in the end I am only
 placing a single war file and starting a single tomcat instance.

So, you have a single Tomcat instance with a single webapp deployed,
but your load balancer has two separate connections to the single
instance? What are you using for your load-balancer (it doesn't
matter, I'm just curious).

 Remember that it's not magic replication: Tomcat doesn't know
 when you modify the object itself. I suspect that if you modify
 the object itself (say, by adding elements to the cache) you'll
 have to do this:
 
 context.setAttribute(userCache, userCache);
 
 I do, that would be my next line.  I just stopped there because
 the userCache I retrieve from the context is null so I get a 
 NullPointerException crashing things before I get an opportunity to
 put it back in the cache.

Gotcha.

So, when are you actually putting a UserCache *into* the servlet
context? I'm wondering if you can't find anything in the servlet
context because you've never put anything there :)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk89K7YACgkQ9CaO5/Lv0PC2KgCgpJQQ/xxpcz2rQPY/Q3x98myB
AO8AoIGshggKxO0op7ps4VbnroADEVw7
=KJti
-END PGP SIGNATURE-

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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

See notes in-line.

modjkl...@comcast.net wrote:
Hello. I'm trying to setup Adobe's Flexbuilder 4.6 software to access mydomain.com/mywebapp using port 80 on Apache Webserver 2.2.21 and connect using mod_jk 1.2.32 on a remote Linux CentOS 6.2 server. I'm puzzled by the mod_jk.log file, which I've included a snippet below and attached as a text file. I also attached an image of Adobe Flexbuilder's wizard. 



As you can see from the image, this wizard has a button called Validate Configuration that attempts to connect to the remote server provided in the input field labeled Root URL. If I enter the following into this Root URL field 



http://mydomain.com:8080/mywebapp 



the Adobe Flashbuilder software states that a connection was successfully made to the server. However, if I enter the following instead: 



http://mydomain.com/mywebapp 



the Adobe Flashbuilder software states that it cannot connect to the server. 



When I review the mod_jk.log file (attached as a file and also shown below), I see Adobe's request in the 2nd line (see red font ), where the mod_jk.log entry reports a missing uri map for host3.mydomain.com:/jitterapp/flex_wizard_... 



Later in this log snippet, as identified in green font , you'll see an entry for attempting to map URI ' /jitterapp/flex_wizard_... This entry was created when I opened a web browser and pointed it to the address Adobe was trying to access, which I obtained from the log file, that is, http://mydomain.com/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm. In this case, a match was found with JkMount and a worker assigned, and so mod_jk seems to be working. 



My question is, why does mod_jk work when I manually enter the web address Adobe is trying to access but not work when Adobe accesses it? Can you see anything in the log file that would indicate the address I entered is different than the address Adobe is using, that could explain this? I really need this working, so any help MUCH appreciated. Thanks in advance. 



For reference, the httpd.conf file includes the following (the ... indicates non-relevant code I removed for simplicity): 



LoadModule jk_module modules/mod_jk.so 

JkWorkersFile /etc/httpd/conf/workers.properties 
JkLogFile /etc/httpd/logs/mod_jk.log 
JkLogLevel debug 
JkLogStampFormat [%a %b %d %H:%M:%S %Y]  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories 
JkRequestLogFormat %w %V %T 
... 
Listen 0.0.0.0:80 
User nobody 
Group nobody 
ExtendedStatus On 
ServerAdmin webmas...@webxyz.net 
ServerName host3.mydomain.com 
LogLevel warn 
Timeout 300 
ServerSignature On 
... 
UserDir public_html 
... 

Location /whm-server-status 
SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from 127.0.0.1 
/Location 

Location /server-status 

SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from xx.xx.xxx.0/24 
/Location 



Location /server-info 
SetHandler server-info 
Order deny,allow 
Deny from all 
Allow from xx.xx.xxx.0/24 
/Location 
... 

NameVirtualHost 67.227.243.196:80 
NameVirtualHost * 
... 
VirtualHost xx.xxx.xxx.196:80 
ServerName mydomain.com 
ServerAlias www.mydomain.com host3.mydomain.com 
DocumentRoot /home/gkk/public_html 
ServerAdmin webmas...@mydomain.com 
UseCanonicalName Off 
JkMountCopy On 
JkMount /mydomain/* worker1-- you are mapping the URI /mydomain/*
JkMount /mydomain worker1 
/VirtualHost 




mod_jk.log file snippet-- 





[Thu Feb 16 06:46:37 2012] [13722:140020322740160] [debug] jk_handler::mod_jk.c (2662): Service finished with status=404 for worker=worker1 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 



.. and trying a URI /mywebapp  ???

Or was this just editing of your config/posting ?


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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

On 2/16/12 10:59 AM, modjkl...@comcast.net wrote:
 Hello. I'm trying to setup Adobe's Flexbuilder 4.6 software to
 access mydomain.com/mywebapp using port 80 on Apache Webserver
 2.2.21 and connect using mod_jk 1.2.32 on a remote Linux CentOS 6.2
 server. I'm puzzled by the mod_jk.log file, which I've included a
 snippet below and attached as a text file. I also attached an image
 of Adobe Flexbuilder's wizard.

The image was stripped by the list, so we can't see it. You'll have to
post elsewhere if it's important.

Also, though I could see your customized font colors, many readers
will not be able to, and the archives may not show them either. Then
there are red-green color-blind people, too :) Consider using in-text
clues to point things out rather than font colors.

 If I enter the following into this Root URL field
 
 http://mydomain.com:8080/mywebapp
 
 the Adobe Flashbuilder software states that a connection was 
 successfully made to the server.

Great. That suggests that your webapp is configured correctly and that
the server is accessible -- at least through (presumably, given the
:8080) Tomcat.

 However, if I enter the following instead:
 
 http://mydomain.com/mywebapp
 
 the Adobe Flashbuilder software states that it cannot connect to
 the server.

Okay. So, something is misconfigured between httpd - Tomcat.

 When I review the mod_jk.log file (attached as a file and also
 shown below), I see Adobe's request in the 2nd line (see red font),
 where the mod_jk.log entry reports a missing uri map for 
 host3.mydomain.com:/jitterapp/flex_wizard_...

For reference, here's the log for that particular timestamp:

 [Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
 jk_translate::mod_jk.c (3488): missing uri map for 
 host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm

Odd
 
that it's got a colon and no port number. It must be getting to
the server because you can see log messages. I wonder if that's a tiny
bug in mod_jk's logging code.

 Later in this log snippet, as identified in green font, you'll see
 an entry for attempting to map URI '/jitterapp/flex_wizard_... This
 entry was created when I opened a web browser and pointed it to the
 address Adobe was trying to access, which I obtained from the log
 file, that is, 
 http://mydomain.com/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm.

 
In this case, a match was found with JkMount and a worker assigned, and
 so mod_jk seems to be working.

For reference:
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug]
 map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to
 map URI
 '/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm'
 from 6 maps
 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug]
 find_match::jk_uri_worker_map.c (850): Attempting to map context
 URI '/glassfish-test/*=worker1' source 'JkMount'
 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug]
 find_match::jk_uri_worker_map.c (850): Attempting to map context
 URI '/mywebapp/*=worker1' source 'JkMount'
 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug]
 find_match::jk_uri_worker_map.c (863): Found a wildchar match
 '/mywebapp/*=worker1'

So, that all looks good to me.

 My question is, why does mod_jk work when I manually enter the web 
 address Adobe is trying to access but not work when Adobe accesses
 it?

Can you watch the network traffic using something like tcpdump or
Wireshark? It would be good to see what the actual conversation is
between the client and the server.

 Can you see anything in the log file that would indicate the
 address I entered is different than the address Adobe is using,
 that could explain this? I really need this working, so any help
 MUCH appreciated. Thanks in advance.

That extra colon is a bit weird. Are you switching ports or protocols
during any redirection that Flexbuilder might have to follow? I wonder
if there is a bug in Flexbuilder that causes prroly-formed URLs to be
sent to the server.

 For reference, the httpd.conf file includes the following (the ... 
 indicates non-relevant code I removed for simplicity):
 
 VirtualHost xx.xxx.xxx.196:80

Stupid question: that's the IP address for host3.mydomain.com, right?
If you bind to a specific interface, it's possible that httpd might
handle a request on a different interface with a request for /mydomain
(I think you meant /mywebapp) and not map it properly.

 JkMountCopy On

I didn't see any JkMounts outside of this VirtualHost. Are you sure
you need JkMountCopy?

 JkMount /mydomain/* worker1 JkMount /mydomain worker1

Looks good.

Let's see what tcpdump has to say. You ought to be able to use
something like curl or wget to reproduce each of the requests made by
FlexBuilder to see exactly where either the client or the server is
failing.

- -chris
-BEGIN PGP SIGNATURE-
Version: 

Re: Using local EJBs in web application

2012-02-16 Thread Violeta Georgieva
It's probably just my issue but I am not seeing your war file as valid.

What do you mean?


Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

Sorry, a bit more readable, still in-line.

(my email program seems to do funny things with your text).

modjkl...@comcast.net wrote:
Hello. I'm trying to setup Adobe's Flexbuilder 4.6 software to access mydomain.com/mywebapp using port 80 on Apache Webserver 2.2.21 and connect using mod_jk 1.2.32 on a remote Linux CentOS 6.2 server. I'm puzzled by the mod_jk.log file, which I've included a snippet below and attached as a text file. I also attached an image of Adobe Flexbuilder's wizard. 



As you can see from the image, this wizard has a button called Validate Configuration that attempts to connect to the remote server provided in the input field labeled Root URL. If I enter the following into this Root URL field 



http://mydomain.com:8080/mywebapp 



the Adobe Flashbuilder software states that a connection was successfully made to the server. However, if I enter the following instead: 



http://mydomain.com/mywebapp 



the Adobe Flashbuilder software states that it cannot connect to the server. 



When I review the mod_jk.log file (attached as a file and also shown below), I see Adobe's request in the 2nd line (see red font ), where the mod_jk.log entry reports a missing uri map for host3.mydomain.com:/jitterapp/flex_wizard_... 



Later in this log snippet, as identified in green font , you'll see an entry for attempting to map URI ' /jitterapp/flex_wizard_... This entry was created when I opened a web browser and pointed it to the address Adobe was trying to access, which I obtained from the log file, that is, http://mydomain.com/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm. In this case, a match was found with JkMount and a worker assigned, and so mod_jk seems to be working. 



My question is, why does mod_jk work when I manually enter the web address Adobe is trying to access but not work when Adobe accesses it? Can you see anything in the log file that would indicate the address I entered is different than the address Adobe is using, that could explain this? I really need this working, so any help MUCH appreciated. Thanks in advance. 



For reference, the httpd.conf file includes the following (the ... indicates non-relevant code I removed for simplicity): 



LoadModule jk_module modules/mod_jk.so 

JkWorkersFile /etc/httpd/conf/workers.properties 
JkLogFile /etc/httpd/logs/mod_jk.log 
JkLogLevel debug 
JkLogStampFormat [%a %b %d %H:%M:%S %Y]  JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories 
JkRequestLogFormat %w %V %T 
... 
Listen 0.0.0.0:80 
User nobody 
Group nobody 
ExtendedStatus On 
ServerAdmin webmas...@webxyz.net 
ServerName host3.mydomain.com 
LogLevel warn 
Timeout 300 
ServerSignature On 
... 
UserDir public_html 
... 

Location /whm-server-status 
SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from 127.0.0.1 
/Location 

Location /server-status 

SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from xx.xx.xxx.0/24 
/Location 



Location /server-info 
SetHandler server-info 
Order deny,allow 
Deny from all 
Allow from xx.xx.xxx.0/24 
/Location 
... 

NameVirtualHost 67.227.243.196:80 
NameVirtualHost * 
... 
VirtualHost xx.xxx.xxx.196:80 
ServerName mydomain.com 
ServerAlias www.mydomain.com host3.mydomain.com 
DocumentRoot /home/gkk/public_html 
ServerAdmin webmas...@mydomain.com 
UseCanonicalName Off 
JkMountCopy On 
JkMount /mydomain/* worker1 
JkMount /mydomain worker1


So you are mapping /mydomain/* to Tomcat (to mod_jk actually)


/VirtualHost 




mod_jk.log file snippet-- 





[Thu Feb 16 06:46:37 2012] [13722:140020322740160] [debug] jk_handler::mod_jk.c (2662): Service finished with status=404 for worker=worker1 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 



.. and trying a URI /mywebapp  ???

Or was this just editing of your config/posting ?

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



RE: Using local EJBs in web application

2012-02-16 Thread Caldarale, Charles R
 From: Violeta Georgieva [mailto:miles...@gmail.com] 
 Subject: Re: Using local EJBs in web application

  It's probably just my issue but I am not seeing your 
  war file as valid.

 What do you mean?

I think it means we've got another Martin G on our hands...

In other words, all posts from Code Animal are ignorable.

 - 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: Using local EJBs in web application

2012-02-16 Thread Violeta Georgieva
Hi,

Which one?

Tomcat + OpenEJB in OSGi environment

Looks like your integration isn't exactly complete.

Yep it cannot reach the OpenEjb at all because there is no binding in the
naming for local EJBs

Local EJB refs aren't bound, only (non-local) EJB refs?

Yep

Looks like nobody has done anything about that.

Tomcat is a servlet container that provides minimal support for EJBs
and things like that. It's no shock to me that something like this is
unimplemented. If you are interested in providing a patch, we'd be
glad to consider it for inclusion.

Thanks. I'll definitely do it today or tomorrow.

Regards
Violeta

2012/2/15 Christopher Schultz ch...@christopherschultz.net

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Violetta,

 On 2/15/12 3:11 PM, Violeta Georgieva wrote:
  I integrated Tomcat 7.0.25 with an EJB container.

 Which one?

  I have simple web application that uses ejb-local-ref (see the
  attachment).
 
  Unfortunately when I request the web application it cannot find the
  ejb at all:
 
  javax.naming.NameNotFoundException: Name ejb is not bound in this
  Context
  org.apache.naming.NamingContext.lookup(NamingContext.java:820)
  org.apache.naming.NamingContext.lookup(NamingContext.java:154)
  org.apache.naming.NamingContext.lookup(NamingContext.java:831)

 Looks like your integration isn't exactly complete.

  I can see that local EJB refs are not bound, but only EJB refs -

 Local EJB refs aren't bound, only (non-local) EJB refs?

  org.apache.catalina.core.NamingContextListener.createNamingContext()
 
   Also in the same class I can see that addLocalEJB method is marked
  as NO-OP.
 
  Is that intentional? What I have to do in order to have this sample
  running?

 Looks like nobody has done anything about that.

 Tomcat is a servlet container that provides minimal support for EJBs
 and things like that. It's no shock to me that something like this is
 unimplemented. If you are interested in providing a patch, we'd be
 glad to consider it for inclusion.

 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
 Comment: GPGTools - http://gpgtools.org
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAk88F78ACgkQ9CaO5/Lv0PAmngCgjNb2EMZvQb5owI5td+lRxngk
 xX0AnjGr9t++WXtUn4rURQt4bCWvGVD3
 =xkuk
 -END PGP SIGNATURE-

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




Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

Christopher Schultz wrote:
...



The image was stripped by the list, so we can't see it. You'll have to
post elsewhere if it's important.

Also, though I could see your customized font colors, many readers
will not be able to, and the archives may not show them either. Then
there are red-green color-blind people, too :) Consider using in-text
clues to point things out rather than font colors.


+1

Actually, please send your messages to the list as plain text, rather than 
HTML.
HTML doesn't work well for snippets of configs or code, and as you've seen it creates 
difficulties when trying to answer your messages.




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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread modjklist
Thanks Andre for catching my typo (correct in practice, but incorrect when I 
edited it for this email). I've corrected it below. Also, switched to plain 
text instead of HTML.

Thanks Christopher -- I eliminated the attachments. I've tried to make it more 
readable for color-blind people, use in-text clues, etc. below. I've also 
included my workers.properties file. You're right that the JkMountCopy isn't 
needed (I was desperate to find a solution and this was one attempt to fix it 
that had no effect). I was worried about the colon in the mod_jk.log file lines 
as well, but since it is consistently everywhere, I assumed it was a formatting 
issue related to mod_jk. I'm not switching ports or changing protocols. I'm 
trying to keep everything simple. The address you pointed out is the IP address 
for host3.mydomain.com. As an experiment, I replaced host3.mydomain.com with 
the actual IP address for the server (used by VirtualHost) in the input field 
for Host URL in Adobe's software so there's be no mistake which IP address 
would receive Adobe's request, but the mod_jk.log appears exactly the same. 

original message is below---

Hello. I'm trying to setup Adobe's Flexbuilder 4.6 software to access 
mydomain.com/mywebapp using port 80 on Apache Webserver 2.2.21 and connect 
using mod_jk 1.2.32 on a remote Linux CentOS 6.2 server. I'm puzzled by the 
mod_jk.log file, which I've included a snippet below and attached as a text 
file. I also attached an image of Adobe Flexbuilder's wizard. 

As you can see from the image, this wizard has a button called Validate 
Configuration that attempts to connect to the remote server provided in the 
input field labeled Root URL. If I enter the following into this Root URL 
field 

http://mydomain.com:8080/mywebapp 

the Adobe Flashbuilder software states that a connection was successfully made 
to the server. However, if I enter the following instead: 

http://mydomain.com/mywebapp 

the Adobe Flashbuilder software states that it cannot connect to the server. 

When I review the mod_jk.log file (attached as a file and also shown below), I 
see Adobe's request in the 2nd line, where the mod_jk.log entry reports a 
missing uri map for host3.mydomain.com:/jitterapp/flex_wizard_... Here's that 
line: 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map 
forhost3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm
 

Later in this log snippet , you'll see an entry for attempting to map URI ' 
/jitterapp/flex_wizard_... Here's that line: 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
'/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm' from 
6 maps 

This entry was created when I opened a web browser and pointed it to the 
address Adobe was trying to access, which I obtained from the log file, that 
is, 
http://mydomain.com/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm.
 In this case, a match was found with JkMount and a worker assigned, and so 
mod_jk seems to be working. Here's the relevant line: 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/mywebapp/*=worker1' 

My question is, why does mod_jk work when I manually enter the web address 
Adobe is trying to access but not work when Adobe accesses it? Can you see 
anything in the log file that would indicate the address I entered is different 
than the address Adobe is using, that could explain this? I really need this 
working, so any help MUCH appreciated. Thanks in advance. 

httpd.conf file snippet-

For reference, the httpd.conf file includes the following (the ... indicates 
non-relevant code I removed for simplicity): 

LoadModule jk_module modules/mod_jk.so 

JkWorkersFile /etc/httpd/conf/workers.properties 
JkLogFile /etc/httpd/logs/mod_jk.log 
JkLogLevel debug 
JkLogStampFormat [%a %b %d %H:%M:%S %Y]  JkOptions +ForwardKeySize 
+ForwardURICompat -ForwardDirectories 
JkRequestLogFormat %w %V %T 
... 
Listen 0.0.0.0:80 
User nobody 
Group nobody 
ExtendedStatus On 
ServerAdmin webmas...@webxyz.net 
ServerName host3.mydomain.com 
LogLevel warn 
Timeout 300 
ServerSignature On 
... 
UserDir public_html 
... 

Location /whm-server-status 
SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from 127.0.0.1 
/Location 

Location /server-status 

SetHandler server-status 
Order deny,allow 
Deny from all 
Allow from xx.xx.xxx.0/24 
/Location 


Location /server-info 
SetHandler server-info 
Order deny,allow 
Deny from all 
Allow from xx.xx.xxx.0/24 
/Location 
... 

NameVirtualHost 67.227.243.196:80 
NameVirtualHost * 
... 
VirtualHost xx.xxx.xxx.196:80 
ServerName mydomain.com 
ServerAlias www.mydomain.com host3.mydomain.com 
DocumentRoot /home/gkk/public_html 

Re: Application Scope Replication in 6.0.x

2012-02-16 Thread Pid
On 16/02/2012 15:55, Gregory Werner wrote:
 In-line responses.  Thanks for the ideas, I really do appreciate it.
 
 On Thu, Feb 16, 2012 at 10:43 AM, Christopher Schultz 
 ch...@christopherschultz.net wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Gregory,

 On 2/16/12 10:34 AM, Gregory Werner wrote:
 I didn't know that either.  It is simply a case of looking for the
 wrong keywords.  I said application score replication they said
 context attribute replication.  I gotta learn how to speak their
 language.

 Even after I put Context
 className=*org.apache.catalina.ha.context.ReplicatedContext* in
 my context.xml

 and make sure that my application's web.xml has *distributable
 /* * * the following:

 1. MapString, Date userCache = (MapString, Date)
 context.getAttribute(userCache); 2.
 userCache.remove(remoteUserName);

 returns a null userCache object (context is set in the
 ServletContextAware method, setServletContext).

 Is this all on the same server, or are you setting the attribute in
 one context and watching for it's value to be available in a different
 (replicated) one?


 In this case it is a test environment.  We are trying to emulate two
 distinct physical servers/load-balancing (which is the real case) on a
 single physical machine with one Tomcat instance.  Looking at the logs we
 can see some requests going to A and some going to B so it is load
 balancing, but in the end I am only placing a single war file and starting
 a single tomcat instance.

Huh?  One instance, what use is that?


p


 Just trying to understand the test case, here.

 When I enumerate through all the context attributes, I cannot see
 the stuff I am putting in it, just like the default entries which
 wind up there.  Too weird.

 Remember that it's not magic replication: Tomcat doesn't know when you
 modify the object itself. I suspect that if you modify the object
 itself (say, by adding elements to the cache) you'll have to do this:

 context.setAttribute(userCache, userCache);

 
 I do, that would be my next line.  I just stopped there because the
 userCache I retrieve from the context is null so I get a
 NullPointerException crashing things before I get an opportunity to put it
 back in the cache.
 
 

 You might want to consider using something like memcached or even a
 traditional database to share this kind of information: IMO they are
 much better equipped to do the kinds of things you want to do (and
 they are separated from the servlet API, which can either be a good
 thing or a bad thing for you).

 - -chris

 


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

Ok, that's a lot more readable.
See in-line.

modjkl...@comcast.net wrote:

(removing the irrelevant bits)

...


http://mydomain.com:8080/mywebapp 

the Adobe Flashbuilder software states that a connection was successfully made to the server. However, if I enter the following instead: 



As Chris was saying, that shows that at least your webapp is reachable when connecting to 
Tomcat directly.





Later in this log snippet , you'll see an entry for attempting to map URI ' /jitterapp/flex_wizard_... Here's that line: 



So what /jitterapp now doing here ?  I thought it was /mywebapp ?

(It's ok to edit configs and logfiles, but if you forget some lines, then it gets kind of 
confusing).


...


NameVirtualHost 67.227.243.196:80 
NameVirtualHost * 
... 
VirtualHost xx.xxx.xxx.196:80 


That's also kind of confusing.
Why not just

NameVirtualHost *

and

VirtualHost *

?

JkMountCopy On 


There is no point to that one, since you have no JkMounts in nyour main server 
config.
Remove it, it may interfere later.


JkMount /mywebapp/* worker1 
JkMount /mywebapp worker1 


ok.

/VirtualHost 


--workers.properties file--

The workers.properties file is: 

worker.list=worker1 
worker.worker1.type=ajp13 
worker.worker1.host=localhost 
worker.worker1.port=8009 



ok also.

mod_jk.log file snippet-- 

[Thu Feb 16 06:46:37 2012] [13722:140020322740160] [debug] jk_handler::mod_jk.c (2662): Service finished with status=404 for worker=worker1 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_map_to_storage::mod_jk.c (3647): missing uri map for host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/404.shtml 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_map_to_storage::mod_jk.c (3647): missing uri map for host3.mydomain.com:/404.shtml 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/cp_errordocument.shtml 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_map_to_storage::mod_jk.c (3647): missing uri map for host3.mydomain.com:/cp_errordocument.shtml 

[Thu Feb 16 06:49:46 2012] [13724:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/ 

[Thu Feb 16 06:49:46 2012] [13724:140020322740160] [debug] jk_map_to_storage::mod_jk.c (3647): missing uri map for host3.mydomain.com:/ 

[Thu Feb 16 06:49:46 2012] [13724:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/index.html.var 

... 


All of the above are confusing, as they are probably from your orevious 
attempts.



[Thu Feb 16 06:55:02 2012] [13724:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/whm-server-status 

[Thu Feb 16 06:55:02 2012] [13724:140020322740160] [debug] jk_map_to_storage::mod_jk.c (3647): missing uri map for host3.mydomain.com:/whm-server-status 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm' from 6 maps 


[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
'/glassfish-test/*=worker1' source 'JkMount'


Aha. So there are JkMount's which you have not told us about...




[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/mywebapp/*=worker1' source 'JkMount' 


[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/mywebapp/*=worker1'


There we go.  It has found a match, according to your JkMount's.



[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] jk_handler::mod_jk.c (2522): Into handler jakarta-servlet worker=worker1 r-proxyreq=0 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker worker1 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] wc_maintain::jk_worker.c (339): Maintaining worker worker1 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] wc_get_name_for_type::jk_worker.c (293): Found worker type 'ajp13' 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] init_ws_service::mod_jk.c (1024): Service protocol=HTTP/1.1 method=GET ssl=false host=(null) addr=xx.xx.xxx.163 name=mydomain.com port=80 auth=(null) user=(null) laddr=xx.xxx.xxx.196 

raddr=xx.xxx.xxx.163 

Re: Application Scope Replication in 6.0.x

2012-02-16 Thread Gregory Werner
On Thu, Feb 16, 2012 at 11:15 AM, Christopher Schultz 
ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Gregory,

 On 2/16/12 10:55 AM, Gregory Werner wrote:
  In this case it is a test environment.  We are trying to emulate
  two distinct physical servers/load-balancing (which is the real
  case) on a single physical machine with one Tomcat instance.
  Looking at the logs we can see some requests going to A and some
  going to B so it is load balancing, but in the end I am only
  placing a single war file and starting a single tomcat instance.

 So, you have a single Tomcat instance with a single webapp deployed,
 but your load balancer has two separate connections to the single
 instance? What are you using for your load-balancer (it doesn't
 matter, I'm just curious).

  Remember that it's not magic replication: Tomcat doesn't know
  when you modify the object itself. I suspect that if you modify
  the object itself (say, by adding elements to the cache) you'll
  have to do this:
 
  context.setAttribute(userCache, userCache);
 
  I do, that would be my next line.  I just stopped there because
  the userCache I retrieve from the context is null so I get a
  NullPointerException crashing things before I get an opportunity to
  put it back in the cache.

 Gotcha.

 So, when are you actually putting a UserCache *into* the servlet
 context? I'm wondering if you can't find anything in the servlet
 context because you've never put anything there :)


Yeah, ok, I think we can end this thread now.  A particular problem that
does not occur in my dev where context works great, but does occur in my
test.  It is difficult to describe, but basically because of an access
control list error in the test setup, it never does make it to that
particular item, so I can see it is likely not entered into the context.

-Greg


Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread modjklist
Hi Christopher, I've never used tcpdump before, but it seems the trick is 
knowing how to configure it with the various switches to extract what one 
wants. I took a stab at it below, but I can't find much meaning in it. This 
snippet captures the time when Adobe accesses the webaddress. Is there a better 
command you can give me to use to give more relevant information? (below: 
xx.xxx.xxx.163 = client and xx.xxx.xxx.196 = server)

Hi Andre, yes there's a few more JkMounts that I didn't mention since they're 
unrelated, and I corrected below the additional typos you found. Also, the 
initial part of the mod_jk.log below was critical to understanding the problem 
(I'll edit it to make it more obvious -- see THE CAPITAL LETTING inside the 
mod_jk snippet below).

[root@host3 /etc]# tcpdump -v -n port http 
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 
bytes 
09:12:45.953686 IP (tos 0x0, ttl 50, id 60955, offset 0, flags [DF], proto TCP 
(6), length 64) 
xx.xxx.xxx.163.36246  xx.xxx.xxx.196.http: Flags [S], cksum 0xf26a (correct), 
seq 2296787062, win 65535, options [mss 1460,nop,wscale 3,nop,nop,TS val 
837669530 ecr 0,sackOK,eol], length 0 
09:12:45.953728 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), 
length 60) 
xx.xxx.xxx.196.http  xx.xxx.xxx.163.36246: Flags [S.], cksum 0xb37b (correct), 
seq 1455038508, ack 2296787063, win 14480, options [mss 1460,sackOK,TS val 
428508894 ecr 837669530,nop,wscale 7], length 0 
09:12:46.047635 IP (tos 0x0, ttl 50, id 38932, offset 0, flags [DF], proto TCP 
(6), length 52) 
xx.xxx.xxx.163.36246  xx.xxx.xxx.196.http: Flags [.], cksum 0x1ad7 (correct), 
ack 1, win 65535, options [nop,nop,TS val 837669531 ecr 428508894], length 0 
09:12:46.047658 IP (tos 0x0, ttl 50, id 55301, offset 0, flags [DF], proto TCP 
(6), length 181) 
xx.xxx.xxx.163.36246  xx.xxx.xxx.196.http: Flags [P.], cksum 0xb731 (correct), 
seq 1:130, ack 1, win 65535, options [nop,nop,TS val 837669531 ecr 428508894], 
length 129 
09:12:46.047688 IP (tos 0x0, ttl 64, id 42769, offset 0, flags [DF], proto TCP 
(6), length 52) 
xx.xxx.xxx.196.http  xx.xxx.xxx.163.36246: Flags [.], cksum 0x197e (correct), 
ack 130, win 122, options [nop,nop,TS val 428508988 ecr 837669531], length 0 
09:12:46.050453 IP (tos 0x0, ttl 64, id 42770, offset 0, flags [DF], proto TCP 
(6), length 1500) 
xx.xxx.xxx.196.http  xx.xxx.xxx.163.36246: Flags [.], cksum 0xfe97 (incorrect 
- 0x6a47), seq 1:1449, ack 130, win 122, options [nop,nop,TS val 428508991 ecr 
837669531], length 1448 
09:12:46.050461 IP (tos 0x0, ttl 64, id 42771, offset 0, flags [DF], proto TCP 
(6), length 1200) 
xx.xxx.xxx.196.http  xx.xxx.xxx.163.36246: Flags [P.], cksum 0xfd6b (incorrect 
- 0x62d7), seq 1449:2597, ack 130, win 122, options [nop,nop,TS val 428508991 
ecr 837669531], length 1148 
09:12:46.050505 IP (tos 0x0, ttl 64, id 42772, offset 0, flags [DF], proto TCP 
(6), length 52) 
xx.xxx.xxx.196.http  xx.xxx.xxx.163.36246: Flags [F.], cksum 0x0f56 (correct), 
seq 2597, ack 130, win 122, options [nop,nop,TS val 428508991 ecr 837669531], 
length 0 
09:12:46.145851 IP (tos 0x0, ttl 50, id 64715, offset 0, flags [DF], proto TCP 
(6), length 52) 
xx.xxx.xxx.163.36246  xx.xxx.xxx.196.http: Flags [.], cksum 0x0fd0 (correct), 
ack 2597, win 65535, options [nop,nop,TS val 837669532 ecr 428508991], length 0 
09:12:46.145878 IP (tos 0x0, ttl 50, id 58941, offset 0, flags [DF], proto TCP 
(6), length 52) 
xx.xxx.xxx.163.36246  xx.xxx.xxx.196.http: Flags [.], cksum 0x0fcf (correct), 
ack 2598, win 65535, options [nop,nop,TS val 837669532 ecr 428508991], length 0 
09:12:46.155260 IP (tos 0x0, ttl 50, id 33156, offset 0, flags [DF], proto TCP 
(6), length 52) 
xx.xxx.xxx.163.36246  xx.xxx.xxx.196.http: Flags [F.], cksum 0x0fce (correct), 
seq 130, ack 2598, win 65535, options [nop,nop,TS val 837669532 ecr 428508991], 
length 0 
09:12:46.155293 IP (tos 0x0, ttl 64, id 42773, offset 0, flags [DF], proto TCP 
(6), length 52) 
xx.xxx.xxx.196.http  xx.xxx.xxx.163.36246: Flags [.], cksum 0x0eec (correct), 
ack 131, win 122, options [nop,nop,TS val 428509095 ecr 837669532], length 0 

- Original Message - 
From: modjkl...@comcast.net 
To: users@tomcat.apache.org 
Sent: Thursday, February 16, 2012 8:55:35 AM 
Subject: Re: mod_jk doesn't map to software-generated web address, but maps to 
this address when I enter it into browser 

Thanks Andre for catching my typo (correct in practice, but incorrect when I 
edited it for this email). I've corrected it below. Also, switched to plain 
text instead of HTML. 

Thanks Christopher -- I eliminated the attachments. I've tried to make it more 
readable for color-blind people, use in-text clues, etc. below. I've also 
included my workers.properties file. You're right that the JkMountCopy isn't 
needed (I was desperate to find a solution and this was one attempt to fix it 
that had no effect). I was worried about the colon in the mod_jk.log file lines 
as well, but since it is 

Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread Rainer Jung

On 16.02.2012 17:55, modjkl...@comcast.net wrote:

original message is below---

Hello. I'm trying to setup Adobe's Flexbuilder 4.6 software to access 
mydomain.com/mywebapp using port 80 on Apache Webserver 2.2.21 and connect 
using mod_jk 1.2.32 on a remote Linux CentOS 6.2 server. I'm puzzled by the 
mod_jk.log file, which I've included a snippet below and attached as a text 
file. I also attached an image of Adobe Flexbuilder's wizard.

As you can see from the image, this wizard has a button called Validate Configuration 
that attempts to connect to the remote server provided in the input field labeled Root 
URL. If I enter the following into this Root URL field

http://mydomain.com:8080/mywebapp

the Adobe Flashbuilder software states that a connection was successfully made 
to the server. However, if I enter the following instead:

http://mydomain.com/mywebapp

the Adobe Flashbuilder software states that it cannot connect to the server.

When I review the mod_jk.log file (attached as a file and also shown below), I 
see Adobe's request in the 2nd line, where the mod_jk.log entry reports a 
missing uri map for host3.mydomain.com:/jitterapp/flex_wizard_... Here's that 
line:


That means it is using a VHost in Apache which does not have JkMount or 
uriworkermap.properties inside.



[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map 
forhost3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm


And the colon Chris and you were speculating about is indeed an accident 
in trying to separate host and URI, so read it as:


missing uri map for host3.mydomain.com: /jitterapp/flex_wizard_...

So your request is served by whatever VHost is configured to handle 
requests for host3.mydomain.com



Later in this log snippet , you'll see an entry for attempting to map URI ' 
/jitterapp/flex_wizard_... Here's that line:

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
'/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm' from 
6 maps

This entry was created when I opened a web browser and pointed it to the 
address Adobe was trying to access, which I obtained from the log file, that 
is, 
http://mydomain.com/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm.
 In this case, a match was found with JkMount and a worker assigned, and so 
mod_jk seems to be working. Here's the relevant line:


Yep, the VHost handling mydomain.com (which must be some other VHost 
than the previous one for host3.mydomain.com) has rules and those did match.



[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/mywebapp/*=worker1'

My question is, why does mod_jk work when I manually enter the web address 
Adobe is trying to access but not work when Adobe accesses it? Can you see 
anything in the log file that would indicate the address I entered is different 
than the address Adobe is using, that could explain this? I really need this 
working, so any help MUCH appreciated. Thanks in advance.


Because you are being handled by different VHosts and the mounting rules 
are not defined in all of them.


If you want to double check my VHos theory: add a special accesslog 
using CustomLog with a new log file name to the VHost you added your 
Jkmount. I would expect the request that found a mount to show up in 
that accesslog, and the other one to not show up in this additional 
access log because it was handled by some other vhost.


Easiest solution could be moving all Jkmount directives to the global 
server and setting JkMountCopy all in the global server.



httpd.conf file snippet-

For reference, the httpd.conf file includes the following (the ... indicates 
non-relevant code I removed for simplicity):

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /etc/httpd/logs/mod_jk.log
JkLogLevel debug


Remove the next two directives , get a mod_jk 1.2.32 source download and 
have a look at the httpd-jk.conf and workers.properties file contained 
in it.



JkLogStampFormat [%a %b %d %H:%M:%S %Y]  JkOptions +ForwardKeySize 
+ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
...
Listen 0.0.0.0:80
User nobody
Group nobody
ExtendedStatus On
ServerAdmin webmas...@webxyz.net
ServerName host3.mydomain.com
LogLevel warn
Timeout 300
ServerSignature On
...
UserDir public_html
...

Location /whm-server-status
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
/Location

Location /server-status

SetHandler server-status
Order deny,allow
Deny from all
Allow from xx.xx.xxx.0/24
/Location


Location /server-info
SetHandler server-info
Order deny,allow
Deny from all
Allow from xx.xx.xxx.0/24
/Location
...

NameVirtualHost 

Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier
In this case, and although Rainer is of course The mod_jk specialist, I beg to differ with 
his analysis.



modjkl...@comcast.net wrote:


mod_jk.log file snippet-- 

[Thu Feb 16 06:46:37 2012] [13722:140020322740160] [debug] jk_handler::mod_jk.c (2662): Service finished with status=404 for worker=worker1 

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 


RIGHT NOW THE ADOBE SOFTWARE WILL ATTEMPT TO CONNECT TO THE SERVER...

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_map_to_storage::mod_jk.c (3647): missing uri map for host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 


NOTICE THE WEB ADDRESS ADOBE IS USING IN THE ABOVE LINE


Well no, actually it is not a web address.  It seems very much like Adobe is sending 
host3.mydomain.com:/mywebapp/flex_w...  AS A URI.
And since mod_jk has no mapping for a URI starting with host3.., it says so and hands it 
back to Apache.  From then on, we don't see anything anymore in the mod_jk log of course, 
since it is Apache which is trying to match that URI (and failing).




[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] jk_translate::mod_jk.c (3488): missing uri map for host3.mydomain.com:/404.shtml 



That's again the Adobe thing trying now to get other documents, which similarly fail 
because there is still that funny prefix to the URI.

And so on...



IN THE NEXT LINE, I HAVE TAKEN ADOBES ADDRESS SEEN ABOVE AND ENTERED IT 
MANUALLY INTO A BROWSER WINDOW

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI '/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm' from 6 maps 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] find_match::jk_uri_worker_map.c (850): Attempting to map context URI '/mywebapp/*=worker1' source 'JkMount' 


[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/mywebapp/*=worker1'


Notice the difference ?  When you do this manually, that host3.. prefix is not there, 
and the match succeeds.




[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] jk_handler::mod_jk.c (2522): Into handler jakarta-servlet worker=worker1 r-proxyreq=0 

[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] wc_get_worker_for_name::jk_worker.c (116): found a worker worker1 


IN THIS CASE, MOD_JK DOES CORRECTLY SEND THIS ADDRESS TO THE WEB CONTAINER FOR 
PROCESSING (THE QUESTION OF THIS POST IS: WHY DIDN'T IT DO THIS WHEN ADOBE USED 
THE SAME ADDRESS ABOVE?)



Well actually, I don't think that mod_jk has anything to do with the problem.
It seems to be the Adobe thing which gets things wrong.
When the request URI is fine, then mod_jk is doing its job.



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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread modjklist
Hi Ranier, 

I took all JkMounts inside the VirtualHost tags and placed them outside these 
tags, and above them added JkMountCopy All, restarted Apache, and now Adobe 
successfully can access mydomain.com/mywebapp. Thanks so much!!!

I also tried modifying the above httpd.conf configuration by removing the 
global JkMountCopy All line of code, and adding a JkMountCopy On line of code 
inside the original VirtualHost tags, but this also failed as before. Any idea 
why?

Andre, I did worry about the host3 designation initially, so I previously 
added it to the VirtualHost tag here under ServerAlias:

ServerAlias www.mydomain.com host3.mydomain.com 

So I assumed that should permit Adobe trying to access host3.mydomain.com

Thanks Andre, Ranier, and Christopher!!!

- Original Message - 
From: Rainer Jung rainer.j...@kippdata.de 
To: users@tomcat.apache.org 
Sent: Thursday, February 16, 2012 9:47:13 AM 
Subject: Re: mod_jk doesn't map to software-generated web address, but maps to 
this address when I enter it into browser 

On 16.02.2012 17:55, modjkl...@comcast.net wrote: 
 original message is below--- 
 
 Hello. I'm trying to setup Adobe's Flexbuilder 4.6 software to access 
 mydomain.com/mywebapp using port 80 on Apache Webserver 2.2.21 and connect 
 using mod_jk 1.2.32 on a remote Linux CentOS 6.2 server. I'm puzzled by the 
 mod_jk.log file, which I've included a snippet below and attached as a text 
 file. I also attached an image of Adobe Flexbuilder's wizard. 
 
 As you can see from the image, this wizard has a button called Validate 
 Configuration that attempts to connect to the remote server provided in the 
 input field labeled Root URL. If I enter the following into this Root URL 
 field 
 
 http://mydomain.com:8080/mywebapp 
 
 the Adobe Flashbuilder software states that a connection was successfully 
 made to the server. However, if I enter the following instead: 
 
 http://mydomain.com/mywebapp 
 
 the Adobe Flashbuilder software states that it cannot connect to the server. 
 
 When I review the mod_jk.log file (attached as a file and also shown below), 
 I see Adobe's request in the 2nd line, where the mod_jk.log entry reports a 
 missing uri map for host3.mydomain.com:/jitterapp/flex_wizard_... Here's that 
 line: 

That means it is using a VHost in Apache which does not have JkMount or 
uriworkermap.properties inside. 

 [Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
 jk_translate::mod_jk.c (3488): missing uri map 
 forhost3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm
  

And the colon Chris and you were speculating about is indeed an accident 
in trying to separate host and URI, so read it as: 

missing uri map for host3.mydomain.com: /jitterapp/flex_wizard_... 

So your request is served by whatever VHost is configured to handle 
requests for host3.mydomain.com 

 Later in this log snippet , you'll see an entry for attempting to map URI ' 
 /jitterapp/flex_wizard_... Here's that line: 
 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map URI 
 '/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm' 
 from 6 maps 
 
 This entry was created when I opened a web browser and pointed it to the 
 address Adobe was trying to access, which I obtained from the log file, that 
 is, 
 http://mydomain.com/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm.
  In this case, a match was found with JkMount and a worker assigned, and so 
 mod_jk seems to be working. Here's the relevant line: 

Yep, the VHost handling mydomain.com (which must be some other VHost 
than the previous one for host3.mydomain.com) has rules and those did match. 

 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
 find_match::jk_uri_worker_map.c (863): Found a wildchar match 
 '/mywebapp/*=worker1' 
 
 My question is, why does mod_jk work when I manually enter the web address 
 Adobe is trying to access but not work when Adobe accesses it? Can you see 
 anything in the log file that would indicate the address I entered is 
 different than the address Adobe is using, that could explain this? I really 
 need this working, so any help MUCH appreciated. Thanks in advance. 

Because you are being handled by different VHosts and the mounting rules 
are not defined in all of them. 

If you want to double check my VHos theory: add a special accesslog 
using CustomLog with a new log file name to the VHost you added your 
Jkmount. I would expect the request that found a mount to show up in 
that accesslog, and the other one to not show up in this additional 
access log because it was handled by some other vhost. 

Easiest solution could be moving all Jkmount directives to the global 
server and setting JkMountCopy all in the global server. 

 httpd.conf file snippet- 
 
 For reference, the httpd.conf 

Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

Another addendum at end.

André Warnier wrote:
In this case, and although Rainer is of course The mod_jk specialist, I 
beg to differ with his analysis.



modjkl...@comcast.net wrote:


mod_jk.log file snippet--
[Thu Feb 16 06:46:37 2012] [13722:140020322740160] [debug] 
jk_handler::mod_jk.c (2662): Service finished with status=404 for 
worker=worker1
[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for 
host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 


RIGHT NOW THE ADOBE SOFTWARE WILL ATTEMPT TO CONNECT TO THE SERVER...

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_map_to_storage::mod_jk.c (3647): missing uri map for 
host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 


NOTICE THE WEB ADDRESS ADOBE IS USING IN THE ABOVE LINE


Well no, actually it is not a web address.  It seems very much like 
Adobe is sending host3.mydomain.com:/mywebapp/flex_w...  AS A URI.
And since mod_jk has no mapping for a URI starting with host3.., it 
says so and hands it back to Apache.  From then on, we don't see 
anything anymore in the mod_jk log of course, since it is Apache which 
is trying to match that URI (and failing).




[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for 
host3.mydomain.com:/404.shtml


That's again the Adobe thing trying now to get other documents, which 
similarly fail because there is still that funny prefix to the URI.

And so on...



IN THE NEXT LINE, I HAVE TAKEN ADOBES ADDRESS SEEN ABOVE AND ENTERED 
IT MANUALLY INTO A BROWSER WINDOW


[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map 
URI 
'/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm' 
from 6 maps
[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
'/mywebapp/*=worker1' source 'JkMount'
[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/mywebapp/*=worker1'


Notice the difference ?  When you do this manually, that host3.. 
prefix is not there, and the match succeeds.




[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
jk_handler::mod_jk.c (2522): Into handler jakarta-servlet 
worker=worker1 r-proxyreq=0
[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
wc_get_worker_for_name::jk_worker.c (116): found a worker worker1
IN THIS CASE, MOD_JK DOES CORRECTLY SEND THIS ADDRESS TO THE WEB 
CONTAINER FOR PROCESSING (THE QUESTION OF THIS POST IS: WHY DIDN'T IT 
DO THIS WHEN ADOBE USED THE SAME ADDRESS ABOVE?)




Well actually, I don't think that mod_jk has anything to do with the 
problem.

It seems to be the Adobe thing which gets things wrong.
When the request URI is fine, then mod_jk is doing its job.


Or perhaps, it is the way in which you are entering hostname in that input box of the 
form, that confuses the Adobe thingy ?

Such as maybe :
- when you enter host3.mydomain.com:8080, it understands that this is a 
hostname
- but when you enter host3.mydomain.com it doesn't
Have you tried entering host3.mydomain.com:80 ? or 
http://host3.mydomain.com; ?



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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

And still more..

André Warnier wrote:

Another addendum at end.

André Warnier wrote:
In this case, and although Rainer is of course The mod_jk specialist, 
I beg to differ with his analysis.



modjkl...@comcast.net wrote:


mod_jk.log file snippet--
[Thu Feb 16 06:46:37 2012] [13722:140020322740160] [debug] 
jk_handler::mod_jk.c (2662): Service finished with status=404 for 
worker=worker1
[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for 
host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 


RIGHT NOW THE ADOBE SOFTWARE WILL ATTEMPT TO CONNECT TO THE SERVER...

[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_map_to_storage::mod_jk.c (3647): missing uri map for 
host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm 


NOTICE THE WEB ADDRESS ADOBE IS USING IN THE ABOVE LINE


Well no, actually it is not a web address.  It seems very much like 
Adobe is sending host3.mydomain.com:/mywebapp/flex_w...  AS A URI.
And since mod_jk has no mapping for a URI starting with host3.., it 
says so and hands it back to Apache.  From then on, we don't see 
anything anymore in the mod_jk log of course, since it is Apache which 
is trying to match that URI (and failing).




[Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
jk_translate::mod_jk.c (3488): missing uri map for 
host3.mydomain.com:/404.shtml


That's again the Adobe thing trying now to get other documents, which 
similarly fail because there is still that funny prefix to the URI.

And so on...



IN THE NEXT LINE, I HAVE TAKEN ADOBES ADDRESS SEEN ABOVE AND ENTERED 
IT MANUALLY INTO A BROWSER WINDOW


[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map 
URI 
'/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm' 
from 6 maps
[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
'/mywebapp/*=worker1' source 'JkMount'
[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
find_match::jk_uri_worker_map.c (863): Found a wildchar match 
'/mywebapp/*=worker1'


Notice the difference ?  When you do this manually, that host3.. 
prefix is not there, and the match succeeds.




[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
jk_handler::mod_jk.c (2522): Into handler jakarta-servlet 
worker=worker1 r-proxyreq=0
[Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
wc_get_worker_for_name::jk_worker.c (116): found a worker worker1
IN THIS CASE, MOD_JK DOES CORRECTLY SEND THIS ADDRESS TO THE WEB 
CONTAINER FOR PROCESSING (THE QUESTION OF THIS POST IS: WHY DIDN'T IT 
DO THIS WHEN ADOBE USED THE SAME ADDRESS ABOVE?)




Well actually, I don't think that mod_jk has anything to do with the 
problem.

It seems to be the Adobe thing which gets things wrong.
When the request URI is fine, then mod_jk is doing its job.


Or perhaps, it is the way in which you are entering hostname in that 
input box of the form, that confuses the Adobe thingy ?

Such as maybe :
- when you enter host3.mydomain.com:8080, it understands that this is 
a hostname

- but when you enter host3.mydomain.com it doesn't
Have you tried entering host3.mydomain.com:80 ? or 
http://host3.mydomain.com; ?





Actually, when I think about it, both Rainer's explanation and mine here may be 
right.
If the Adobe thing gets confused, and does not use the correct hostname for sending its 
request (say for example that it defaults to localhost), then we could have a mixture of 
the wrong URI being processed by the wrong VirtualHost, and really confusing everything..
(The first defined VirtualHost in Apache becoming the default VirtualHost, used if the 
hostname doesn't match..)



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



Re: Basic Authentication Valve not hitting on Tomcat7.0.20

2012-02-16 Thread Konstantin Kolinko
2012/2/16 Christopher Schultz ch...@christopherschultz.net:

 On 2/16/12 8:26 AM, Sachin Mehrotra wrote:
 login-config auth-methodBASIC/auth-method realm-nameMy App
 Realm/realm-name /login-config

 I believe if you set auth-method to BASIC, Tomcat will add its own
 Valve to the valve chain. If you don't set the auth-method here but
 still add your Valve to context.xml, does that improve things?


IIRC Tomcat would not add Authenticator valve if one is already there,
so this tip is useless.

Anyway you can always run Tomcat under debugger (see FAQ -
Development) and see what really is going on.

Best regards,
Konstantin Kolinko

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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread modjklist
Hi Andre, yes I see your point (Rainer's solution would solve that too I 
suppose). Also, believe me, I was trying all sorts of addresses in Adobe's 
input field:

http://www.mydomain.com/mywebapp
http://mydomain.com/mywebapp
http://mydomain.com:80/mywebapp
http://host3.mydomain.com/mywebapp
http://host3.mydomain.com:80/mywebapp
http://xx.xxx.xxx.xxx/mywebapp
etc.

practically every permutation I could think of, all with the same result. 

Also interesting is the tcpdump I send out earlier reports two cksum INCORRECTs 
when Adobe accesses port 80 (without Rainer's fix). No idea what's going on 
there.

- Original Message - 
From: André Warnier a...@ice-sa.com 
To: Tomcat Users List users@tomcat.apache.org 
Sent: Thursday, February 16, 2012 10:46:45 AM 
Subject: Re: mod_jk doesn't map to software-generated web address, but maps to 
this address when I enter it into browser 

And still more.. 

André Warnier wrote: 
 Another addendum at end. 
 
 André Warnier wrote: 
 In this case, and although Rainer is of course The mod_jk specialist, 
 I beg to differ with his analysis. 
 
 
 modjkl...@comcast.net wrote: 
 
 mod_jk.log file snippet-- 
 [Thu Feb 16 06:46:37 2012] [13722:140020322740160] [debug] 
 jk_handler::mod_jk.c (2662): Service finished with status=404 for 
 worker=worker1 
 [Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
 jk_translate::mod_jk.c (3488): missing uri map for 
 host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm
  
 
 RIGHT NOW THE ADOBE SOFTWARE WILL ATTEMPT TO CONNECT TO THE SERVER... 
 
 [Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
 jk_map_to_storage::mod_jk.c (3647): missing uri map for 
 host3.mydomain.com:/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm
  
 
 NOTICE THE WEB ADDRESS ADOBE IS USING IN THE ABOVE LINE 
 
 Well no, actually it is not a web address. It seems very much like 
 Adobe is sending host3.mydomain.com:/mywebapp/flex_w... AS A URI. 
 And since mod_jk has no mapping for a URI starting with host3.., it 
 says so and hands it back to Apache. From then on, we don't see 
 anything anymore in the mod_jk log of course, since it is Apache which 
 is trying to match that URI (and failing). 
 
 
 [Thu Feb 16 06:47:35 2012] [13723:140020322740160] [debug] 
 jk_translate::mod_jk.c (3488): missing uri map for 
 host3.mydomain.com:/404.shtml 
 
 That's again the Adobe thing trying now to get other documents, which 
 similarly fail because there is still that funny prefix to the URI. 
 And so on... 
 
 
 IN THE NEXT LINE, I HAVE TAKEN ADOBES ADDRESS SEEN ABOVE AND ENTERED 
 IT MANUALLY INTO A BROWSER WINDOW 
 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
 map_uri_to_worker_ext::jk_uri_worker_map.c (1036): Attempting to map 
 URI 
 '/mywebapp/flex_wizard_project_test_script_server_550713325917236076.htm' 
 from 6 maps 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
 find_match::jk_uri_worker_map.c (850): Attempting to map context URI 
 '/mywebapp/*=worker1' source 'JkMount' 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
 find_match::jk_uri_worker_map.c (863): Found a wildchar match 
 '/mywebapp/*=worker1' 
 
 Notice the difference ? When you do this manually, that host3.. 
 prefix is not there, and the match succeeds. 
 
 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
 jk_handler::mod_jk.c (2522): Into handler jakarta-servlet 
 worker=worker1 r-proxyreq=0 
 [Thu Feb 16 06:55:21 2012] [13725:140020322740160] [debug] 
 wc_get_worker_for_name::jk_worker.c (116): found a worker worker1 
 IN THIS CASE, MOD_JK DOES CORRECTLY SEND THIS ADDRESS TO THE WEB 
 CONTAINER FOR PROCESSING (THE QUESTION OF THIS POST IS: WHY DIDN'T IT 
 DO THIS WHEN ADOBE USED THE SAME ADDRESS ABOVE?) 
 
 
 Well actually, I don't think that mod_jk has anything to do with the 
 problem. 
 It seems to be the Adobe thing which gets things wrong. 
 When the request URI is fine, then mod_jk is doing its job. 
 
 
 Or perhaps, it is the way in which you are entering hostname in that 
 input box of the form, that confuses the Adobe thingy ? 
 Such as maybe : 
 - when you enter host3.mydomain.com:8080, it understands that this is 
 a hostname 
 - but when you enter host3.mydomain.com it doesn't 
 Have you tried entering host3.mydomain.com:80 ? or 
 http://host3.mydomain.com; ? 
 
 

Actually, when I think about it, both Rainer's explanation and mine here may be 
right. 
If the Adobe thing gets confused, and does not use the correct hostname for 
sending its 
request (say for example that it defaults to localhost), then we could have a 
mixture of 
the wrong URI being processed by the wrong VirtualHost, and really confusing 
everything.. 
(The first defined VirtualHost in Apache becoming the default VirtualHost, used 
if the 
hostname doesn't match..) 


- 
To unsubscribe, 

RE: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread Caldarale, Charles R
 From: modjkl...@comcast.net [mailto:modjkl...@comcast.net] 
 Subject: Re: mod_jk doesn't map to software-generated web 
 address, but maps to this address when I enter it into browser

 Also interesting is the tcpdump I send out earlier reports two cksum 
 INCORRECTs when Adobe accesses port 80 (without Rainer's fix). No idea
 what's going on there.

That's quite common and usually just an indication that the checksumming 
operation is handled by the NIC, not software.

 - 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: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread modjklist
Thank you Chuck, I feel a lot better now :-) 

- Original Message -
From: Charles R Caldarale chuck.caldar...@unisys.com 
To: Tomcat Users List users@tomcat.apache.org 
Sent: Thursday, February 16, 2012 11:17:05 AM 
Subject: RE: mod_jk doesn't map to software-generated web address, but maps to 
this address when I enter it into browser 

 From: modjkl...@comcast.net [mailto:modjkl...@comcast.net] 
 Subject: Re: mod_jk doesn't map to software-generated web 
 address, but maps to this address when I enter it into browser 

 Also interesting is the tcpdump I send out earlier reports two cksum 
 INCORRECTs when Adobe accesses port 80 (without Rainer's fix). No idea 
 what's going on there. 

That's quite common and usually just an indication that the checksumming 
operation is handled by the NIC, not software. 

- 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: Basic Authentication Valve not hitting on Tomcat7.0.20

2012-02-16 Thread Michela, Andrew J (LABOR)
I have that in the server.xml still no luck
security-constraint
  display-nameSecurity Constraint/display-name
  web-resource-collection
  web-resource-namesecure/web-resource-name
 web-resource-nameRestricted Access - Get Only/web-resource-name
 !-- Define the context-relative URL(s) to be protected --
 url-pattern/*/url-pattern
  /web-resource-collection
  auth-constraint
 !-- Anyone with one of the listed roles may access this area --
 role-namerole1/role-name
  /auth-constraint
/security-constraint

!-- Default login configuration uses form-based authentication --
   login-config
  auth-methodBASIC/auth-method 
  realm-nameManagement Reports/realm-name
form-login-config
   form-login-page/index.jsp/form-login-page
   form-error-page/errorpage.jsp/form-error-page
/form-login-config
 
/login-config

-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Thursday, February 16, 2012 1:59 PM
To: Tomcat Users List
Subject: Re: Basic Authentication Valve not hitting on Tomcat7.0.20

2012/2/16 Christopher Schultz ch...@christopherschultz.net:

 On 2/16/12 8:26 AM, Sachin Mehrotra wrote:
 login-config auth-methodBASIC/auth-method realm-nameMy App 
 Realm/realm-name /login-config

 I believe if you set auth-method to BASIC, Tomcat will add its own 
 Valve to the valve chain. If you don't set the auth-method here but 
 still add your Valve to context.xml, does that improve things?


IIRC Tomcat would not add Authenticator valve if one is already there, so this 
tip is useless.

Anyway you can always run Tomcat under debugger (see FAQ -
Development) and see what really is going on.

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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

modjkl...@comcast.net wrote:

Hi Andre, yes I see your point (Rainer's solution would solve that too I 
suppose). Also, believe me, I was trying all sorts of addresses in Adobe's 
input field:

http://www.mydomain.com/mywebapp
http://mydomain.com/mywebapp
http://mydomain.com:80/mywebapp
http://host3.mydomain.com/mywebapp
http://host3.mydomain.com:80/mywebapp
http://xx.xxx.xxx.xxx/mywebapp
etc.

practically every permutation I could think of, all with the same result. 



Each of these permutations above can have the effect of landing upon a different 
VirtualHost, depending on how /exactly/ your Apache configuration is put together (and 
your DNS).
The way you showed earlier, there seemed to be a mixture of IP-based VirtualHost's and 
name-based VirtualHost's, each one group with its own default VirtualHost.

Since we never saw the whole configuration, it is difficult to tell what 
happened exactly.
We don't even know if the Adobe thing is sending proper HTTP 1.1 requests, with a correct 
Host: header.


What Rainer told you to do, essentially has the effect that all JkMount/JkUnmount 
directives are centralised (or defaulted) in the part of the Apache configuration that 
is outside of all VirtualHost sections.  Along with the JkMountCopy All, this causes 
all these JkMount/JkUnmount to be copied to (or inherited by) /all/ the VirtualHosts 
(including the default one(s)).


So this way, we are sure that no matter which VirtualHost is actually processing the Adobe 
request, the appropriate JkMount is there for /mywebapp.
In other words, no matter if the Adobe app sends a correct HTTP 1.1 request with the 
correct Host: header, as long as it does connect to an IP address of your server on port 
80, the request will encounter a VirtualHost which knows how to proxy /mywebapp to Tomcat.
This makes it work, but of course it also hides any defect of the Adobe thingy's 
request, if any.


It also means that whichever (valid) hostname is used for a request to /mywebapp, it 
will work and end up in Tomcat's mywebapp.  This may be what you want, or it may not.




Also interesting is the tcpdump I send out earlier reports two cksum INCORRECTs 
when Adobe accesses port 80 (without Rainer's fix). No idea what's going on 
there.

Those are transmission errors at the TCP level. That packet should be repeated then 
automatically, and this should not play a role here.


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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread modjklist
Thanks Andre, 

I'd still be interested is there's a way to have mod_jk only check for traffic 
coming into mydomain.com for folder /mywebapp. I think the current solution 
checks all domains, such as mydomain2.com and mydomain3.com, etc., for a map to 
mydomain.com/mywebapp. 

Couldn't I just have all those JkMounts defined globally, then within the 
VirtualHost tags for mydomain.com, include a JkMountCopy On? But that didn't 
work for me so I must be approaching this wrong.

- Original Message - 
From: André Warnier a...@ice-sa.com 
To: Tomcat Users List users@tomcat.apache.org 
Sent: Thursday, February 16, 2012 11:41:25 AM 
Subject: Re: mod_jk doesn't map to software-generated web address, but maps to 
this address when I enter it into browser 

modjkl...@comcast.net wrote: 
 Hi Andre, yes I see your point (Rainer's solution would solve that too I 
 suppose). Also, believe me, I was trying all sorts of addresses in Adobe's 
 input field: 
 
 http://www.mydomain.com/mywebapp 
 http://mydomain.com/mywebapp 
 http://mydomain.com:80/mywebapp 
 http://host3.mydomain.com/mywebapp 
 http://host3.mydomain.com:80/mywebapp 
 http://xx.xxx.xxx.xxx/mywebapp 
 etc. 
 
 practically every permutation I could think of, all with the same result. 
 

Each of these permutations above can have the effect of landing upon a 
different 
VirtualHost, depending on how /exactly/ your Apache configuration is put 
together (and 
your DNS). 
The way you showed earlier, there seemed to be a mixture of IP-based 
VirtualHost's and 
name-based VirtualHost's, each one group with its own default VirtualHost. 
Since we never saw the whole configuration, it is difficult to tell what 
happened exactly. 
We don't even know if the Adobe thing is sending proper HTTP 1.1 requests, with 
a correct 
Host: header. 

What Rainer told you to do, essentially has the effect that all 
JkMount/JkUnmount 
directives are centralised (or defaulted) in the part of the Apache 
configuration that 
is outside of all VirtualHost sections. Along with the JkMountCopy All, 
this causes 
all these JkMount/JkUnmount to be copied to (or inherited by) /all/ the 
VirtualHosts 
(including the default one(s)). 

So this way, we are sure that no matter which VirtualHost is actually 
processing the Adobe 
request, the appropriate JkMount is there for /mywebapp. 
In other words, no matter if the Adobe app sends a correct HTTP 1.1 request 
with the 
correct Host: header, as long as it does connect to an IP address of your 
server on port 
80, the request will encounter a VirtualHost which knows how to proxy 
/mywebapp to Tomcat. 
This makes it work, but of course it also hides any defect of the Adobe 
thingy's 
request, if any. 

It also means that whichever (valid) hostname is used for a request to 
/mywebapp, it 
will work and end up in Tomcat's mywebapp. This may be what you want, or it 
may not. 


 Also interesting is the tcpdump I send out earlier reports two cksum 
 INCORRECTs when Adobe accesses port 80 (without Rainer's fix). No idea what's 
 going on there. 
 
Those are transmission errors at the TCP level. That packet should be repeated 
then 
automatically, and this should not play a role here. 

- 
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: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

modjkl...@comcast.net wrote:
Thanks Andre, 

I'd still be interested is there's a way to have mod_jk only check for traffic coming into mydomain.com for folder /mywebapp. I think the current solution checks all domains, such as mydomain2.com and mydomain3.com, etc., for a map to mydomain.com/mywebapp. 


Couldn't I just have all those JkMounts defined globally, then within the VirtualHost 
tags for mydomain.com, include a JkMountCopy On? But that didn't work for me 
so I must be approaching this wrong.



Yes, you should be able to do that.  But it then again depends on whether the Adobe thing 
is really sending the request in the proper way.  Which right now we don't know, but which 
you may be able to verify using your packet dump.
If it does not send the requests properly, then you will end up with the same problem as 
before : requests not ending up in the VirtualHost which you expect, and this unexpected 
VirtualHost knowing nothing about a mapping for /mywebapp.


A correct request should have at least 2 lines such as

line 1 :
GET /mywebapp/... HTTP/1.1(could also be POST instead of GET)
then:
.. (any number of header lines, 0-n)
then:
Host: the.correct.hostname
.. (any number of header lines, 0-n)
..an empty line (CR/LF)

In the first GET or POST line, after the GET or POST it should start with /mywebapp, 
without any other prefix.

In the Host: line, there should be the hostname which you expect.
If this is not the case, then something is wrong in the Adobe client.

If the Adobe client sends proper requests, then you can try :

- remove the JkMountCopy All from you main configuration
- move each JkMount line inside the VirtualHost where it should take effect (copying 
them to several VirtualHost's if that is what you want)

- define your VirtualHost's as follows :

In the main configuration part :

Listen 80
...
NameVirtualHost *:80  # (1)
...

VirtualHost *:80# (must match (1) exactly)
  Servername localhost
  D0ocumentRoot /something/harmless
/VirtualHost

VirtualHost *:80# (must match (1) exactly)
  Servername host.mydomain.com
.. JkMount's for this VirtualHost
/VirtualHost

etc..

This way :
- there are only name-based VirtualHost's
- the first one is the default host, used when a request comes in which does not match 
any ServerName (for example requests sent by devious robots looking for /phpmyadmin and 
the like)
- the others will be used each by requests whose Host: header exactly match their 
ServerName or ServerAlias


But again, check the Adobe requests first, otherwise you could get in trouble 
again.

Variation :
If it turns out that most of your JkMount's do need to be copied into most of your 
VirtualHosts, then

- still remove the JkMountCopy All
- leave the common JkMount's in the main config part
- put a JkMountCopy On in each VirtualHost that should get a copy of these 
common ones
- add the specific JkMount's to each VirtualHost



- Original Message - 
From: André Warnier a...@ice-sa.com 
To: Tomcat Users List users@tomcat.apache.org 
Sent: Thursday, February 16, 2012 11:41:25 AM 
Subject: Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser 

modjkl...@comcast.net wrote: 
Hi Andre, yes I see your point (Rainer's solution would solve that too I suppose). Also, believe me, I was trying all sorts of addresses in Adobe's input field: 

http://www.mydomain.com/mywebapp 
http://mydomain.com/mywebapp 
http://mydomain.com:80/mywebapp 
http://host3.mydomain.com/mywebapp 
http://host3.mydomain.com:80/mywebapp 
http://xx.xxx.xxx.xxx/mywebapp 
etc. 

practically every permutation I could think of, all with the same result. 



Each of these permutations above can have the effect of landing upon a different 
VirtualHost, depending on how /exactly/ your Apache configuration is put together (and 
your DNS). 
The way you showed earlier, there seemed to be a mixture of IP-based VirtualHost's and 
name-based VirtualHost's, each one group with its own default VirtualHost. 
Since we never saw the whole configuration, it is difficult to tell what happened exactly. 
We don't even know if the Adobe thing is sending proper HTTP 1.1 requests, with a correct 
Host: header. 

What Rainer told you to do, essentially has the effect that all JkMount/JkUnmount 
directives are centralised (or defaulted) in the part of the Apache configuration that 
is outside of all VirtualHost sections. Along with the JkMountCopy All, this causes 
all these JkMount/JkUnmount to be copied to (or inherited by) /all/ the VirtualHosts 
(including the default one(s)). 

So this way, we are sure that no matter which VirtualHost is actually processing the Adobe 
request, the appropriate JkMount is there for /mywebapp. 
In other words, no matter if the Adobe app sends a correct HTTP 1.1 request with the 
correct Host: header, as long as it does connect to an IP address of your server on port 
80, the request will encounter a 

Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread Rainer Jung

On 16.02.2012 21:24, André Warnier wrote:

modjkl...@comcast.net wrote:

Thanks Andre,
I'd still be interested is there's a way to have mod_jk only check for
traffic coming into mydomain.com for folder /mywebapp. I think the
current solution checks all domains, such as mydomain2.com and
mydomain3.com, etc., for a map to mydomain.com/mywebapp.
Couldn't I just have all those JkMounts defined globally, then within
the VirtualHost tags for mydomain.com, include a JkMountCopy On? But
that didn't work for me so I must be approaching this wrong.



Yes, you should be able to do that. But it then again depends on whether
the Adobe thing is really sending the request in the proper way. Which
right now we don't know, but which you may be able to verify using your
packet dump.
If it does not send the requests properly, then you will end up with the
same problem as before : requests not ending up in the VirtualHost
which you expect, and this unexpected VirtualHost knowing nothing about
a mapping for /mywebapp.

A correct request should have at least 2 lines such as

line 1 :
GET /mywebapp/... HTTP/1.1 (could also be POST instead of GET)
then:
.. (any number of header lines, 0-n)
then:
Host: the.correct.hostname
.. (any number of header lines, 0-n)
..an empty line (CR/LF)

In the first GET or POST line, after the GET or POST it should start
with /mywebapp, without any other prefix.
In the Host: line, there should be the hostname which you expect.
If this is not the case, then something is wrong in the Adobe client.

If the Adobe client sends proper requests, then you can try :

- remove the JkMountCopy All from you main configuration
- move each JkMount line inside the VirtualHost where it should take
effect (copying them to several VirtualHost's if that is what you want)
- define your VirtualHost's as follows :

In the main configuration part :

Listen 80
...
NameVirtualHost *:80 # (1)
...

VirtualHost *:80 # (must match (1) exactly)
Servername localhost
D0ocumentRoot /something/harmless
/VirtualHost

VirtualHost *:80 # (must match (1) exactly)
Servername host.mydomain.com
.. JkMount's for this VirtualHost
/VirtualHost

etc..

This way :
- there are only name-based VirtualHost's
- the first one is the default host, used when a request comes in
which does not match any ServerName (for example requests sent by
devious robots looking for /phpmyadmin and the like)
- the others will be used each by requests whose Host: header exactly
match their ServerName or ServerAlias

But again, check the Adobe requests first, otherwise you could get in
trouble again.

Variation :
If it turns out that most of your JkMount's do need to be copied into
most of your VirtualHosts, then
- still remove the JkMountCopy All
- leave the common JkMount's in the main config part
- put a JkMountCopy On in each VirtualHost that should get a copy of
these common ones
- add the specific JkMount's to each VirtualHost


IMHO the main problem is, that the OP hasn't yet seen all VHosts defined 
in the Apache configuration. I'm pretty sure, that there is more than 
one VHost, maybe via included config files.


The request that originally didn't work went to some other VirtualHost 
element, the one that worked went to the expected VirtualHost. If the OP 
wants to clean it up, he needs to carefully check the complete 
configuration for additional/unwanted VirtualHosts.


If he wants to find out, which VirtualHost actually handles a request, 
the one Customlog per VirtualHost trick is an easy way to check.


Regards,

Rainer

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



RE: Cores with FlushableGzipOutputStream

2012-02-16 Thread Allen Reese


 -Original Message-
 From: Allen Reese [mailto:are...@yahoo-inc.com]
 Sent: Thursday, February 09, 2012 1:28 PM
 To: Tomcat Users List
 Cc: Lars Anderson
 Subject: RE: Cores with FlushableGzipOutputStream
 
 
 
  -Original Message-
  From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
  Sent: Thursday, February 09, 2012 1:00 PM
  To: Tomcat Users List
  Subject: Re: Cores with FlushableGzipOutputStream
 
  2012/2/10 Allen Reese are...@yahoo-inc.com:
   Try again now that I'm subscribed.
  
  
   -Original Message-
   From: Allen Reese
   Sent: Thursday, February 09, 2012 12:03 PM
   To: 'users@tomcat.apache.org'
   Cc: Lars Anderson
   Subject: Cores with FlushableGzipOutputStream
  
   We've just upgraded from tomcat 6.0.33 to 6.0.35 and started
 having
   the JVM core on our production boxes.
  
   I'm trying to determine what the next course of action should be
  here.
   I have an Oracle Support contract, but they don't seem to see this
  as
   a JVM issue, and blame it on a native lib.
  
  
   Thanks.
  
   Allen Reese
   Core Platforms
   Yahoo!, Inc.
  
   Running on linux x86-64, jdk 6u27, 6u29, 6u30, 7u2
  
   We run several tests and the output is:
  
   Jdk   | Version       | flags
         |
   6u30  | 6.0.33        | compression enabled
         | works
   6u30  | 6.0.35        | compression enabled
         | cores
   6u30  | 6.0.35        | compression disabled
         | works
   6u30  | 6.0.35        | Remove changes to
 FlushableGzipOutputStream
   [1]
         | works
   6u30  | 6.0.35    | -Dsun.zip.disableMemoryMapping=true
         | cores
  
   7u2   | 6.0.35        | compression enabled
         | cores
   7u2   | 6.0.35        | compression disabled
         |
   7u2   | 6.0.35        | Remove changes to
 FlushableGzipOutputStream
   [1]
         |
   7u2   | 6.0.35    | -Dsun.zip.disableMemoryMapping=true
         | cores
  
   https://issues.apache.org/bugzilla/show_bug.cgi?id=52121
  
   I filed an SR with Oracle, as this looks like a JVM bug and got
 the
   following response:
  
   Generic Note
   
   Hi Allen,
  
   Thank you for sending the hotspot error logs (hs_err_pidpid).
   Each one of them has verbiage that indicates the problem is not
   with
  Java,
   but with native code:
  
   # Problematic frame:
   # C [libzip.so+0x77e3] char+0xa3
   #
   # If you would like to submit a bug report, please visit:
   # http://java.sun.com/webapps/bugreport/crash.jsp
   # The crash happened outside the Java Virtual Machine in native
  code.
   # See problematic frame for where to report the bug.
   #
  
   The case description also noted:
  
   Rolling back this patch to tomcat increases stability:
   http://svn.apache.org/viewvc?view=revisionrevision=1197382
  
   Again, this points to software other than Java. The Java defect
   mentioned, 4813885, was fixed in June of 2009.
   =
  
   Allen Reese
   Core Platforms
   Yahoo!, Inc.
  
   [1]: Patch to remove changes to FlushableGZIPOutputStream from
  6.0.35.
  
  (...)
  
 
  Hi!
 
  If you revert r1197382 you will be facing BZ 52121 [1].
 
 
  Overall, BZ 52121 itself was about a bug in Deflater implementation
 in
  JRE. The difference is that I tried to make the new implementation as
  safe as possible,  making sure that Deflater.setLevel() calls do not
  occur in a row, but there is some data between them.
 
  Either way Deflater API does not have such limitation on the use of
  setLevel(), so the root cause of BZ 52121 is a JRE bug.
 
 
  I think that the current code is safe and you hitting a different
  issue. Your better stability is likely a luck caused by a different
  state of Deflater thanks to different implementation at Tomcat side.
 
  Maybe you have some web resource that consistently produces a
 response
  that triggers this issue.
 
  From experience of BZ 52121 we were lucky that someone was able to
  provide sample data that reproduced the issue.  It looks that
  originally it was some product listing generated by JSP page. Maybe
  you can find something similar.
 
  That data is now part of Tomcat testsuite (see
  TestFlushableGZIPOutputStream class).  Note that the reproducer is
  rather simple and does not use Tomcat, but just the streams I/O.
 
 
  Anyway, a JRE should not fail fatally with a core dump regardless of
  what public API the program uses.
 Thanks.  This is what I was after, I'm going to put this thread in my
 SR with Oracle along with Mark's reply.
 
 I'll see if we can get the data that triggers it, it's a high volume
 system and the cores come after about 3 to 4 hours.

I'm looking at this again, and I'm trying do determine how to enhance the test 
case [2] to reproduce what I'm seeing. 

My question is, I have all of the data in pcap format, so I can extract the 
chunks, what is the best way to feed this through.
Do I decompress it all and write it all at once through the stream?
Or is this going to matter based on 

Re: Cores with FlushableGzipOutputStream

2012-02-16 Thread Mark Thomas
On 16/02/2012 20:45, Allen Reese wrote:
 My question is, I have all of the data in pcap format, so I can extract the 
 chunks, what is the best way to feed this through.
 Do I decompress it all and write it all at once through the stream?
 Or is this going to matter based on what order the chunks got written in.

Based on the work we did on the previous JVM bug that we worked around,
you'll need to flush at the correct point. I would start by recreating
exactly what you see in the network trace and then start to merge chunks
to simplify as far as you can.

Mark

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



RE: Cores with FlushableGzipOutputStream

2012-02-16 Thread Allen Reese


 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Thursday, February 16, 2012 12:50 PM
 To: Tomcat Users List
 Subject: Re: Cores with FlushableGzipOutputStream
 
 On 16/02/2012 20:45, Allen Reese wrote:
  My question is, I have all of the data in pcap format, so I can
 extract the chunks, what is the best way to feed this through.
  Do I decompress it all and write it all at once through the stream?
  Or is this going to matter based on what order the chunks got written
 in.
 
 Based on the work we did on the previous JVM bug that we worked around,
 you'll need to flush at the correct point. I would start by recreating
 exactly what you see in the network trace and then start to merge
 chunks to simplify as far as you can.

That's what I was afraid of.  It looks like it's gzipped and then chunked.  I 
guess I need to extract each chunk and try flushing that.

--Allen

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


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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread André Warnier

Just one more thing, then I'm going to bed..

modjkl...@comcast.net wrote:
Thanks Andre, 


I'd still be interested is there's a way to have mod_jk only check for traffic 
coming into mydomain.com for folder /mywebapp. I think the current solution 
checks all domains, such as mydomain2.com and mydomain3.com, etc., for a map to 
mydomain.com/mywebapp.


That is not really how it works, and it is easier to understand if you get the 
basics right.

a) a request comes to the server, and it looks like this :

GET /mywebapp HTTP/1.1
Host: host1.mydomain.com
(plus any number of additional lines)

b) the server looks for the Host: line, and picks up the hostname of the virtual 
server that this request is addressed to.

If it does not find such a Host: line, then this hostname is empty (or 
undefined)

c) Now the server compares this hostname, one by one with each of the VirtualHost 
sections' ServerName and ServerAlias directives.

If it finds an exact match, then it selects this VirtualHost to handle that 
request.
If it does not find a match, then it selects the first defined VirtualHost section to 
handle that request (that is a convention in Apache, that the first VirtualHost defined, 
from top to bottom of the httpd.conf, is the default host; in Tomcat, it is different).


d) Now the server switches its own configuration, to the one defined by the selected 
VirtualHost section.  That is, the server takes the personality of that selected 
VirtualHost.
(So in the case at hand, the Apache server now only knows the JkMount's applicable to 
this VirtualHost, and forgets all the others).


e) Next, Apache passes the request URL to mod_jk, and asks mod_jk it it wants to process 
this request.  mod_jk looks into its URL-mapping table (the one for this VirtualHost) and 
decides if it wants to process this request or not.
If yes, it tells Apache yes, I want to process this request later, and Apache writes 
that down.
If not, mod_jk tells Apache no, I don't want this one. Then Apache will ask another 
module if it wants to process that request.


f) Apache does a number of other things to that request, and then passes it to the module 
that has indicated (see (e)) that it wanted to process this request.
If that was mod_jk, then mod_jk gets the request, passes it to Tomcat, receives Tomcat's 
response, and returns this response to Apache.


g) Apache returns the response to the client, logs the request into the logs, 
cleans up etc..

h) Apache is ready to receive and process another request.

So, it is not mod_jk at all who decides if he processes requests for host1 or 
host2 etc..
That decision is taken by Apache, before it even passes the request URL to 
mod_jk.
When mod_jk receives the request URL (if it receives it), the VirtualHost has already been 
chosen, and mod_jk uses the URL-mapping table /of that VirtualHost/ to decide if it wants 
to pass this request to Tomcat or not.


Does that make it clearer why it is very important that the Adobe client specifies the 
correct Host: in his requests ?


That is also why in the JkMount directives, there is never a hostname 
specified, only URLs.

Is it clearer that way ?


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



generic deployment question

2012-02-16 Thread Jeffrey Janner
Assume latest Tomcat 6.x for current deployment, and 7.x for future deployments.

I host an app for a couple of dozen customers.  Naturally, upgrade time can be 
a bit of a pain, and I'd like to simplify things.
Assuming that all the customer-specific information (DB connection info, logger 
info, etc.) can be described as resources in the context.xml file, would it be 
possible to put the actual webapp in a single pre-exploded directory without 
causing Tomcat fits?

Example directory tree:

Web-app-1.1
Images
   META-INF
   JSPs
  WEB-INF  (with generic web.xml for web-app-1.1)
 lib
 classes

ROOT.xml:
?xml version=1.0 encoding=UTF-8?
Context path=
 docBase=path/to/Web-app-1.1
  Valve className=org.apache.catalina.authenticator.SSLAuthenticator
securePagesWithPragma=false /
  resources definitions /
/Context


Then when a new release comes out, I can deploy the web-app once and modify the 
individual customer's contexts to point to the new release path as they choose 
upgrade (or all at once).

And, yes, I know that disk is cheap and I could just do it by replacing 3-4 
dozen war files nearly as easily.  And right now, I'm not sure if the future 
7.x versioning feature will come in handy as our dev staff haven't started 
investigating 7.x yet.
Jeff
__

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

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


Re: generic deployment question

2012-02-16 Thread André Warnier

Jeffrey Janner wrote:

Assume latest Tomcat 6.x for current deployment, and 7.x for future deployments.

I host an app for a couple of dozen customers.  Naturally, upgrade time can be 
a bit of a pain,


why ?

 and I'd like to simplify things.

Assuming that all the customer-specific information (DB connection info, logger 
info, etc.) can be described as resources in the context.xml file, would it be 
possible to put the actual webapp in a single pre-exploded directory without 
causing Tomcat fits?



It seems to me that there is a logical problem : if you have only 1 webapp, then you also 
only have one context.xml.  So how are you going to specify per-customer specific 
configurations ?
And even if you do, how will you distinguish a request from one customer from a request 
from another customer, and use this information to select the appropriate resource 
definition ?


Personally, I tend to think that you are going to trade an small inconvenient (having to 
update 24 war files), against a vast complication of your application and setup.
And lose a lot of flexibility too, like if ever one customer wanted this thing just a 
little differently..


I am told that there are tools to automate such a multiple deployment, so that you would 
only have to give a command once, and it would deploy the same application to 24 locations.


That was just my 0.02€.

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



Re: mod_jk doesn't map to software-generated web address, but maps to this address when I enter it into browser

2012-02-16 Thread modjklist
Thanks so much Andre for taking the time to help me understand this. It's VERY 
helpful! I've attached the section of httpd.conf below related to virtual 
hosts. I think I'm starting to get the picture now. 

Whatever I input into Adobe's software, I ALWAYS see in the mod_jk.log file the 
hostname: host3.mydomain.com. Based on your description below, Apache webserver 
would select the first virtual host associated with that name. In this case, 
the first VirtualHost section below would not match (since xx.xxx.xxx.196 does 
not match host3.mydomain.com). But I'm guessing the 2nd VirtualHost section 
below DOES match (since I interpret * to match anything). 

However, I was intending the 3rd VirtualHost section below (e.g. VirtualHost 
xx.xxx.xxx.196:80 to match the hostname used by Adobe (this where I originally 
had the JkMounts located) since it had the alias host3.mydomain.com. But you're 
right, Apache would have assigned it to the other VirtualHost before it even 
reached this point. This should explain why the Global JkMounts worked as they 
did.

One question: where we define NameVirtualHost below, is it better to use *:80 
instead of xx.xxx.xxx.196:80? The server has 2 IP addresses associated with it, 
although I *think* only 1 is used in practice. 

snippet from httpd.conf showing virtual-host related items-
PidFile logs/httpd.pid
LockFile logs/accept.lock
Listen 0.0.0.0:80
User nobody
Group nobody
ExtendedStatus On
ServerAdmin webmas...@webcompany.net
ServerName host3.mydomain.com
LogLevel warn
Timeout 300
ServerSignature On

NameVirtualHost xx.xxx.xxx.196:80
NameVirtualHost *

VirtualHost xx.xxx.xxx.196:80
ServerName host3.mydomain.com
DocumentRoot /usr/local/apache/htdocs
ServerAdmin webmas...@webcompany.net
IfModule mod_suphp.c
suPHP_UserGroup nobody nobody
/IfModule
/VirtualHost

# Default vhost for unbound IPs

VirtualHost *
ServerName host3.mydomain.com
DocumentRoot /usr/local/apache/htdocs
ServerAdmin webmas...@webcompany.net
IfModule mod_suphp.c
suPHP_UserGroup nobody nobody
/IfModule
/VirtualHost

VirtualHost xx.xxx.xxx.196:80
ServerName mydomain.com
ServerAlias www.mydomain.com host3.mydomain.com
DocumentRoot /home/gkk/public_html
ServerAdmin webmas...@webcompany.net
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/mydomain.com combined
CustomLog /usr/local/apache/domlogs/mydomain-bytes_log %{%s}t %I .\n%{%s}t 
%O .
## User gkk # Needed for Cpanel::ApacheConf
IfModule mod_suphp.c
suPHP_UserGroup gkk gkk
/IfModule
IfModule concurrent_php.c
php4_admin_value open_basedir 
/home/gkk:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp
 
php5_admin_value open_basedir 
/home/gkk:/usr/lib/php:/usr/local/lib/php:/tmp
/IfModule
IfModule !concurrent_php.c
IfModule mod_php4.c
php_admin_value open_basedir 
/home/gkk:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/
 
mp
/IfModule
IfModule mod_php5.c
php_admin_value open_basedir 
/home/gkk:/usr/lib/php:/usr/local/lib/php:/tmp
/IfModule
IfModule sapi_apache2.c
php_admin_value open_basedir 
/home/gkk:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/t
mp
/IfModule
/IfModule
IfModule !mod_disable_suexec.c
SuexecUserGroup gkk gkk
/IfModule
ScriptAlias /cgi-bin/ /home/gkk/public_html/cgi-bin/

Include /usr/local/apache/conf/userdata/*.conf  
Include /usr/local/apache/conf/userdata/*.owner-root 
Include /usr/local/apache/conf/userdata/std/*.conf 
Include /usr/local/apache/conf/userdata/std/*.owner-root 
Include /usr/local/apache/conf/userdata/std/2/*.conf 
Include /usr/local/apache/conf/userdata/std/2/*.owner-root 
Include /usr/local/apache/conf/userdata/std/2/gkk/*.conf  
Include /usr/local/apache/conf/userdata/std/2/gkk/mydomain.com/*.conf

/VirtualHost

VirtualHost xx.xxx.xxx.196:80
ServerName myotherdomain.com
ServerAlias www.myotherdomain.com
DocumentRoot /home/gkk2/public_html
ServerAdmin webmas...@webcompany.net
UseCanonicalName Off
CustomLog /usr/local/apache/domlogs/myotherdomain.com combined
CustomLog /usr/local/apache/domlogs/myotherdomain.com-bytes_log %{%s}t %I 
.\n%{%s}t %O .
## User gkk2 # Needed for Cpanel::ApacheConf
IfModule mod_suphp.c
suPHP_UserGroup gkk2 gkk2
/IfModule
IfModule concurrent_php.c
php4_admin_value open_basedir 
/home/gkk2:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/
tmp
php5_admin_value open_basedir 
/home/gkk2:/usr/lib/php:/usr/local/lib/php:/tmp
/IfModule
IfModule !concurrent_php.c
IfModule mod_php4.c
php_admin_value open_basedir 
/home/gkk2:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/ph
p:/tmp

Free Memory vs. Total Memory vs. Max Memory

2012-02-16 Thread Robinson, Eric
What are the possible downsides of setting a low initial memory pool and
a high max pool? If a tomcat app usually needs approximately 64MB of
heap space, but sometimes as much as 300-400MB, would it cause any
problems to set the initial pool to 16M and the max pool to 512M?
 

--
Eric


 


Disclaimer - February 16, 2012 
This email and any files transmitted with it are confidential and intended 
solely for Tomcat Users List. If you are not the named addressee you should not 
disseminate, distribute, copy or alter this email. Any views or opinions 
presented in this email are solely those of the author and might not represent 
those of Physicians' Managed Care or Physician Select Management. Warning: 
Although Physicians' Managed Care or Physician Select Management has taken 
reasonable precautions to ensure no viruses are present in this email, the 
company cannot accept responsibility for any loss or damage arising from the 
use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/