Posts

Showing posts with the label server

How to know which liferay version we are using

Image
Sometimes we have to know which liferay version we are using, so how can we know? We can know the liferay version in different ways. 1. Liferay has provided some utility methods to know the which liferay version we are using , Here is the utility method ReleaseInfo.getReleaseInfo() It prints this statement " Liferay Portal Community Edition 6.2 CE GA2 (Newton / Build 6201 / March 20, 2014) " as i am using community version it shoes as CE. 2. Also we can also identify by response headers as below screenshot. If your using the chrome, right click on the browser and click inscept element , and navigate to the network  . you will see the URLS , click on the any url. 3. Also we can see during server startup as below statement Liferay Portal Community Edition 6.2 CE GA2 (Newton / Build 6201 / March 20, 2014)

Display server name or node in the cluster configuration

Image
In Cluster configuration if we want to know which cluster server we have accessed it simple. Liferay has provided a property by which we can know which cluster server we have accessed. Add the following property in the portal-ext.properties # # Set this to true to display the server name at the bottom of every page. # This is useful when testing clustering configurations so that you can know # which node you are accessing. # web.server.display.node=true If we see the internally liferay is using to get the computerName. PortalUtil.getComputerName(); Look into the portalImpl class of constructor how liferay is using to get server node name. _computerName = System.getProperty("env.COMPUTERNAME"); if (Validator.isNull(_computerName)) { _computerName = System.getProperty("env.HOST"); } if (Validator.isNull(_computerName)) { _computerName = System.getProperty("env.HOSTNAME"); } After restarting the server we can see the node ...