cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Changing Tomcat Ports for Storefront

Former Member
0 Likes
1,319

Hi, I want to configure an instance of SAP Commerce to use different tomcat ports than the default, so that I can run multiple versions on my local machine.
If I set the following:
tomcat.http.port=9021
tomcat.ssl.port=9022
Then I can access the backends but not the Storefronts, either directly or via SmartEdit; i.e. https://electronics.local:9022/yacceleratorstorefront/electronics/en/
This returns "404 - Page does not exist " and redirects to the hac url.

What am I missing?

Cheers, Rob.

Accepted Solutions (0)

Answers (2)

Answers (2)

VinayKumarS
Active Contributor
0 Likes
Former Member
0 Likes

Hi VinayKumar, Tried this but still opens the hac login acreen rather then the storefront

arvind-kumar_avinash
Active Contributor
0 Likes

Please set the configuration like the following in the local.properties, perform ant build and restart the server:

 website.electronics.http=http\://electronics.local\:9021/yacceleratorstorefront
 website.electronics.https=https\://electronics.local\:9022/yacceleratorstorefront
 website.apparel-de.http=http\://apparel-de.local\:9021/yacceleratorstorefront
 website.apparel-de.https=https\://apparel-de.local\:9022/yacceleratorstorefront
 website.apparel-uk.http=http\://apparel-uk.local\:9021/yacceleratorstorefront
 website.apparel-uk.https=https\://apparel-uk.local\:9022/yacceleratorstorefront
 setup.siteoverride=true
 apiregistryservices.events.exporting=false
 
 tomcat.http.port=9021
 tomcat.ssl.port=9022
 tomcat.ajp.port=9029
 tomcat.jmx.port=9023
 tomcat.jmx.server.port=9024
 solrserver.instances.default.port=9083

For a temporary solution, you can change the configurations e.g. website.electronics.http and website.electronics.https in hAC and it will work.

If the settings mentioned above does not work, there might have occurred some issue with the initialization. Please reinitialize it and try again.

Former Member
0 Likes

I already have those settings in the local.properties file.
I've used the same approach with previous versions of SAP Commerce up to 6.7 and it has always worked.
This is occurring with the latest 1808 and 1811 versions.

I have the following:
tomcat.http.port=9021
tomcat.ssl.port=9022
tomcat.ajp.port=8029
tomcat.jmx.port=9025
tomcat.jmx.server.port=9025

solrserver.instances.default.port=8923

website.electronics.http=http://electronics.local:9021/yacceleratorstorefront
website.electronics.https=https://electronics.local:9022/yacceleratorstorefront
website.apparel-de.http=http://apparel-de.local:9021/yacceleratorstorefront
website.apparel-de.https=https://apparel-de.local:9022/yacceleratorstorefront
website.apparel-uk.http=http://apparel-uk.local:9021/yacceleratorstorefront
website.apparel-uk.https=https://apparel-uk.local:9022/yacceleratorstorefront

arvind-kumar_avinash
Active Contributor
0 Likes

I just tested it for v1811 with a slight change with the URLs (I have put a \ before 🙂 and it worked. I have updated my answer accordingly. If it still does not work, there might have occurred some issue with initialization and that can be fixed with init/update.

Please try it and let me know.

arvind-kumar_avinash
Active Contributor
0 Likes

Hi @Rob - any update on this?

Former Member
0 Likes

Hi Arvind,
Apologies for delay in coming back on this. I've applied the properties exactly as you state (copied and pasted your example)
ran ant build
started hybris server
initialized from hac
tried again .... still the same - redirects to the hac ... 😞

arvind-kumar_avinash
Active Contributor
0 Likes

Did you check your hosts file if it has electronics.local and apparel.local mapped to 127.0.0.1? When it gets redirected to hAC, do you see any error on console (command/terminal window)? Also, can you please execute ant server and try again? If none of these work, probably you need to extract the distribution zip again and try. It's not that it has not occurred to me in the past, but the last option (extract the distribution zip again and try) has worked eventually.

More info about ant server: https://wiki.hybris.com/pages/viewpage.action?spaceKey=hybrisALF&title=Ant+Server+Target+Explained

Former Member
0 Likes

Host file is all good 🙂
Nothing is written to the console 😞
I'm starting with a fresh package - so fingers crossed ...

Former Member
0 Likes

Ok, so re-build using new package has been successful - even using the exact same properties.
So not sure why the original build didn't work but I have a fully functioning installation of 1811 now.
Thanks for your help Arvind!

arvind-kumar_avinash
Active Contributor
0 Likes

Great news. You can click the Accept link below my answer to mark it as the accepted answer so that other s may refer this whole thread confidently.