You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jatinder singh <it...@gmail.com> on 2011/05/10 15:28:45 UTC

Need Help to configure Apache Tomcat with mod_jk.so

Hi
I have configured Apache and Tomcat with SSL.
I want to Integrate both using mod_jk.so, for that i have followed all the
instruction but when i start Apache i got the message - The requested
operation has failed.

My httpd.conf file is

<IfModule !mod_jk.c>
    LoadModule    jk_module  modules/mod_jk.so
</IfModule>

JkWorkersFile C:/Program Files/Apache Software
Foundation/Apache2.2/conf/jk/workers.properties
JkLogFile C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk.log
JkLogLevel info
JkLogStampFormat “[%a %b %d %H:%M:%S %Y]“
JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories
JkRequestLogFormat “%w %V %T”
JkMount /examples* worker1




# Should mod_jk send SSL information to Tomcat (default is On)
JkExtractSSL On
# What is the indicator for SSL (default is HTTPS)
JkHTTPSIndicator HTTPS
# What is the indicator for SSL session (default is SSL_SESSION_ID)
JkSESSIONIndicator SSL_SESSION_ID
# What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
JkCIPHERIndicator SSL_CIPHER
# What is the indicator for the client SSL certificated (default is
SSL_CLIENT_CERT)
JkCERTSIndicator SSL_CLIENT_CERT

My workers.properties file is
workers.tomcat_home="C:/Program Files/Apache Software Foundation/Tomcat 6.0"
workers.java_home="C:/Program Files/Java/jdk1.6.0_13"
ps=/
# Define worker 'worker1'
worker.list=worker1
# Set properties for worker 'example' (ajp13)
worker.default.type=ajp13
worker.default.host=localhost
worker.default.port=8009
worker.default.cachesize=10
worker.default.cache_timeout=600
worker.default.socket_keepalive=1
worker.default.recycle_timeout=300
worker.default.lbfactor=1

I have also changed Tomcat server.xml file
<Connector     port="8009"
                protocol="AJP/1.3"
                redirectPort="8443"
                enableLookups="false"
                request.tomcatAuthentication="false"
                address="127.0.0.2"
                scheme="https" secure="true"/>

<Listener className="org.apache.jk.config.ApacheConfig"
            workersConfig="C:/Program Files/Apache Software
Foundation/Apache2.2/conf/jk/workers.properties"
            mod_Jk ="C:/Program Files/Apache Software
Foundation/Apache2.2/modules/mod_jk.so"
            jkLog="C:/Program Files/Apache Software
Foundation/Apache2.2/logs/jk.log"
            jkDebug="info" noRoot="false"/>

both in Server tag and in Engine tag.

and my httpd-ssl.conf file is

SSLOptions +StdEnvVars +ExportCertData
JkMount /examples* worker1


So please help me what is wrong with this.

Thanks
Jatinder

Re: Need Help to configure Apache Tomcat with mod_jk.so

Posted by jatinder singh <it...@gmail.com>.
error.log shows

[Tue May 10 21:11:00 2011] [warn] RSA server certificate CommonName (CN) `
www.abc.com' does NOT match server name!?
[Tue May 10 21:11:00 2011] [warn] pid file C:/Program Files/Apache Software
Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of
previous Apache run?
[Tue May 10 21:11:00 2011] [warn] RSA server certificate CommonName (CN) `
www.abc.com' does NOT match server name!?
[Tue May 10 21:11:00 2011] [notice] Apache/2.2.17 (Win32) mod_ssl/2.2.17
OpenSSL/0.9.8o configured -- resuming normal operations
[Tue May 10 21:11:00 2011] [notice] Server built: Oct 18 2010 01:58:12
[Tue May 10 21:11:00 2011] [notice] Parent: Created child process 2420
[Tue May 10 21:11:00 2011] [warn] RSA server certificate CommonName (CN) `
www.abc.com' does NOT match server name!?
[Tue May 10 21:11:00 2011] [warn] RSA server certificate CommonName (CN) `
www.abc.com' does NOT match server name!?
[Tue May 10 21:11:00 2011] [notice] Child 2420: Child process is running
[Tue May 10 21:11:00 2011] [notice] Child 2420: Acquired the start mutex.
[Tue May 10 21:11:00 2011] [notice] Child 2420: Starting 64 worker threads.
[Tue May 10 21:11:00 2011] [notice] Child 2420: Starting thread to listen on
port 1443.
[Tue May 10 21:11:02 2011] [notice] Parent: Received shutdown signal --
Shutting down the server.
[Tue May 10 21:11:02 2011] [notice] Child 2420: Exit event signaled. Child
process is ending.
[Tue May 10 21:11:03 2011] [notice] Child 2420: Released the start mutex
[Tue May 10 21:11:04 2011] [notice] Child 2420: All worker threads have
exited.
[Tue May 10 21:11:04 2011] [notice] Child 2420: Child process is exiting
[Tue May 10 21:11:04 2011] [notice] Parent: Child process exited
successfully.



On Tue, May 10, 2011 at 9:32 PM, Mark Thomas <ma...@apache.org> wrote:

> On 10/05/2011 16:52, jatinder singh wrote:
> > No sir its still not working. Apache gives me same error.
> >
> > Anything you want me to change in any file.
>
> Have you looked in the error log?
>
> Mark
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Need Help to configure Apache Tomcat with mod_jk.so

Posted by Mark Thomas <ma...@apache.org>.
On 10/05/2011 16:52, jatinder singh wrote:
> No sir its still not working. Apache gives me same error.
> 
> Anything you want me to change in any file.

Have you looked in the error log?

Mark



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


Re: Need Help to configure Apache Tomcat with mod_jk.so

Posted by jatinder singh <it...@gmail.com>.
No sir its still not working. Apache gives me same error.

Anything you want me to change in any file.

Thanks
Jatinder

On Tue, May 10, 2011 at 9:02 PM, János Löbb <ja...@yale.edu> wrote:

>
> On May 10, 2011, at 9:28 AM, jatinder singh wrote:
>
> > Hi
> > I have configured Apache and Tomcat with SSL.
> > I want to Integrate both using mod_jk.so, for that i have followed all
> the
> > instruction but when i start Apache i got the message - The requested
> > operation has failed.
> >
> > My httpd.conf file is
> >
> > <IfModule !mod_jk.c>
> >    LoadModule    jk_module  modules/mod_jk.so
> > </IfModule>
> >
> > JkWorkersFile C:/Program Files/Apache Software
> > Foundation/Apache2.2/conf/jk/workers.properties
> You need quotes above and below.
> > JkLogFile C:/Program Files/Apache Software
> Foundation/Apache2.2/logs/jk.log
> > JkLogLevel info
> > JkLogStampFormat “[%a %b %d %H:%M:%S %Y]“
> > JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories
> > JkRequestLogFormat “%w %V %T”
> > JkMount /examples* worker1
> >
> >
> >
> >
> > # Should mod_jk send SSL information to Tomcat (default is On)
> > JkExtractSSL On
> > # What is the indicator for SSL (default is HTTPS)
> > JkHTTPSIndicator HTTPS
> > # What is the indicator for SSL session (default is SSL_SESSION_ID)
> > JkSESSIONIndicator SSL_SESSION_ID
> > # What is the indicator for client SSL cipher suit (default is
> SSL_CIPHER)
> > JkCIPHERIndicator SSL_CIPHER
> > # What is the indicator for the client SSL certificated (default is
> > SSL_CLIENT_CERT)
> > JkCERTSIndicator SSL_CLIENT_CERT
> >
> > My workers.properties file is
> > workers.tomcat_home="C:/Program Files/Apache Software Foundation/Tomcat
> 6.0"
> > workers.java_home="C:/Program Files/Java/jdk1.6.0_13"
> > ps=/
> > # Define worker 'worker1'
> > worker.list=worker1
> > # Set properties for worker 'example' (ajp13)
> > worker.default.type=ajp13
> > worker.default.host=localhost
> > worker.default.port=8009
> > worker.default.cachesize=10
> > worker.default.cache_timeout=600
> > worker.default.socket_keepalive=1
> > worker.default.recycle_timeout=300
> > worker.default.lbfactor=1
> >
> > I have also changed Tomcat server.xml file
> > <Connector     port="8009"
> >                protocol="AJP/1.3"
> >                redirectPort="8443"
> >                enableLookups="false"
> >                request.tomcatAuthentication="false"
> >                address="127.0.0.2"
> >                scheme="https" secure="true"/>
> >
> > <Listener className="org.apache.jk.config.ApacheConfig"
> >            workersConfig="C:/Program Files/Apache Software
> > Foundation/Apache2.2/conf/jk/workers.properties"
> >            mod_Jk ="C:/Program Files/Apache Software
> > Foundation/Apache2.2/modules/mod_jk.so"
> >            jkLog="C:/Program Files/Apache Software
> > Foundation/Apache2.2/logs/jk.log"
> >            jkDebug="info" noRoot="false"/>
> >
> > both in Server tag and in Engine tag.
> >
> > and my httpd-ssl.conf file is
> >
> > SSLOptions +StdEnvVars +ExportCertData
> > JkMount /examples* worker1
> >
> >
> > So please help me what is wrong with this.
> >
> > Thanks
> > Jatinder
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Need Help to configure Apache Tomcat with mod_jk.so

Posted by János Löbb <ja...@yale.edu>.
On May 10, 2011, at 9:28 AM, jatinder singh wrote:

> Hi
> I have configured Apache and Tomcat with SSL.
> I want to Integrate both using mod_jk.so, for that i have followed all the
> instruction but when i start Apache i got the message - The requested
> operation has failed.
> 
> My httpd.conf file is
> 
> <IfModule !mod_jk.c>
>    LoadModule    jk_module  modules/mod_jk.so
> </IfModule>
> 
> JkWorkersFile C:/Program Files/Apache Software
> Foundation/Apache2.2/conf/jk/workers.properties
You need quotes above and below.
> JkLogFile C:/Program Files/Apache Software Foundation/Apache2.2/logs/jk.log
> JkLogLevel info
> JkLogStampFormat “[%a %b %d %H:%M:%S %Y]“
> JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories
> JkRequestLogFormat “%w %V %T”
> JkMount /examples* worker1
> 
> 
> 
> 
> # Should mod_jk send SSL information to Tomcat (default is On)
> JkExtractSSL On
> # What is the indicator for SSL (default is HTTPS)
> JkHTTPSIndicator HTTPS
> # What is the indicator for SSL session (default is SSL_SESSION_ID)
> JkSESSIONIndicator SSL_SESSION_ID
> # What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
> JkCIPHERIndicator SSL_CIPHER
> # What is the indicator for the client SSL certificated (default is
> SSL_CLIENT_CERT)
> JkCERTSIndicator SSL_CLIENT_CERT
> 
> My workers.properties file is
> workers.tomcat_home="C:/Program Files/Apache Software Foundation/Tomcat 6.0"
> workers.java_home="C:/Program Files/Java/jdk1.6.0_13"
> ps=/
> # Define worker 'worker1'
> worker.list=worker1
> # Set properties for worker 'example' (ajp13)
> worker.default.type=ajp13
> worker.default.host=localhost
> worker.default.port=8009
> worker.default.cachesize=10
> worker.default.cache_timeout=600
> worker.default.socket_keepalive=1
> worker.default.recycle_timeout=300
> worker.default.lbfactor=1
> 
> I have also changed Tomcat server.xml file
> <Connector     port="8009"
>                protocol="AJP/1.3"
>                redirectPort="8443"
>                enableLookups="false"
>                request.tomcatAuthentication="false"
>                address="127.0.0.2"
>                scheme="https" secure="true"/>
> 
> <Listener className="org.apache.jk.config.ApacheConfig"
>            workersConfig="C:/Program Files/Apache Software
> Foundation/Apache2.2/conf/jk/workers.properties"
>            mod_Jk ="C:/Program Files/Apache Software
> Foundation/Apache2.2/modules/mod_jk.so"
>            jkLog="C:/Program Files/Apache Software
> Foundation/Apache2.2/logs/jk.log"
>            jkDebug="info" noRoot="false"/>
> 
> both in Server tag and in Engine tag.
> 
> and my httpd-ssl.conf file is
> 
> SSLOptions +StdEnvVars +ExportCertData
> JkMount /examples* worker1
> 
> 
> So please help me what is wrong with this.
> 
> Thanks
> Jatinder


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


Re: Need Help to configure Apache Tomcat with mod_jk.so

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jatinder,

On 5/10/2011 9:28 AM, jatinder singh wrote:
> # Should mod_jk send SSL information to Tomcat (default is On)
> JkExtractSSL On
> # What is the indicator for SSL (default is HTTPS)
> JkHTTPSIndicator HTTPS
> # What is the indicator for SSL session (default is SSL_SESSION_ID)
> JkSESSIONIndicator SSL_SESSION_ID
> # What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
> JkCIPHERIndicator SSL_CIPHER
> # What is the indicator for the client SSL certificated (default is
> SSL_CLIENT_CERT)
> JkCERTSIndicator SSL_CLIENT_CERT

Why have you repeated all default values, here? Just wondering...

> My workers.properties file is
> workers.tomcat_home="C:/Program Files/Apache Software Foundation/Tomcat 6.0"
> workers.java_home="C:/Program Files/Java/jdk1.6.0_13"
> ps=/

The above settings are useless, assuming you're using a version of
mod_jk after about 2002.

> # Define worker 'worker1'
> worker.list=worker1
> # Set properties for worker 'example' (ajp13)
> worker.default.type=ajp13
> worker.default.host=localhost
> worker.default.port=8009
> worker.default.cachesize=10
> worker.default.cache_timeout=600
> worker.default.socket_keepalive=1
> worker.default.recycle_timeout=300
> worker.default.lbfactor=1

All that looks okay, though you don't need an 'lbfactor' for a
non-clustered worker.

> I have also changed Tomcat server.xml file
> <Connector     port="8009"
>                 protocol="AJP/1.3"
>                 redirectPort="8443"
>                 enableLookups="false"
>                 request.tomcatAuthentication="false"

Why do you have "request.tomcatAuthentication" here?

What version of Tomcat are you running?

> <Listener className="org.apache.jk.config.ApacheConfig"
>             workersConfig="C:/Program Files/Apache Software
> Foundation/Apache2.2/conf/jk/workers.properties"
>             mod_Jk ="C:/Program Files/Apache Software
> Foundation/Apache2.2/modules/mod_jk.so"
>             jkLog="C:/Program Files/Apache Software
> Foundation/Apache2.2/logs/jk.log"
>             jkDebug="info" noRoot="false"/>

Don't use the ApacheConfig listener, really for any reason. Once you
have your workers.properties file, it's entirely unnecessary and is more
likely to destroy your configuration than anything else.

> both in Server tag and in Engine tag.

Both of what? <Connector> and <Listener>?

<Connector> should only be at the <Service> level and should never be
repeated.

My guess is that you have a Tomcat startup error, but you only posted
the httpd log file.

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

iEYEARECAAYFAk3JnPgACgkQ9CaO5/Lv0PB0HQCfbQuJFrOzjce5v+LIJ1xuBJXE
DfQAoJXkHjevrx1pBcoW2HZySnmQ9HBf
=jwZG
-----END PGP SIGNATURE-----

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