geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hernan Cunico <hcun...@gmail.com>
Subject Re: Tomcat virtual host in Geronimo 1.0
Date Wed, 06 Sep 2006 18:11:45 GMT
Hi Nilolaus,
Can you resolve the VH alias name? can you ping 
kalinowski.pro-inform.de? Are you using a DNS to resolve this alias or a 
local host table? Geronimo must be able to resolve that name.

What worked  for me also was to add the GBean at the top of the Tomcat 
configuration section, right after

<configuration name="geronimo/tomcat/1.0/car">

Well, that worked for me with Geronimo v1.1

I also found this doc for WASCE
http://publib.boulder.ibm.com/wasce/V1.0/Tasks/Tomcat/Host.html

HTH

Cheers!
Hernan

nikolaus.jeremic@pro-inform.de wrote:
> 
> Hello all,
> 
> i'm trying to setup a Tomcat virtual host in Geronimo 1.0 (which is 
> integrated in WASCE 1.0.1.2) and map my web application to it. I have 
> followed the docs under 
> http://chariotsolutions.com/geronimo/geronimo-1.0/web-plan.html#web-plan-container-specific

> and added the "container-config" into the deployment plan 
> (WEB-INF/geronimo-web.xml) of my WAR as follows:
> 
> 
> #### cut here #################
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app configId="customers/kalinowski"
>     xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
>     xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
>     xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.0"
>     xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0">
>   <context-root>/kalinowski</context-root>
>   <context-priority-classloader>false</context-priority-classloader>
>   <container-config>
>     <tomcat 
> xmlns="http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0">
>       <host>kalinowski.pro-inform.de</host>
>     </tomcat>
>   </container-config>
> </web-app>
> #### cut here #################
> 
> 
> Next, I have added the following GBean configuration to my 
> "var/config/config.xml":
> 
> 
>     <gbean name="VirtualHost">
>       <attribute 
> name="className">org.apache.catalina.core.StandardHost</attribute>
>       <attribute name="initParams">name=kalinowski.pro-inform.de
>             appBase=
>             workDir=work</attribute>
>     </gbean>
> 
> 
> Now my Tomcat configuration part in "var/config/config.xml" looks like 
> this:
> 
>  <configuration name="geronimo/tomcat/1.0/car">
>     <gbean name="TomcatResources">
>     </gbean>
>     <gbean name="TomcatEngine">
>       <attribute name="initParams">name=Geronimo</attribute>
>     </gbean>
>     <gbean name="TomcatWebConnector">
>       <attribute name="host">0.0.0.0</attribute>
>       <attribute name="port">80</attribute>
>       <attribute name="redirectPort">8443</attribute>
>       <attribute name="bufferSizeBytes">2048</attribute>
>       <attribute name="maxThreads">150</attribute>
>       <attribute name="acceptQueueSize">100</attribute>
>       <attribute name="lingerMillis">-1</attribute>
>       <attribute name="tcpNoDelay">true</attribute>
>       <attribute name="minSpareThreads">25</attribute>
>       <attribute name="maxSpareThreads">75</attribute>
>       <attribute name="maxHttpHeaderSizeBytes">8192</attribute>
>       <attribute name="hostLookupEnabled">false</attribute>
>       <attribute name="connectionTimeoutMillis">20000</attribute>
>       <attribute name="uploadTimeoutEnabled">false</attribute>
>       <attribute name="maxPostSize">2097152</attribute>
>       <attribute name="maxSavePostSize">4096</attribute>
>       <attribute name="emptySessionPath">false</attribute>
>     </gbean>
>     <gbean name="TomcatAJPConnector">
>       <attribute name="host">0.0.0.0</attribute>
>       <attribute name="port">8009</attribute>
>       <attribute name="redirectPort">8443</attribute>
>       <attribute name="hostLookupEnabled">false</attribute>
>       <attribute name="connectionTimeoutMillis">20000</attribute>
>       <attribute name="uploadTimeoutEnabled">false</attribute>
>       <attribute name="maxPostSize">2097152</attribute>
>       <attribute name="maxSavePostSize">4096</attribute>
>       <attribute name="emptySessionPath">false</attribute>
>     </gbean>
>     <gbean name="TomcatAJPConnector">
>       <attribute name="host">0.0.0.0</attribute>
>       <attribute name="port">8009</attribute>
>       <attribute name="redirectPort">8443</attribute>
>       <attribute name="hostLookupEnabled">false</attribute>
>     </gbean>
>     <gbean name="TomcatWebSSLConnector">
>       <attribute name="host">0.0.0.0</attribute>
>       <attribute name="port">443</attribute>
>       <attribute name="bufferSizeBytes">2048</attribute>
>       <attribute name="maxThreads">150</attribute>
>       <attribute name="acceptQueueSize">100</attribute>
>       <attribute name="lingerMillis">-1</attribute>
>       <attribute name="tcpNoDelay">true</attribute>
>       <attribute name="minSpareThreads">25</attribute>
>       <attribute name="maxSpareThreads">75</attribute>
>       <attribute name="maxHttpHeaderSizeBytes">8192</attribute>
>       <attribute name="hostLookupEnabled">false</attribute>
>       <attribute name="connectionTimeoutMillis">20000</attribute>
>       <attribute name="uploadTimeoutEnabled">false</attribute>
>       <attribute name="maxPostSize">2097152</attribute>
>       <attribute name="maxSavePostSize">4096</attribute>
>       <attribute name="emptySessionPath">false</attribute>
>       <attribute name="clientAuthRequired">False</attribute>
>       <attribute name="algorithm">Default</attribute>
>       <attribute name="secureProtocol">Default</attribute>
>       <attribute name="keystoreFileName">var/security/keystore</attribute>
>       <attribute 
> name="keystorePassword">{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNvZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9sYW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEArVToThqcjvbXFD5C2uUmpwdAADQUVT</attribute>

> 
>       <attribute name="keystoreType">JKS</attribute>
>       <attribute name="truststoreType">JKS</attribute>
>     </gbean>
>     <gbean name="VirtualHost">
>       <attribute 
> name="className">org.apache.catalina.core.StandardHost</attribute>
>       <attribute name="initParams">name=kalinowski.pro-inform.de
>             appBase=
>             workDir=work</attribute>
>     </gbean>
>     <gbean 
> name="geronimo.server:J2EEApplication=null,J2EEModule=geronimo/tomcat/1.0/car,J2EEServer=geronimo,j2eeType=GBean,name=TomcatWebContainer">

> 
>       <attribute name="catalinaHome">var/catalina</attribute>
>     </gbean>
>   </configuration>
> 
> 
> After restarting Geronimo I have deployed my application trough the web 
> administration console but it can't be started properly and the Geronimo 
> log contains error messages like this:
> 
> 19:23:41,412 ERROR [GBeanInstanceState] Error while starting; GBean is 
> now in the FAILED state: objectName="geronimo.server:J2EE
> Application=null,J2EEServer=geronimo,j2eeType=WebModule,name=customers/kalinowski" 
> 
> java.lang.IllegalArgumentException: Invalid virtual host 
> 'kalinowski.pro-inform.de'.  Do you have a matching Host entry in the p
> lan?
>         at 
> org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:225) 
> 
>         at 
> org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(<generated>)

> 
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at 
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>         at 
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)

> 
>         at 
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)

> 
>         at 
> org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$d0b57fe3.addContext(<generated>)

> 
>         at 
> org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:419)

> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:936)

> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:325)

> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:110)

> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:132)

> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:537)

> 
>         at 
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:208)

> 
>         at 
> org.apache.geronimo.kernel.config.Configuration.startRecursiveGBeans(Configuration.java:315)

> 
>         at 
> org.apache.geronimo.kernel.config.Configuration$$FastClassByCGLIB$$7f4b4a9b.invoke(<generated>)

> 
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at 
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:835) 
> 
>         at 
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:178)
>         at 
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:173)
>         at 
> org.apache.geronimo.kernel.config.ConfigurationManagerImpl.start(ConfigurationManagerImpl.java:142)

> 
>         at 
> org.apache.geronimo.kernel.config.ConfigurationManagerImpl$$FastClassByCGLIB$$fbed85d2.invoke(<generated>)

> 
>         at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
>         at 
> org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>         at 
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)

> 
>         at 
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)

> 
>         at 
> org.apache.geronimo.kernel.config.ConfigurationManager$$EnhancerByCGLIB$$7b5b03e0.start(<generated>)

> 
>         at 
> org.apache.geronimo.system.main.Daemon.doStartup(Daemon.java:355)
>         at org.apache.geronimo.system.main.Daemon.<init>(Daemon.java:90)
>         at org.apache.geronimo.system.main.Daemon.main(Daemon.java:480)
> 
> 
> Alternatively I have tried to add the GBean configuration containing the 
> definition of the virtual host directly into the deployment plan instead 
> of into "var/config/config.xml". This seemed to work at first view 
> because my application could not be accessed any more through 
> "http://<primary hostname of my server>/kalinowski" but instead only 
> through "http://kalinowski.pro-inform.de/kalinowski". The problem was 
> now that the retrieved page was empty and the actual logfile in 
> "var/catalina/logs" was showing HTTP status code 400 (Bad request).
> I would appreciate any help. Thanks in advance.
> 
> Nikolaus
> 

Mime
View raw message