Thursday, January 3, 2013

OTIXO One App for all Clouds

This App looks just awesome!!

It gives you access to all your Cloud Services like - Alfresco Cloud, Amazon S3 Bucket, Dropbox, GoogleDocs/Drive, SkyDrive, Picasa, Facebook (All your Pics & Albums), Box.com and many more...



It manages all your clouds from a single login with Otixo.


One App for all Your Clouds

Access All Your Online Files with a Single Login

http://otixo.com/images/v2/index/biplane.png


Single Dashboard to access all Cloud Services
Organize, Find and Share Your Files.


http://otixo.com/images/product_splash.png


Refer links for more details:


1) http://otixo.com/
2) http://otixo.com/product



In Association with Amazon.in

Change default JMX passwords in Alfresco

How to change the default users’ passwords of JMX in Alfresco 4.0.x?

1) Stop Alfresco tomcat.
/var$ sudo /etc/init.d/tomcat6 stop

2) The default user access (For ReadOnly & ReadWrite) and password configurations are stored in
/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/alfresco-jmxrmi.access and
alfresco-/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/jmxrmi.password files.

Copy these files to tomcat/shared/classes/alfresco/extension directory.

/var$ sudo cp /var/lib/tomcat6/webapps/alfresco/WEBINF/
classes/alfresco/alfresco-jmxrmi.access /var/lib/tomcat6/shared/classes/alfresco/extension/alfresco-jmxrmi.access

/var$ sudo cp /var/lib/tomcat6/webapps/alfresco/WEBINF/
classes/alfresco/jmxrmi.password /var/lib/tomcat6/shared/classes/alfresco/extension/jmxrmi.password

Change the password for monitorRole & controlRole in
/var/lib/tomcat6/shared/classes/alfresco/extension/jmxrmi.password file.

monitorRole guestpwd123
controlRole adminpwd123

3) Add “alfresco.jmx.dir” property in /var/lib /tomcat6/shared/classes/alfresco-global.properties
file - pointing to a directory where you have copied alfresco-jmxrmi.access and
jmxrmi.password files.

### JMX Directory ###
alfresco.jmx.dir=/var/lib/tomcat6/shared/classes/alfresco/extension

4) Start Alfresco tomcat.
/var$ sudo /etc/init.d/tomcat6 start

Now, you can configure Alfresco using JMX Client (JConsole) by providing the above passwords.
Refer http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/tasks/jmx-access.html
for accessing remote Alfresco via JMX.

Make sure you have set correct port while connecting to Alfresco. The property
alfresco.rmi.services.port” defines the JMX port in alfresco-global.properties file.

### RMI service ports ###
alfresco.rmi.services.port=60601

So the JMX URL will be:
service:jmx:rmi:///jndi/rmi://<hostname>:60601/alfresco/jmxrmi

Where is the name of your host or IP address.

JMX Username: controlRole
JMX Password: adminpwd123

For more info, refer following links:
1) http://wiki.alfresco.com/wiki/JMX
2) http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/jmx-introconfig.html
3) http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/jmxenhance.html



In Association with Amazon.in

Tuesday, December 25, 2012

BrainLeg Structural Java Exception Search Engine

BrainLeg, A Structural Java Exception Search Engine.

BrainLeg is a new way for java developers to find and share solutions for java exceptions —a search engine that actually understands differences in packages and source lines, nesting of exceptions, and more...

To Search a solution for any Java Exception: 

1) Click on http://www.brainleg.com/search

2) Add the Exception Stacktrace in the Text-area,

java.lang.IllegalStateException: Could not initialize Service.
    at org.codehaus.xfire.jaxws.ServiceDelegate.(ServiceDelegate.java:77)
    at org.codehaus.xfire.jaxws.Provider.createServiceDelegate(Provider.java:32)
    at javax.xml.ws.Service.(Service.java:57)
....
Caused by: java.lang.NoSuchMethodException: com.foo.bar.client.jax.AWSECommerceService.getPortClassMap()
    at java.lang.Class.getMethod(Class.java:1605)
    at org.codehaus.xfire.jaxws.ServiceDelegate.(ServiceDelegate.java:60)
    ... 79 more

3) Hit "Search for this Stacktrace" button and you got the solution. :)

 

Friday, December 7, 2012

Store Alfresco n Tomcat logs in one dir

How to store all log files of Alfresco & Tomcat under common directory on Ubuntu?

We know that log files of Tomcat (catalina.out, localhost.log) are stored under /var/lib/tomcat6/logs directory and for Alfresco, its alfresco.log file stored under /var/lib/tomcat6 directory. We will store all logs under /var/log/tomcat6 directory.

1) Stop tomcat.
/var$ sudo /etc/init.d/tomcat6 stop

2) We can override properties in /var/lib/tomcat6/webapps/alfresco/WEBINF/classes/log4j.properties file by coping log4j.properties file to /var/lib/tomcat6/shared/classes/alfresco/extension/custom-log4j.properties file.

/var$ sudo cp /var/lib/tomcat6/webapps/alfresco/WEBINF/classes/log4j.properties

/var/lib/tomcat6/shared/classes/alfresco/extension/customlog4j.properties

Set log4j.appender.File.File=/var/log/tomcat6/alfresco.log in custom-log4j.properties file.

###### File Appender Definition #######
log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=/var/log/tomcat6/alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n

Change the ownership to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/shared/classes/alfresco/extension/customlog4j.properties

3) Edit the path for catalina.out & localhost.log in /var/lib/tomcat6/conf/logging.properties file.

1catalina.org.apache.juli.FileHandler.level = FINE
1catalina.org.apache.juli.FileHandler.directory =/var/log/tomcat6
1catalina.org.apache.juli.FileHandler.prefix = catalina.

2localhost.org.apache.juli.FileHandler.level = FINE
2localhost.org.apache.juli.FileHandler.directory = /var/log/tomcat6
2localhost.org.apache.juli.FileHandler.prefix = localhost.

Change the ownership to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/conf/logging.properties

4) Start tomcat.
/var$ sudo /etc/init.d/tomcat6 start

5) Check the log files created under /var/log/tomcat6/ directory.
/var$ tail -100f /var/log/tomcat6/catalina.out
/var$ tail -100f /var/log/tomcat6/alfresco.log

NOTE:
1) Logs related to Alfresco Web App will get stored in /var/log/tomcat6/alfresco.log file.

2) Logs related to Share Web App (If Share application is installed on same tomcat) will get stored in /var/lib/tomcat6/alfresco.log file.

3) If you want to store Share Application logs under same directory i.e. /var/log/tomcat6/ as
share.log file then, you need to edit the default file /var/lib/tomcat6/webapps/share/WEBINF/
classes/log4j.properties as there is no extension mechanism for Share App log4j.properties entries.

Edit /var/lib/tomcat6/webapps/share/WEB-INF/classes/log4j.properties file.

log4j.appender.File.File=/var/log/tomcat6/share.log

From Alfresco v4.2.a CE onwards, by default all logs for Share Application goes in a separate /var/lib/tomcat6/share.log file and for Alfresco, it goes in /var/lib/tomcat6/alfresco.log file.



In Association with Amazon.in

Configure SOLR and Alfresco to use HTTP protocol


In Association with Amazon.in

How to configure SOLR to use plain HTTP protocol instead of HTTPS for Alfresco v4.0.x on Ubuntu?

On SOLR server, which is deployed on a separate tomcat, we have to configure plain HTTP protocol in order to communicate with Alfresco server.

1) Stop Solr tomcat.
/var$ sudo /etc/init.d/tomcat6 stop

2) Delete indexes directory of each core to rebuild new indexes.

/var/alfsolr/workspace/SpacesStore is the index directory for workspace-SpacesStore core and /var/alfsolr/archive/SpacesStore is the index directory for archive-SpacesStore core.

/var$ sudo rm -rf /var/alfsolr/workspace/

/var$ sudo rm -rf /var/alfsolr/archive/

3) For each core, edit solrcore.properties file and set alfresco.port to proper HTTP port number & alfresco.secureComms=none.

/var/alfsolr/workspace-SpacesStore/conf/solrcore.properties &
/var/alfsolr/archive-SpacesStore/conf/solrcore.properties files.

# Top level directory path for the indexes managed by Solr.
data.dir.root=/var/alfsolr

# Alfresco hostname
alfresco.host=api.alfresco.com

# Alfresco HTTP port
alfresco.port=8080

# Alfresco HTTPS port
alfresco.port.ssl=8443

# Value can be https or none
alfresco.secureComms=none

Change the ownership of each file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/alfsolr/workspace-SpacesStore/conf/solrcore.properties

/var$ sudo chown tomcat6:tomcat6 /var/alfsolr/archive-SpacesStore/conf/solrcore.properties

4) Now, Alfresco will talk over plain HTTP protocol with Solr. So, comment the specification of the connector on port 8443 in /var/lib/tomcat6/conf/server.xml file.

< !-- Comment below code -- >
< !--
< Connector
port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
SSLEnabled="true" maxThreads="150" scheme="https"
keystoreFile="/var/alfsolr/keystore/ssl.keystore"
keystorePass="kT9X6oe68t" keystoreType="JCEKS"
secure="true" connectionTimeout="240000"
truststoreFile="/var/alfsolr/keystore/ssl.truststore"
truststorePass="kT9X6oe68t" truststoreType="JCEKS"
clientAuth="false" sslProtocol="TLS"
allowUnsafeLegacyRenegotiation="true" maxSavePostSize="-1"
/ >
-- >

Change the ownership of file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/conf/server.xml

5) Comment/Remove the following user in /var/lib/tomcat6/conf/tomcat-users.xml file.

< !--
< user
username="CN=Alfresco Repository, OU=Unknown, O=Alfresco
Software Ltd., L=Maidenhead, ST=UK, C=GB" roles="repository"
password="null"
/ >
-- >

Change the ownership of file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/conf/tomcat-users.xml

6) Comment/Remove the following configuration in /var/lib/tomcat6/webapps/solr/WEBINF/web.xml

< !--
< security-constraint >
< web-resource-collection >
< url-pattern >/*</ url-pattern >
</ web-resource-collection >
< auth-constraint >
< role-name >repository</ role-name >
</ auth-constraint >
< user-data-constraint >
< transport-guarantee >CONFIDENTIAL</ transport-guarantee >
</ user-data-constraint >
</ security-constraint >
< login-config >
< auth-method >CLIENT-CERT</ auth-method >
< realm-name >Solr</ realm-name >
</ login-config >
< security-role >
< role-name >repository</ role-name >
</ security-role >
-- >

Change the ownership of file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/webapps/solr/WEBINF/web.xml

Next, we need to configure Alfresco server, which is deployed on a separate tomcat to communicate over plain HTTP protocol with SOLR server.

1) Stop Alfresco tomcat.
/var$ sudo /etc/init.d/tomcat6 stop

2) Edit following properties in /var/lib/tomcat6/shared/classes/alfresco-global.properties file.

### Alfresco properties ###

#Alfresco hostname
alfresco.host=api.alfresco.com

#HTTP port number
alfresco.port=8080

#Value can be http or https
alfresco.protocol=http

### Solr indexing ###

# Absolute Path to your keystore directory for configuring Alfresco to talk to SOLR
# This will not be used for HTTP communication. Comment this property.
#dir.keystore=/var/alfsolr/keystore

# The subsystem type value. Value is either solr or lucene.
index.subsystem.name=solr

# Solr hostname.
solr.host=solr.alfresco.com

# Solr HTTP port.
solr.port=8080

# Solr HTTPS port.
solr.port.ssl=8443

# Value can be https or none.
solr.secureComms=none

Change the ownership of file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/shared/classes/alfresco-global.properties

3) Comment the specification of the connector on port 8443 in /var/lib/tomcat6/conf/server.xml file.

< !--
< Connector
port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
SSLEnabled="true" maxThreads="150" scheme="https"
keystoreFile="/var/alfresco/alf_data/keystore/ssl.keystore"
keystorePass="kT9X6oe68t" keystoreType="JCEKS"
secure="true" connectionTimeout="240000"
truststoreFile="/var/alfresco/alf_data/keystore/ssl.truststore"
truststorePass="kT9X6oe68t" truststoreType="JCEKS"
clientAuth="false" sslProtocol="TLS"
allowUnsafeLegacyRenegotiation="true" maxSavePostSize="-1"
/ >
-- >

Change the ownership of file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/conf/server.xml

4) Comment/Remove the following user in /var/lib/tomcat6/conf/tomcat-users.xml file.
< !--
< user
username="CN=Alfresco Repository Client, OU=Unknown, O=Alfresco
Software Ltd., L=Maidenhead, ST=UK, C=GB" roles="repoclient"
password="null"
/ >
-- >

Change the ownership of file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/conf/tomcat-users.xml

5) Comment/Remove the following configuration in /var/lib/tomcat6/webapps/alfresco/WEBINF/web.xml

< !--
< security-constraint >
< web-resource-collection >
< web-resource-name >SOLR</ web-resource-name >
< url-pattern >/service/api/solr/*</ url-pattern >
</ web-resource-collection >
< auth-constraint >
< role-name >repoclient</ role-name >
</ auth-constraint >
< user-data-constraint >
< transport-guarantee >CONFIDENTIAL</ transport-guarantee >
</ user-data-constraint >
</ security-constraint >
< login-config >
< auth-method >CLIENT-CERT</ auth-method >
< realm-name >Repository</ realm-name >
</ login-config >
< security-role >
< role-name >repoclient</ role-name >
</ security-role >
-- >

Change the ownership of file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/webapps/alfresco/WEBINF/web.xml

6) Start Alfresco tomcat server.
/var$ sudo /etc/init.d/tomcat6 start

7) After Alfresco server is up, start tomcat server that has Solr Web Application deployed on a separate Ubuntu box.
/var$ sudo /etc/init.d/tomcat6 start

For more info, refer following links:
1) http://wiki.alfresco.com/wiki/Alfresco_And_SOLR
2) http://wiki.alfresco.com/wiki/Alfresco_Solr_Demo_Script



In Association with Amazon.in

Add separate logs for Solr in Alfresco

How to add a separate log file for Solr Web App in Alfresco v4.0.x?

We have to separate logs of SOLR Web App from Alfresco such that, all the logs of SOLR will get store in a separate solr.log file.

1) Stop Solr tomcat.
     /var$ sudo /etc/init.d/tomcat6 stop

2) We need to create /var/alfsolr/logs directory for SOLR Web App to store all log files 
     and make it accessible to tomcat6 user.

    /var$ sudo mkdir -p /var/alfsolr/logs

   Change the ownership of directory to tomcat6 for user & group.
   /var$ sudo chown tomcat6:tomcat6 /var/alfsolr/logs

3) Add a new handler for SOLR in /var/lib/tomcat6/conf/logging.properties file.

#Adding a new handler for SOLR to the list of handlers.
handlers = 1catalina.org.apache.juli.FileHandler, . . . , 3localhost.org.apache.juli.FileHandler

# Handler specific properties.
3localhost.org.apache.juli.FileHandler.level = FINE
3localhost.org.apache.juli.FileHandler.directory = /var/alfsolr/logs
3localhost.org.apache.juli.FileHandler.prefix = solr.

#Set logger level
org.apache.solr.level=INFO
org.apache.solr.handlers=3localhost.org.apache.juli.FileHandler

Change the ownership of file to tomcat6 for user & group.
/var$ sudo chown tomcat6:tomcat6 /var/lib/tomcat6/conf/logging.properties

4) Start Solr tomcat.
     /var$ sudo /etc/init.d/tomcat6 start

5) Check the log file (solr.YYYY-MM-DD.log) created under /var/alfsolr/logs/ directory.
    /var$ tail -100f /var/alfsolr/logs/solr.2012-12-05.log

INFO: Deploying configuration descriptor solr.xml
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
locateSolrHome
INFO: Using JNDI solr.home: /var/alfsolr
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
INFO: Solr home set to '/var/alfsolr/'
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/var/alfsolr/lib/commons-collections-3.1.jar' to
classloader
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/var/alfsolr/lib/antlr-3.3-complete.jar' to
classloader
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/var/alfsolr/lib/saxpath.jar' to classloader
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/var/alfsolr/lib/chemistry-opencmis-test-tck-
0.6.0.jar' to classloader
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/var/alfsolr/lib/tika-parsers-1.1-20111128.jar' to
classloader
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/var/alfsolr/lib/hibernate-3.2.6-patched.jar' to
classloader
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/var/alfsolr/lib/chemistry-opencmis-client-bindings-
0.6.0.jar' to classloader
Dec 5, 2012 6:10:34 PM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/var/alfsolr/lib/lucene-analyzers-2.4.1.jar' to
classloader