You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tom Kennelly <to...@tekennelly.gotdns.com> on 2005/01/25 19:55:13 UTC
Cannot solve error - No Host name matches server name. Apache 2.0.52,
Tomcat 5.5.7
I am running Apache 2.0.52, Tomcat 5.5.7 (and have tested with Tomcat
5.5.4 as well) and mod_jk is 1.28. All of these major components were
download in binary mode (no compiling on any component) to run on my
Fedora system. Just to clarify both Apache and Tomcat are running on
the same machine.
I cannot determine why I am getting a No Host name matches server
name error when trying to execute a jsp on Tomcat through the
ajp13 connector from Apache. According to the logs below I believe the
request is flowing from Apache to Tomcat correctly.
Here is the error I receive according to the Catalina log (see last line):
Jan 25, 2005 11:07:52 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 25, 2005 11:07:53 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 12252 ms
Jan 25, 2005 11:07:56 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 25, 2005 11:07:56 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
Jan 25, 2005 11:07:56 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 25, 2005 11:08:07 AM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Jan 25, 2005 11:08:09 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jan 25, 2005 11:08:09 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jan 25, 2005 11:08:11 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jan 25, 2005 11:08:11 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jan 25, 2005 11:08:12 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 25, 2005 11:08:12 AM org.apache.catalina.startup.ContextConfig
applicationWebConfig
INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[tkennelly].StandardContext[/mydefaults]
Jan 25, 2005 11:08:13 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 25, 2005 11:08:14 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jan 25, 2005 11:08:14 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/146 config=null
Jan 25, 2005 11:08:14 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jan 25, 2005 11:08:15 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 21274 ms
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: REQUEST URI =/tomk.jsp
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: authType=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: characterEncoding=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: contentLength=0
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: contentType=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: contextPath=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=host=tkennelly.gotdns.com
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=user-agent=Mozilla/5.0 (Windows; U; Windows NT
5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO:
header=accept=text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=accept-language=en-us,en;q=0.5
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=accept-encoding=gzip,deflate
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=accept-charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=keep-alive=300
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=connection=keep-alive
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: header=content-length=0
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: locale=en_US
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: method=GET
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: pathInfo=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: protocol=HTTP/1.1
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: queryString=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: remoteAddr=192.168.2.1
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: remoteHost=192.168.2.1
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: remoteUser=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: requestedSessionId=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: scheme=http
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: serverName=tkennelly.gotdns.com
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: serverPort=80
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: servletPath=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: isSecure=false
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: ---------------------------------------------------------------
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: ---------------------------------------------------------------
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: authType=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: contentLength=-1
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: contentType=null
Jan 25, 2005 1:34:50 PM org.apache.catalina.valves.RequestDumperValve invoke
INFO: message=No Host matches server name tkennelly.gotdns.com
-----------------------
You will notice that I cannot get a match on tkennelly.gotdns.com BUT
earlier on in the startup you see the message:
Catalina].StandardHost[tkennelly].StandardContext[/mydefaults]
which indicates a host name tkennelly exists. The server.xml definition
is as follows which correlates tkennelly with tkennelly.gotdns.com
------------------------
<Server port="8005" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener
className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8009"
enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" />
<Engine name="Catalina" defaultHost="localhost">
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log."
suffix=".txt"
pattern="common" resolveHosts="false"/>
</Host>
<Host name="tkennelly" appbase="/var/www/html/webapps">
<Alias>tkennelly.gotdns.com</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="tkennelly_access_log."
suffix=".txt"
pattern="common" resolveHosts="true"/>
</Host>
</Engine>
</Service>
</Server>
--------------------------
Lastly, the mod_jk log show that the correct information is being passed
to Tomcat
--------------------------
[Tue Jan 25 13:01/25/05 05] [jk_uri_worker_map.c (445)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Tue Jan 25 13:01/25/05 05] [jk_uri_worker_map.c (459)]: Attempting to
map URI '/tomk.jsp'
[Tue Jan 25 13:01/25/05 05] [jk_uri_worker_map.c (539)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match worker1 ->
*.jsp
[Tue Jan 25 13:01/25/05 05] [mod_jk.c (1689)]: Into handler
r->proxyreq=0 r->handler=jakarta-servlet r->notes=148586472 worker=worker1
[Tue Jan 25 13:01/25/05 05] [jk_worker.c (90)]: Into
wc_get_worker_for_name worker1
[Tue Jan 25 13:01/25/05 05] [jk_worker.c (94)]: wc_get_worker_for_name,
done found a worker
[Tue Jan 25 13:01/25/05 05] [mod_jk.c (472)]: agsp=80
agsn=tkennelly.gotdns.com hostn=tkennelly.gotdns.com
shostn=tkennelly.gotdns.com cbsport=0 sport=0
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (1741)]: Into
jk_worker_t::get_endpoint
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (1367)]: Into
jk_endpoint_t::service
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (257)]: Into
ajp_marshal_into_msgb
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (425)]:
ajp_marshal_into_msgb - Done
[Tue Jan 25 13:01/25/05 05] [jk_connect.c (136)]: Into jk_open_socket
[Tue Jan 25 13:01/25/05 05] [jk_connect.c (143)]: jk_open_socket, try to
connect socket = 20 to 127.0.0.1:8009
[Tue Jan 25 13:01/25/05 05] [jk_connect.c (159)]: jk_open_socket, after
connect ret = 0
[Tue Jan 25 13:01/25/05 05] [jk_connect.c (168)]: jk_open_socket, set
TCP_NODELAY to on
[Tue Jan 25 13:01/25/05 05] [jk_connect.c (177)]: jk_open_socket, set
SO_KEEPALIVE to on
[Tue Jan 25 13:01/25/05 05] [jk_connect.c (185)]: jk_open_socket,
return, sd = 20
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (701)]: In
jk_endpoint_t::ajp_connect_to_endpoint, connected sd = 20 to 127.0.0.1:8009
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (737)]: sending to ajp13 #405
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (1035)]: ajp_send_request
2: request body to send 0 - request body to resend 0
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (851)]: received from ajp13 #57
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (477)]:
ajp_unmarshal_response: status = 400
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (483)]:
ajp_unmarshal_response: Number of headers is = 0
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (851)]: received from ajp13 #2
[Tue Jan 25 13:01/25/05 05] [jk_ajp_common.c (1716)]: Into
jk_endpoint_t::done, recycling connection
-----------------------------
So, what have I missed. The more I work on the problem the more I
believe I have missed something trivial but I cannot see it. What
changes do I need to make in the Apache vhost setting for
tkennelly.gotdns.com or server.xml to resolve this problem
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Cannot solve error - No Host name matches server name. Apache 2.0.52, Tomcat 5.5.7
Posted by Tom Kennelly <to...@tekennelly.gotdns.com>.
BTW good catch on the mod-Jk 1.2.6. I went back and discovered that I can
go down the 1.2.8 path but the resultant binaries on apache.org are all
1.2.6.
----- Original Message -----
From: "Mladen Turk" <ml...@jboss.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, January 25, 2005 2:18 PM
Subject: Re: Cannot solve error - No Host name matches server name. Apache
2.0.52, Tomcat 5.5.7
> Tom Kennelly wrote:
> > I am running Apache 2.0.52, Tomcat 5.5.7 (and have tested with Tomcat
> > 5.5.4 as well) and mod_jk is 1.28. All of these major components were
> > download in binary mode (no compiling on any component) to run on my
> > Fedora system. Just to clarify both Apache and Tomcat are running on
> > the same machine.
> >
>
> You are using mod_jk 1.2.6 not 1.2.8 ;).
>
> Also try to set:
>
> <Host name="tkennelly.gotdns.com" ...
> <Alias>tkennelly</Alias>
> ...
>
> Mladen.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Cannot solve error - No Host name matches server name. Apache 2.0.52, Tomcat 5.5.7
Posted by Tom Kennelly <to...@tekennelly.gotdns.com>.
Should I also rename the folder in CATALINA_HOME/conf/Catalina from
tkennelly to tkennelly.gotdns.com ?
----- Original Message -----
From: "Mladen Turk" <ml...@jboss.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, January 25, 2005 2:18 PM
Subject: Re: Cannot solve error - No Host name matches server name. Apache
2.0.52, Tomcat 5.5.7
> Tom Kennelly wrote:
> > I am running Apache 2.0.52, Tomcat 5.5.7 (and have tested with Tomcat
> > 5.5.4 as well) and mod_jk is 1.28. All of these major components were
> > download in binary mode (no compiling on any component) to run on my
> > Fedora system. Just to clarify both Apache and Tomcat are running on
> > the same machine.
> >
>
> You are using mod_jk 1.2.6 not 1.2.8 ;).
>
> Also try to set:
>
> <Host name="tkennelly.gotdns.com" ...
> <Alias>tkennelly</Alias>
> ...
>
> Mladen.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Cannot solve error - No Host name matches server name. Apache 2.0.52, Tomcat 5.5.7
Posted by Tom Kennelly <to...@tekennelly.gotdns.com>.
Great question. I rechecked the permissions and set them at 777 to make
sure.
----- Original Message -----
From: "Mladen Turk" <ml...@jboss.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, January 25, 2005 3:41 PM
Subject: Re: Cannot solve error - No Host name matches server name. Apache
2.0.52, Tomcat 5.5.7
> Tom Kennelly wrote:
> > I switched the host name and alias as suggested below, recycled both
Tomcat
> > and Apache and received the same error.
>
> Did you set all the permissions correctly?
> Is your vhost directory readable by the tomcat user?
>
> Mladen.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Cannot solve error - No Host name matches server name. Apache
2.0.52, Tomcat 5.5.7
Posted by Mladen Turk <ml...@jboss.com>.
Tom Kennelly wrote:
> I switched the host name and alias as suggested below, recycled both Tomcat
> and Apache and received the same error.
Did you set all the permissions correctly?
Is your vhost directory readable by the tomcat user?
Mladen.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Cannot solve error - No Host name matches server name. Apache 2.0.52, Tomcat 5.5.7
Posted by Tom Kennelly <to...@tekennelly.gotdns.com>.
I switched the host name and alias as suggested below, recycled both Tomcat
and Apache and received the same error.
----- Original Message -----
From: "Mladen Turk" <ml...@jboss.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, January 25, 2005 2:18 PM
Subject: Re: Cannot solve error - No Host name matches server name. Apache
2.0.52, Tomcat 5.5.7
> Tom Kennelly wrote:
> > I am running Apache 2.0.52, Tomcat 5.5.7 (and have tested with Tomcat
> > 5.5.4 as well) and mod_jk is 1.28. All of these major components were
> > download in binary mode (no compiling on any component) to run on my
> > Fedora system. Just to clarify both Apache and Tomcat are running on
> > the same machine.
> >
>
> You are using mod_jk 1.2.6 not 1.2.8 ;).
>
> Also try to set:
>
> <Host name="tkennelly.gotdns.com" ...
> <Alias>tkennelly</Alias>
> ...
>
> Mladen.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Cannot solve error - No Host name matches server name. Apache
2.0.52, Tomcat 5.5.7
Posted by Mladen Turk <ml...@jboss.com>.
Tom Kennelly wrote:
> I am running Apache 2.0.52, Tomcat 5.5.7 (and have tested with Tomcat
> 5.5.4 as well) and mod_jk is 1.28. All of these major components were
> download in binary mode (no compiling on any component) to run on my
> Fedora system. Just to clarify both Apache and Tomcat are running on
> the same machine.
>
You are using mod_jk 1.2.6 not 1.2.8 ;).
Also try to set:
<Host name="tkennelly.gotdns.com" ...
<Alias>tkennelly</Alias>
...
Mladen.
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org