You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jeffrey Barnett <je...@yale.edu> on 2005/01/31 22:41:35 UTC

Use of Admin application creates duplicate "secure" attribute in server.xml

We have recently upgraded from Tomcat 4 to Tomcat 5.0.27.  Now whenever 
we use the Admin application to alter webapp context parameters the new 
server.xml that gets written out contains an extra 'secure="true"' 
attribute at the end of the ssl <Connector>, which causes the server to 
fail with a SEVERE: Parse Fatal Error on restart.  Removing the extra 
attribute manually allows the server to be started, but is operationally 
unacceptable.

Where is the extra attribute coming from (is there a template 
somewhere)?  How can we stop this from happening?  Why is a new 
server.xml created at all? (Nothing is changed but the addition of the 
incorrect attribute)

Here is the exception:
Jan 29, 2005 7:30:54 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 22 column 221: Attribute "secure" was 
already specified for element "Connector".
org.xml.sax.SAXParseException: Attribute "secure" was already specified 
for element "Connector".

And here is the offending element (second attribute highlighted):
    <Connector acceptCount="100" disableUploadTimeout="true" port="8443" 
scheme="https" secure="true" sslProtocol="TLS" clientauth="false" 
maxSpareThreads="75" maxThreads="150" minSpareThreads="25" 
protocol="TLS" *secure="true"*>
    </Connector>


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


Re: Admin application creates duplicate "secure" attribute in server.xml

Posted by Jeffrey Barnett <je...@yale.edu>.
More info:
Apparently the manual change didn't fix things after all.  The server 
starts, and some webapps run, but those using ssl get the following 
error message:

Connection refused when attempting to contact <myhost>:8443

The full service definition follows:
<Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000" 
disableUploadTimeout="true" port="8085" redirectPort="8443" 
maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
    </Connector>
    <Connector acceptCount="100" disableUploadTimeout="true" port="8443" 
scheme="https" secure="true" sslProtocol="TLS" clientauth="false" 
maxSpareThreads="75" maxThreads="150" minSpareThreads="25" protocol="TLS">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3" 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" 
redirectPort="8443">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">
      <Host appBase="webapps" name="localhost" xmlValidation="true">
        <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="localhost_log." suffix=".txt" timestamp="true"/>
      </Host>
      <Logger className="org.apache.catalina.logger.FileLogger" 
prefix="catalina_log." suffix=".txt" timestamp="true"/>
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>
  </Service>

Jeffrey Barnett wrote:

> We have recently upgraded from Tomcat 4 to Tomcat 5.0.27.  Now 
> whenever we use the Admin application to alter webapp context 
> parameters the new server.xml that gets written out contains an extra 
> 'secure="true"' attribute at the end of the ssl <Connector>, which 
> causes the server to fail with a SEVERE: Parse Fatal Error on 
> restart.  Removing the extra attribute manually allows the server to 
> be started, but is operationally unacceptable.
>
> Where is the extra attribute coming from (is there a template 
> somewhere)?  How can we stop this from happening?  Why is a new 
> server.xml created at all? (Nothing is changed but the addition of the 
> incorrect attribute)
>
> Here is the exception:
> Jan 29, 2005 7:30:54 AM org.apache.commons.digester.Digester fatalError
> SEVERE: Parse Fatal Error at line 22 column 221: Attribute "secure" 
> was already specified for element "Connector".
> org.xml.sax.SAXParseException: Attribute "secure" was already 
> specified for element "Connector".
>
> And here is the offending element (second attribute highlighted):
>    <Connector acceptCount="100" disableUploadTimeout="true" 
> port="8443" scheme="https" secure="true" sslProtocol="TLS" 
> clientauth="false" maxSpareThreads="75" maxThreads="150" 
> minSpareThreads="25" protocol="TLS" *secure="true"*>
>    </Connector>
>
>
> ---------------------------------------------------------------------
> 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