Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat Setup Error when changing port

Tags:

tomcat

I'm setting up Tomcat server on my Mac. With the default port 8080 , the tomcat server started fine. But when i changed the port to 9999, I get the below error

 org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 70 column 21: Open quote is expected for attribute "{1}" associated with an  element type  "port".
org.xml.sax.SAXParseException: Open quote is expected for attribute "{1}" associated with an  element type  "port".
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)

Below is my server.xml file

  <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL HTTP/1.1 Connector on port 8080
    -->
    <Connector port=“9999” protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL HTTP/1.1 Connector on port 8443
         This connector uses the BIO implementation that requires the JSSE
         style configuration. When using the APR/native implementation, the
         OpenSSL style configuration is required as described in the APR/native
         documentation -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />
    -->

Use the following command to run tomcat

./catalina.sh run

like image 953
user99322 Avatar asked Jun 28 '14 11:06

user99322


1 Answers

That is easy ... please open this file in Notepad only .. there is a difference between the quote that u have used and the quote that Tomcat expects.

What it wants is this port="9999" And used a different quote port=“9999” Please see the difference in quote.

like image 129
Oliver Avatar answered Sep 22 '22 19:09

Oliver