8 Replies Latest reply on Mar 17, 2009 4:36 PM by mapesteguia

    [TomcatDeployer] Failed to map vhost: xxx.domain.com

    sshrestha

      JBoss: 4.0.4
      JVM: Sun J2SE 1.5.0_10.
      Plattform: Fedora Core 4 Linux

      I have added a second element in server.xml, but it throws a "Failed to map vhost". I also have the vhost mapped in jboss-web.xml:
      <context-root>/</context-root>
      <virtual-host>xxx.domain.com</virtual-host>

      Any suggestion is appreciated. This is what the second element looks like:









      xxx.domain.com





        • 1. Re: [TomcatDeployer] Failed to map vhost: xxx.domain.com
          sshrestha










          xxx.domain.com








          • 2. Re: [TomcatDeployer] Failed to map vhost: xxx.domain.com
            sshrestha

             

            "sshrestha" wrote:
            <Service name="my.web" className="org.jboss.web.tomcat.tc5.StandardService">

            <Connector port="8181" address="10.0.2.23"
            maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
            emptySessionPath="true"
            enableLookups="false" redirectPort="8443" acceptCount="100"
            connectionTimeout="20000" disableUploadTimeout="true"/>

            <Connector port="8019" address="10.0.2.23"
            emptySessionPath="true" enableLookups="false" redirectPort="8443"
            protocol="AJP/1.3"/>

            <Engine name="my.web" defaultHost="vhost2">

            <Host name="vhost2" autoDeploy="false" deployOnStartup="false" deployXML="false">
            <Alias>xxx.domain.com</Alias>

            <Valve className="org.apache.catalina.valves.AccessLogValve"
            prefix="vhost2_busdev" suffix=".log" pattern="common"
            directory="${jboss.server.home.dir}/log"/>

            <DefaultContext cookies="true" crossContext="true" override="true"/>
            </Host>

            </Engine>

            </Service>


            • 3. Re: [TomcatDeployer] Failed to map vhost: xxx.domain.com
              sshrestha

              click on quote to view the part of the server.xml file

              • 4. Re: [TomcatDeployer] Failed to map vhost: xxx.domain.com
                peterj

                Enclose your xml text in [ code ] [ /code ] brackets (without the spaces, of course). Also, use the Preview button to see what your post will look like before submitting it.

                • 5. Re: [TomcatDeployer] Failed to map vhost: xxx.domain.com
                  sshrestha

                  This is the second Service element added.

                   <Service name="my.web" className="org.jboss.web.tomcat.tc5.StandardService">
                  
                   <Connector port="8181" address="10.0.2.23"
                   maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
                   emptySessionPath="true"
                   enableLookups="false" redirectPort="8443" acceptCount="100"
                   connectionTimeout="20000" disableUploadTimeout="true"/>
                  
                   <Connector port="8019" address="10.0.2.23"
                   emptySessionPath="true" enableLookups="false" redirectPort="8443"
                   protocol="AJP/1.3"/>
                  
                   <Engine name="my.web" defaultHost="vhost2">
                  
                   <Host name="vhost2" autoDeploy="false" deployOnStartup="false" deployXML="false">
                   <Alias>xxx.domain.com</Alias>
                  
                   <Valve className="org.apache.catalina.valves.AccessLogValve"
                   prefix="vhost2_busdev" suffix=".log" pattern="common"
                   directory="${jboss.server.home.dir}/log"/>
                  
                   <DefaultContext cookies="true" crossContext="true" override="true"/>
                   </Host>
                  
                   </Engine>
                   </Service>
                  


                  • 6. Re: [TomcatDeployer] Failed to map vhost: xxx.domain.com
                    raist_majere

                     

                    <host name="blablabla" ... >
                    must be a valid DNS server name, so if "vhost2" is not a registered name of the server, you cannot use it (or at least is what the tomcat documentation says...). Try changing in it to www.xxxdomain.com and have it on the DNS (or at least on the "hosts" file of the computer).

                    • 7. Re: [TomcatDeployer] Failed to map vhost: xxx.domain.com
                      sshrestha

                       

                      "Raist_Majere" wrote:
                      <host name="blablabla" ... >
                      must be a valid DNS server name, so if "vhost2" is not a registered name of the server, you cannot use it (or at least is what the tomcat documentation says...). Try changing in it to www.xxxdomain.com and have it on the DNS (or at least on the "hosts" file of the computer).


                      I have already tried the way you have explained it here with no change in results. Funny though, Tomcat does not seem to have problem if I do it in the first
                      <Service>
                      element where I have defined
                      <host name="vhost1">
                      and it seems to pick up a valid domain name from the virtual host I have defined inside...

                      • 8. Re: [TomcatDeployer] Failed to map vhost: xxx.domain.com

                        Hi sshrestha, Do you have more than one section defined in your server.xml? If so, i'm having the same problem.

                        Did you find a solution for this?