I change the port following this link https://confluence.atlassian.com/display/STASH/Changing+the+port+that+Stash+listens+on, but both the two link http://stash_visit_url.com and http://stash_visit_url.com:7990 can't be visited.
I changed the server.xml like following
<Server port="80" shutdown="SHUTDOWN"> <!-- Security listener. Documentation at /docs/config/listeners.html <Listener className="org.apache.catalina.security.SecurityListener" /> --> <!--APR library loader. Documentation at /docs/apr.html --> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <!-- Prevent memory leaks due to use of particular java/javax APIs--> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <!--Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /--> <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html --> <GlobalNamingResources> <!-- 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> <!-- A "Service" is a collection of one or more "Connectors" that share a single "Container" Note: A "Service" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/service.html --> <Service name="Catalina"> <!--The connectors can use a shared executor, you can define one or more named thread pools--> <!-- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4"/> --> <!-- 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 7990 If you change this port, you have to update scripts.cfg as well to have the same port configuration. --> <Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" useBodyEncodingForURI="true" redirectPort="8443" compression="on" compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" />
Hi Bin,
Try to change the Connector port to 7990, restart Stash and then try to access this: <stash-url>:7990
Also make sure you don't have any firewall blocking the port number that you are trying to reach.
Hope this helps.
Regards,
Renato Rudnicki
Two things might be at play here, and I'd highly suggest checking the logs for specific errors, but:
Firstly on the first line, your config appears slightly off.
<Server port="80" ...>
Should instead, be left as is, being:
<Server port="8006" ...>
The documentation says "Free port", but unless 8006 is being used by another service, it can stay as is. It isn't used by the end-users.
Secondly, for the Connector port, which is in the <Connector...> part of the config file, this is where the user-facing port is defined. Port 80 on most machines are protected from being used by non-root users, so if you're running as a non-root user you might want to look at doing a port forward instead. I'd try switching Server port back and seeing if the service runs.
See the section "Using a reverse proxy for Stash" on https://confluence.atlassian.com/display/STASH/Proxying+and+securing+Stash for more information on how to do that, without running Stash as root.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.