GTM snippet

Wednesday, September 23, 2020

How to run two hybris instances in one machine


Run Multiple Hybris Instances in One Machine

Acceptance Criteria : Run two hybris instances in one machine at the same time.

Requirements: Any version of hybris setups which is initialized.

Steps to perform:

Step 1: Open local.properties file of config extention for first instance


Step 2: Add the following properties in it. 
  • tomcat.http.port=7001
  • tomcat.ssl.port=7002
  • tomcat.ajp.port=7109
  • tomcat.jmx.port=7003
  • tomcat.jmx.server.port=7004
  • solrserver.instances.default.hostname=localhost
  • solrserver.instances.default.port=8983
  • solrserver.instances.default.memory=512m





Step 3: Open local.properties of second instance and change the solr port. This port number should be different from the first instance.


Save both the files and do ant all.

Once Build is successful Start the server with command "hybrisserver.bat" for both the instances.

Once Servers are up for both the instances change endpoints of one instance for which we changed the solr port number.

Note: 8983 is the default port number for solr 

Step4: Run the below impex to change the endpoints of solr

# Updates the endpoints for the Solr server configurations
INSERT_UPDATE SolrEndpointUrl ; solrServerConfig(name)[unique=true] ; url[unique=true]            ; master
                              ; Default                             ; http://localhost:8984/solr  ; false 
                              ; Default                             ; https://localhost:8984/solr ; true  
                              ; Local Standalone                    ; http://localhost:8984/solr  ; false 
                              ; Local Standalone                    ; https://localhost:8984/solr ; true  
                              ; Local Cloud                         ; localhost:9983              ;       
                              
# Removes old http endpoints
REMOVE SolrEndpointUrl ; solrServerConfig(name)[unique=true] ; url[unique=true]          
                       ; Default                             ; http://localhost:8983/solr
                       ; Local Standalone                    ; http://localhost:8983/solr



Results:









No comments:

Post a Comment