Alfresco start error : internal error: ObjID already in use

You may come across below error. That happens due to hostname which does not resolved through any IP.




Solution: Make hosts file entry so that your hostname resolves IP address of your IP address.
filename: /etc/hosts


Alfresco Certificate Error javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException

This post applies to Alfresco 4. When we install Alfresco and start it, it shows error in catalina.out as shown below.

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1699)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1206)
...
Caused by: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
        at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:289)
        at sun.security.validator.PKIXValidator.doValidate(PKIXValidator.java:263)

Alfresco ships with certificates which are already created, but when you install it has already reached expiration limit.

So below steps will help you to regenerate SSL certificate for Alfresco.

1. First download script to generate SSL certificate from here.
2. Keep this file in alfresco-4.0.1/alf_data/keystore folder.
3. Make it executable using below command.
chmod a+x generate_keystores.sh
4. You may need to change "ALFRESCO_HOME" and other parameters in that script based on your alfresco directory structure.
5. Now run that script file using below command.
sh generate_keystores.sh

Once you run that script, it will restart Alfresco then will ask you to provide details to generate new SSL certificate. Once done with certificate creation, you can start alfresco with valid certificate.

Liferay 6.1 Cluster Configuration using Multicast

Prerequisites
- liferay-portal-tomcat-6.1.20-ee-ga2-20120731110418084.zip
- ehcache-cluster-web-6.1.20.1-ee-ga2-20120731110418084.war
- liferay-portal-src-6.1.20-ee-ga2-20120731110418084.zip
- 2 Linux nodes with JDK installed
- Liferay Cluster License
- Firewall should be off in both nodes


Follow below steps for Liferay 6.1 EE GA2 Cluster Configuration

1. Extract liferay-portal-tomcat-6.1.20-ee-ga2-20120731110418084.zip in /opt/ in both nodes. Rename extracted directory name to liferay. (ex: /opt/liferay)
2. Create portal-ext.properties file in /opt/liferay in both nodes and add below cluster related properties. Both Liferay nodes should be pointing to single Database.


net.sf.ehcache.configurationResourceName=/myehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/myehcache/liferay-multi-vm-clustered.xml

cluster.link.enabled=true
lucene.replicate.write=true
ehcache.cluster.link.replication.enabled=true
web.server.display.node=true
org.quartz.jobStore.isClustered=true

3. Add jvmRoute parameter in both node's /opt/liferay/tomcat-7.0.27/conf/server.xml file.
before:
<Engine name="Catalina" defaultHost="localhost" >
After:
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">

note: here in node1 we are using jvm1 as jvmRoute. But in node2 you should use jvm2 as jvmRoute.

4. Now add below cluster snippet in tomcat/conf/server.xml file.

5. Now Add <distributable/> in /opt/liferay/tomcat-7.0.27/webapps/ROOT/WEB-INF/web.xml before </web-app>.

6. Now extract below two files from liferay-portal-src-6.1.20-ee-ga2-20120731110418084/portal-impl/src/ehcache. And add these files at /opt/liferay/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/myehcache folder.

liferay-multi-vm-clustered.xml
hibernate-clustered.xml

7. Now start both Liferay nodes.

Configuration at Web server.

Here I assume that you have configured mod_jk module with Apache. So I have shown load balancer configuration of worker.properties file only.
You can mount it using below command.
JkMount /* loadbalancer

mess up indent when paste clipboard content in Putty

Finally I found a good solution. It was really frustrating when we copy xml file content from Notepad or Notepad++ and paste it into Putty. You will see each and every line is messed up you have paste in putty. Till the time I got the solution, I used to indent it manually. See below screenshot, the lines are not indent when I paste content of xml file into remote terminal in Putty.


Now I followed below steps to make it indent properly.

Step1 : Paste content in putty wherever you want. You will see content is not indented.


Step2: Now press Esc to go out of "Insert" mode in Putty. Now press "gg" to go to beginning of file in Putty.
Step3: Now press "=".
Step4: Now press Shift+g.

Done.

It should indent all lines as shown in below screen.