Question

The default port is http://localhost:9001.

How do I run the hybris platform using another port?

Was it helpful?

Solution 2

Create a /config/local.properties file with this content:

tomcat.http.port=9101 
tomcat.ssl.port=9102 
tomcat.ajp.port=8109
tomcat.jmx.port=9103 
tomcat.jmx.server.port=9104

Then you'll get Hybris server to run on http://localhost:9101.

OTHER TIPS

Edit your {HYBRIS_ROOT_DIR}/config/local.properties file and use the following properties to configure the various ports:

tomcat.http.port=9001
tomcat.ssl.port=9002
tomcat.ajp.port=8009
tomcat.jmx.port=9003
tomcat.jmx.server.port=9004

You can find the complete configuration reference on the Hybris wiki here: https://wiki.hybris.com/display/release5/Configuration+Properties+Reference

In order for the changes to be applied you must run ant and restart Hybris.

You can run ant all, but if you have only changed the configuration you can deploy these changes without having to re-compile by using ant deploy which is much faster.

If you change the port, make sure you update the spring security port-mappings (should be already using the configuration service and these properties via Spring EL to do this if you're on a recent version of hybris), and, for local development, the site URL resolution (website.<x>.http(s), media.<x>.http(s)) properties and the CMS Site URL mapping regular expressions (ImpEx or hMC). There's also a property for jvdbc I think.

You can change these in the config/local.properties, platform/project.properties or a custom extension's project.properties. The local.properties file has the highest priority (if the property is defined in multiple places), then the custom extension's project.properties, and finally in the platform's project.properties.

You can use this as well

hybris.instance.id=60
tomcat.http.port=9${hybris.instance.id}1
tomcat.ssl.port=9${hybris.instance.id}2
tomcat.jmx.port=9${hybris.instance.id}3
tomcat.debug.port=9${hybris.instance.id}0
tomcat.jmx.server.port=9${hybris.instance.id}4
tomcat.ajp.port=9${hybris.instance.id}5

In addition to the above configuration provided by Zathrus Writer. You might have to add the solr port configuration to have say two instances of hybris running in the same server.

solrserver.instances.default.port=8986

Full configuration:

tomcat.http.port=9201
tomcat.ssl.port=9202
tomcat.ajp.port=8209
tomcat.jmx.port=9203
tomcat.jmx.server.port=9204
solrserver.instances.default.port=8986

Override port configurations in {HYBRIS_ROOT_DIR}/config/local.properties file.

tomcat.http.port=9011
tomcat.ssl.port=9012
tomcat.ajp.port=8019
tomcat.jmx.port=9013
tomcat.jmx.server.port=9014

In addition to the port we can also override xmx values of JVM in tomcat.generaloptions configurations in config/local.properties as listed below.

tomcat.generaloptions=-Xmx6G -XX:MaxPermSize=300M -ea -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true -Djava.endorsed.dirs="%CATALINA_HOME%/lib/endorsed" -Dcatalina.base=%CATALINA_BASE% -Dcatalina.home=%CATALINA_HOME% -Dfile.encoding=UTF-8 -Dlog4j.configuration=log4j_init_tomcat.properties -Djava.util.logging.config.file=jdk_logging.properties -Djava.io.tmpdir="${HYBRIS_TEMP_DIR}"

In addition, you may face with another port issue cause debug port. You should also change it.

Please use;

tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8001,suspend=n

As SAP Hybris runs on tomcat server, we can run as many servers as needed simultaneously based on our memory.
We need to configure in config/local.properties

  • To run tomcat in different port

tomcat.http.port=6001
tomcat.ssl.port=6002
tomcat.ajp.port=6009
tomcat.jmx.port=6003
tomcat.jmx.server.port=6004
os.rmiregistry.port=3198

website.electronics.http=http://electronics.local:6001/yacceleratorstorefront
website.electronics.https=https://electronics.local:6002/yacceleratorstorefront
website.apparel-de.http=http://apparel-de.local:6001/yacceleratorstorefront
website.apparel-de.https=https://apparel-de.local:6002/yacceleratorstorefront
website.apparel-uk.http=http://apparel-uk.local:6001/yacceleratorstorefront
website.apparel-uk.https=https://apparel-uk.local:6002/yacceleratorstorefront
website.powertools.http=http://powertools.local:6001/yb2bacceleratorstorefront
website.powertools.https=https://powertools.local:6002/yb2bacceleratorstorefront

  • To Run Solr in separate port

solrserver.instances.default.port=6983

  • To have debug in separate port

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top