You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by John <li...@johndubchak.com> on 2008/05/03 22:51:52 UTC
Virtual Host Config and Deployment Issue
Hi,
I've configured two virtual hosts for testing in Geronimo 2.1 running on
OS X by following the instructions at:
http://cwiki.apache.org/GMOxDOC21/configuring-virtual-hosts-in-geronimo-tomcat.html
However, when I try to deploy a webapp with the following deployment plan:
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
<environment>
<moduleId>
<groupId>com.example.hosting</groupId>
<artifactId>ChangePassword</artifactId>
<version>2.1</version>
<type>war</type>
</moduleId>
<dependencies>
<dependency>
<groupId>console.dbpool</groupId>
<artifactId>MailSystem</artifactId>
</dependency>
</dependencies>
</environment>
<context-root>/changePassword</context-root>
<host>example.com</host>
<resource-ref>
<ref-name>jdbc/MailSystem</ref-name>
<resource-link>jdbc/MailSystem</resource-link>
</resource-ref>
</web-app>
I receive the following exception:
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration com.example.hosting/ChangePassword/2.1/war failed to start
due to the following reasons:
The service
J2EEApplication=null,j2eeType=WebModule,name=com.example.hosting/ChangePassword/2.1/war
did not start because Invalid virtual host 'example.com'. Do you have a
matching Host entry in the plan?
at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
I can open the console application on the 2 different virtual hosts that
are configured and ping each from the command line, however, the
deployment fails. What am I missing?
Thanks,
John
Re: Virtual Host Config and Deployment Issue
Posted by Hernan Cunico <hc...@gmail.com>.
It looks OK to me and I have the very same config working on my machine. I'm running this on Windows though.
Could it be some "poison" character messing around in the config.xml; maybe at the end of <attribute name="initParams">name=elitesa.com !?
Can somebody else with a Mac take a quick look at this? I copied and pasted this conf on my machine and got it working
Cheers!
Hernan
John wrote:
> Hernan Cunico wrote:
>> Opening the console on the two virtual hosts only confirms you can
>> resolve the host name alias but not the virtual host configuration.
>> The error you get at deployment time is because the deployer does not
>> know the virtual host you specified in the plan. I would say you look
>> into the config.xml and check if you are missing anything from the
>> sample on the doc.
>> You should have something like this sample right after the <module
>> name="org.apache.geronimo.configs/tomcat6/2.1/car"> in the config.xml.
>>
>> <gbean gbeanInfo="org.apache.geronimo.tomcat.HostGBean"
>> name="org.apache.geronimo.configs/tomcat6/2.1/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.1/car,j2eeType=Host,name=exampleVirtualHost_1">
>>
>> <attribute
>> name="className">org.apache.catalina.core.StandardHost</attribute>
>> <attribute name="initParams">name=example.com
>> appBase=
>> workDir=work</attribute>
>> </gbean>
>>
>> That's all you need for configuring one virtual host in Geronimo with
>> Tomcat.
>
> Hernan,
>
> Thanks for your response. Here is my gbean definition, right after the
> <module name="..."> line in my config.xml:
>
> <gbean
> name="org.apache.geronimo.configs/tomcat6/2.1/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.1/car,j2eeType=Host,name=TomcatVirtualHost_1"
> gbeanInfo="org.apache.geronimo.tomcat.HostGBean">
> <attribute
> name="className">org.apache.catalina.core.StandardHost</attribute>
> <attribute name="initParams">name=elitesa.com
> appBase=
> workDir=work</attribute>
> </gbean>
>
> Here is my complete, unedited, deployment plan:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0">
> <environment>
> <moduleId>
> <groupId>com.esa.hosting</groupId>
> <artifactId>ChangePassword</artifactId>
> <version>2.1</version>
> <type>war</type>
> </moduleId>
> <dependencies>
> <dependency>
> <groupId>console.dbpool</groupId>
> <artifactId>MailSystem</artifactId>
> </dependency>
> </dependencies>
> </environment>
> <context-root>/changePassword</context-root>
> <host>elitesa.com</host>
> <resource-ref>
> <ref-name>jdbc/MailSystem</ref-name>
> <resource-link>jdbc/MailSystem</resource-link>
> </resource-ref>
> </web-app>
>
> As you can see, both the "name=" from the config.xml definition and the
> host entry in the deployment plan match up. I am performing a command
> line deployment with the geronimo-web.xml deployment plan at WEB-INF
> within my WAR file. Yet, I still receive this error:
>
> The service
> J2EEApplication=null,j2eeType=WebModule,name=com.esa.hosting/ChangePassword/2.1/war
> did not start because Invalid virtual host 'elitesa.com'. Do you have a
> matching Host entry in the plan?
>
> at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
>
> ... 41 more
> Error: Operation failed: start of
> com.esa.hosting/ChangePassword/2.1/war failed
>
> Unknown start exception
>
> Configuration com.esa.hosting/ChangePassword/2.1/war failed to
> start due to the following reasons:
>
> The service
>
> J2EEApplication=null,j2eeType=WebModule,name=com.esa.hosting/ChangePassword/2.1/war
>
> did not start because Invalid virtual host 'elitesa.com'. Do you
> have a matching Host entry in the plan?
>
> I agree that it should be just as easy as you say, however, it isn't for
> me.
>
> Thanks again,
> John
>
>
Re: Virtual Host Config and Deployment Issue
Posted by Hernan Cunico <hc...@gmail.com>.
It looks OK to me and I have the very same config working on my machine. I'm running this on Windows though.
Could it be some "poison" character messing around in the config.xml; maybe at the end of <attribute name="initParams">name=elitesa.com !?
Can somebody else with a Mac take a quick look at this? I copied and pasted this conf on my machine and got it working
Cheers!
Hernan
John wrote:
> Hernan Cunico wrote:
>> Opening the console on the two virtual hosts only confirms you can
>> resolve the host name alias but not the virtual host configuration.
>> The error you get at deployment time is because the deployer does not
>> know the virtual host you specified in the plan. I would say you look
>> into the config.xml and check if you are missing anything from the
>> sample on the doc.
>> You should have something like this sample right after the <module
>> name="org.apache.geronimo.configs/tomcat6/2.1/car"> in the config.xml.
>>
>> <gbean gbeanInfo="org.apache.geronimo.tomcat.HostGBean"
>> name="org.apache.geronimo.configs/tomcat6/2.1/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.1/car,j2eeType=Host,name=exampleVirtualHost_1">
>>
>> <attribute
>> name="className">org.apache.catalina.core.StandardHost</attribute>
>> <attribute name="initParams">name=example.com
>> appBase=
>> workDir=work</attribute>
>> </gbean>
>>
>> That's all you need for configuring one virtual host in Geronimo with
>> Tomcat.
>
> Hernan,
>
> Thanks for your response. Here is my gbean definition, right after the
> <module name="..."> line in my config.xml:
>
> <gbean
> name="org.apache.geronimo.configs/tomcat6/2.1/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.1/car,j2eeType=Host,name=TomcatVirtualHost_1"
> gbeanInfo="org.apache.geronimo.tomcat.HostGBean">
> <attribute
> name="className">org.apache.catalina.core.StandardHost</attribute>
> <attribute name="initParams">name=elitesa.com
> appBase=
> workDir=work</attribute>
> </gbean>
>
> Here is my complete, unedited, deployment plan:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0">
> <environment>
> <moduleId>
> <groupId>com.esa.hosting</groupId>
> <artifactId>ChangePassword</artifactId>
> <version>2.1</version>
> <type>war</type>
> </moduleId>
> <dependencies>
> <dependency>
> <groupId>console.dbpool</groupId>
> <artifactId>MailSystem</artifactId>
> </dependency>
> </dependencies>
> </environment>
> <context-root>/changePassword</context-root>
> <host>elitesa.com</host>
> <resource-ref>
> <ref-name>jdbc/MailSystem</ref-name>
> <resource-link>jdbc/MailSystem</resource-link>
> </resource-ref>
> </web-app>
>
> As you can see, both the "name=" from the config.xml definition and the
> host entry in the deployment plan match up. I am performing a command
> line deployment with the geronimo-web.xml deployment plan at WEB-INF
> within my WAR file. Yet, I still receive this error:
>
> The service
> J2EEApplication=null,j2eeType=WebModule,name=com.esa.hosting/ChangePassword/2.1/war
> did not start because Invalid virtual host 'elitesa.com'. Do you have a
> matching Host entry in the plan?
>
> at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
>
> ... 41 more
> Error: Operation failed: start of
> com.esa.hosting/ChangePassword/2.1/war failed
>
> Unknown start exception
>
> Configuration com.esa.hosting/ChangePassword/2.1/war failed to
> start due to the following reasons:
>
> The service
>
> J2EEApplication=null,j2eeType=WebModule,name=com.esa.hosting/ChangePassword/2.1/war
>
> did not start because Invalid virtual host 'elitesa.com'. Do you
> have a matching Host entry in the plan?
>
> I agree that it should be just as easy as you say, however, it isn't for
> me.
>
> Thanks again,
> John
>
>
Re: Virtual Host Config and Deployment Issue
Posted by John <li...@johndubchak.com>.
Hernan Cunico wrote:
> Opening the console on the two virtual hosts only confirms you can
> resolve the host name alias but not the virtual host configuration.
> The error you get at deployment time is because the deployer does not
> know the virtual host you specified in the plan. I would say you look
> into the config.xml and check if you are missing anything from the
> sample on the doc.
> You should have something like this sample right after the <module
> name="org.apache.geronimo.configs/tomcat6/2.1/car"> in the config.xml.
>
> <gbean gbeanInfo="org.apache.geronimo.tomcat.HostGBean"
> name="org.apache.geronimo.configs/tomcat6/2.1/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.1/car,j2eeType=Host,name=exampleVirtualHost_1">
>
> <attribute
> name="className">org.apache.catalina.core.StandardHost</attribute>
> <attribute name="initParams">name=example.com
> appBase=
> workDir=work</attribute>
> </gbean>
>
> That's all you need for configuring one virtual host in Geronimo with
> Tomcat.
Hernan,
Thanks for your response. Here is my gbean definition, right after the
<module name="..."> line in my config.xml:
<gbean
name="org.apache.geronimo.configs/tomcat6/2.1/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.1/car,j2eeType=Host,name=TomcatVirtualHost_1"
gbeanInfo="org.apache.geronimo.tomcat.HostGBean">
<attribute
name="className">org.apache.catalina.core.StandardHost</attribute>
<attribute name="initParams">name=elitesa.com
appBase=
workDir=work</attribute>
</gbean>
Here is my complete, unedited, deployment plan:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0">
<environment>
<moduleId>
<groupId>com.esa.hosting</groupId>
<artifactId>ChangePassword</artifactId>
<version>2.1</version>
<type>war</type>
</moduleId>
<dependencies>
<dependency>
<groupId>console.dbpool</groupId>
<artifactId>MailSystem</artifactId>
</dependency>
</dependencies>
</environment>
<context-root>/changePassword</context-root>
<host>elitesa.com</host>
<resource-ref>
<ref-name>jdbc/MailSystem</ref-name>
<resource-link>jdbc/MailSystem</resource-link>
</resource-ref>
</web-app>
As you can see, both the "name=" from the config.xml definition and the
host entry in the deployment plan match up. I am performing a command
line deployment with the geronimo-web.xml deployment plan at WEB-INF
within my WAR file. Yet, I still receive this error:
The service
J2EEApplication=null,j2eeType=WebModule,name=com.esa.hosting/ChangePassword/2.1/war
did not start because Invalid virtual host 'elitesa.com'. Do you have a
matching Host entry in the plan?
at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
... 41 more
Error: Operation failed: start of
com.esa.hosting/ChangePassword/2.1/war failed
Unknown start exception
Configuration com.esa.hosting/ChangePassword/2.1/war failed to
start due to the following reasons:
The service
J2EEApplication=null,j2eeType=WebModule,name=com.esa.hosting/ChangePassword/2.1/war
did not start because Invalid virtual host 'elitesa.com'. Do you
have a matching Host entry in the plan?
I agree that it should be just as easy as you say, however, it isn't for me.
Thanks again,
John
Re: Virtual Host Config and Deployment Issue
Posted by Hernan Cunico <hc...@gmail.com>.
Opening the console on the two virtual hosts only confirms you can resolve the host name alias but not the virtual host configuration.
The error you get at deployment time is because the deployer does not know the virtual host you specified in the plan. I would say you look into the config.xml and check if you are missing anything from the sample on the doc.
You should have something like this sample right after the <module name="org.apache.geronimo.configs/tomcat6/2.1/car"> in the config.xml.
<gbean gbeanInfo="org.apache.geronimo.tomcat.HostGBean" name="org.apache.geronimo.configs/tomcat6/2.1/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.1/car,j2eeType=Host,name=exampleVirtualHost_1">
<attribute name="className">org.apache.catalina.core.StandardHost</attribute>
<attribute name="initParams">name=example.com
appBase=
workDir=work</attribute>
</gbean>
That's all you need for configuring one virtual host in Geronimo with Tomcat.
HTH
Cheers!
Hernan
John wrote:
> Hi,
>
> I've configured two virtual hosts for testing in Geronimo 2.1 running on
> OS X by following the instructions at:
>
> http://cwiki.apache.org/GMOxDOC21/configuring-virtual-hosts-in-geronimo-tomcat.html
>
>
> However, when I try to deploy a webapp with the following deployment plan:
>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
> <environment>
> <moduleId>
> <groupId>com.example.hosting</groupId>
> <artifactId>ChangePassword</artifactId>
> <version>2.1</version>
> <type>war</type>
> </moduleId>
> <dependencies>
> <dependency>
> <groupId>console.dbpool</groupId>
> <artifactId>MailSystem</artifactId>
> </dependency>
> </dependencies>
> </environment>
> <context-root>/changePassword</context-root>
> <host>example.com</host>
> <resource-ref>
> <ref-name>jdbc/MailSystem</ref-name>
> <resource-link>jdbc/MailSystem</resource-link>
> </resource-ref>
> </web-app>
>
>
> I receive the following exception:
>
> Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
> Configuration com.example.hosting/ChangePassword/2.1/war failed to start
> due to the following reasons:
> The service
> J2EEApplication=null,j2eeType=WebModule,name=com.example.hosting/ChangePassword/2.1/war
> did not start because Invalid virtual host 'example.com'. Do you have a
> matching Host entry in the plan?
>
> at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
>
>
> I can open the console application on the 2 different virtual hosts that
> are configured and ping each from the command line, however, the
> deployment fails. What am I missing?
>
> Thanks,
> John
>