Reputation: 101
I'm trying to run a Java application from eclipse with Tomcat 8, , but I have an "ERR_CONNECTION_RESET".
Server.xml
<?xml version="1.0" encoding="UTF-8"?>
<Server port="9081" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<GlobalNamingResources>
<Resource auth="Container" description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase"
pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector connectionTimeout="20000" port="8005" protocol="HTTP/1.1" redirectPort="8443" />
<Engine defaultHost="localhost" name="Catalina">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" />
</Realm>
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log" suffix=".txt" />
<Context docBase="CheExport" path="/cheexport" reloadable="true" source="org.eclipse.jst.jee.server:CheExport" />
</Host>
</Engine>
</Service>
</Server>
In console I get this error message when I try to access the url "localhost:9081/cheexport"
StandardServer.await: Invalid command 'GET / HTTP/1.1' received
I tried with Chrome and Firefox and I have the same error, while the navigation on every other page works
Upvotes: 0
Views: 3614
Reputation: 3589
You are accessing the web server via the shutdown port (this shuts down Tomcat hence the connection reset error). The listening port is 8005. Try using the url localhost:8005/cheexport
.
Otherwise, if you want to use port 9081, switch the server port and the connector port in your server.xml.
Hope this helps.
Upvotes: 2