cancel
Showing results for 
Search instead for 
Did you mean: 

How to start multiple hybirs locally.

SAPSupport
Employee
Employee
0 Kudos

Dear teams.

I would like to hear about local hybris.
I'm trying to start a local server in a thin client environment, but the following error occurs due to the structure of the thin client environment.

・Address already in use: bind

The way a thin client works is that one Windows is shared by multiple people.
Since one Windows is shared by multiple people, I think that when each person tries to start hybris, they cannot start it because the port is already in use.
I think this can be avoided if the person sharing the windows can change the port number used by hybris. Is there a way to change the local hybris port number?
Or if there is any other workaround, could you please let me know?


------------------------------------------------------------------------------------------------------------------------------------------------
Learn more about the SAP Support user and program here.
View Entire Topic
andyfletcher
Active Contributor

If you have a look in hybris/bin/platform/project.properties you'll find commented properties about which ports are set. Generally the 3 you want to set to avoid collisions are

tomcat.http.port
tomcat.ssl.port
tomcat.ajp.port

Set them in each developer's local.properties

You need to run ant afterwards because it uses these properties to generate the Tomcat server.xml that defines the connectors.

You can avoid having to set tomcat.ajp.port by commenting out / removing the line

${tomcat.connectors.ajp.plain}

in hybris/config/tomcat/conf/server.xml (the template from which the running server.xml is generated)
AJP is only useful if you're putting Apache HTTPD in front of Tomcat. If the value of tomcat.ajp.port is unset then it wouldn't add the AJP connector but unfortunately at some point SAP added a default value for this setting in the platform project.properties so you can't unset it.

You also need to consider if your developers want to run the server in debug mode which also needs a unique port. You need to update the setting below and value of the address property from 8000 to something unique

tomcat.debugjavaoptions=-Djava.locale.providers=COMPAT,CLDR -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n

Again, run ant after changing this.

Spoiler
ant deploy or ant server is the minimum you need to run or just ant or ant all will work but run a build too.