Friday, February 18, 2011

Liferay 6: Deployment/Undeployment with Ext plugins environment

I have always liked the concept of plug-in in Liferay but using the ext environment as plug-in in Liferay 6 seems to be a little bit painful and time taking. It will need you to restart tomcat a couple of times if you are working in service files. The original  post which i used here for reference documents everything.  I am copying it here so that i can recall it in future. However i am listing below the major steps followed in the original post.
  1. Stop the tomcat.
  2. Remove ext plug-in related jars in @temp folder of your tomcat instance @temp\liferay\com\liferay\portal\deploy\dependencies
  3. Remove ext plug-in related jars from ROOT/WEB-INF/lib/
  4. Remove xml for ext plug-in from ROOT/WEB-INF/
  5. Remove service jar from @tomcat/lib/ext related to plug-in
  6. Start tomcat  and deploy updated plug-in war while tomcat is running, You will see a message like  "You must reboot the server and redeploy all other plugin". 
  7. Now stop the tomcat and restart it again for the global jars to take effect. And you are ready to go
In the original post you will see the bat script which can be quite handy.

Saturday, February 12, 2011

Too Many open files in Alfresco

This is related to facing the situation where alfresco deployed in UNIX environment gives the error of "Too Many Opened Files". This is more often related to File handles and Lucene. UNIX systems is configured by default to allow users a maximum of only 1024 open file handles, which is often not sufficient for the file structure used by the indexes. Thus while setting up Alfresco on UNIX do the following check and configuration to get over this issue.

 Verify that the global settings for maximum number of file handles is large enough.
As a user used to run Alfresco run :
ulimit -n

You can check the number of open files allowed per user with the command

cat /proc/sys/fs/file-max

This gives the number of file handles that can be opened by user at a time.
To increase this number, go to/etc/security/limits.conf file in edit mode and the below lines
username soft nofile 4096
username hard nofile 65536

where username is the name of user to run Alfresco.

And finally restart your Alfresco for the changes to become active.

Check the original issue here.

Other references
http://www.xenoclast.org/doc/benchmark/HTTP-benchmarking-HOWTO/node7.html
http://ironman.darthgibus.net/?tag=too-many-open-files