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

Backoffice not stable when opened from two Hybris instances on the same machine

arvind-kumar_avinash
Active Contributor
0 Likes
627

I configured two instances of Hybris in my laptop (Mac) for some testing. One of them is using default ports settings while the second one has been configured with the following ports:

 tomcat.http.port=7001
 tomcat.ssl.port=7002
 tomcat.ajp.port=7009
 tomcat.jmx.port=7003
 tomcat.jmx.server.port=7004
 solrserver.instances.default.port=7983 

I found both the Hybris instances running fine simultaneously except when I try to access backoffice from both the instances in parallel. When I am already logged in with admin/nimda using https://localhost:9002/backoffice/ in one tab of the browser and try to login with admin/nimda using https://localhost:7002/backoffice/ in another tab of the browser, either one or both of them get logged out. Accessing only one of them at a time does not cause any issue. It is only when I try to access both of them in parallel, they behave weirdly.

Has anyone else experienced this issue? If yes, please share if there is a workaround.

Accepted Solutions (1)

Accepted Solutions (1)

andyfletcher
Active Contributor
0 Likes

It's because your session cookie (and session fixation cookie) is stored against the localhost domain. Login to the first one all is fine. Login to the second and it gives you a new JSESSIONID. Now trying to use the first again doesn't know about that session so it logs you out and gives you a new session id, which won't work on the 2nd one.... and so on.

Just access one on https://localhost:9002/backoffice and the other on https://127.0.0.1:9002/backoffice or add some extra aliases for 127.0.0.1 to your hosts files.

arvind-kumar_avinash
Active Contributor
0 Likes

Thanks, . It worked! I am able to access one with https://127.0.0.1:9002/backoffice and the other one with https://localhost:7002/backoffice/ in different tabs of the same browser in parallel.

Answers (0)