Wednesday, April 13, 2011

Dropbox Error in Ubuntu 10.04

I have been using Dropbox to store my documents safe over online, syncing with my local file system (Ubuntu 10.04 Operating System - 32 bit). Recently it stopped initializing during the startup, where it was working perfectly earlier times. The error message stated, "Couldn't start Dropbox - This is usually because of a permission errors. Errors can also be caused by your home folder being stored on a network share. Please contact support with the following information for more help: /tmp/dropbox_error3aMj4F.txt"

So I opened the file, 
pid:    2283
ppid:    2261
uid:    1000
user_info:    ('pradeeban', 'x', 1000, 1000, 'pradeeban,,,,', '/home/pradeeban', '/bin/bash')
effective_user_info:    ('pradeeban', 'x', 1000, 1000, 'pradeeban,,,,', '/home/pradeeban', '/bin/bash')
euid:    1000
gid:    1000
egid:    1000
group_info:    ('pradeeban', 'x', 1000, [])
effective_group_info:    ('pradeeban', 'x', 1000, [])
appdata:    u'/home/pradeeban/.dropbox'
    mode=040755    uid=1000    gid=1000
parent    mode=040755    uid=1000    gid=1000
dropbox_path:    u'/home/pradeeban/Dropbox'
    mode=040755    uid=1000    gid=1000
parent    mode=040755    uid=1000    gid=1000
HOME:    /home/pradeeban
tempdir:    '/tmp'
    mode=041777    uid=0    gid=0
parent    mode=040755    uid=0    gid=0
Traceback (most recent call last):
  File "__main__dropbox__.py", line 699, in main_startup
  File "__main__dropbox__.py", line 419, in run
AssertionError: Wrong build of Dropbox (9 vs 14 needed)

Googling the last 3 lines gave me the solution.
pradeeban@pradeeban-laptop:~$ dropbox stop
Dropbox isn't running!
pradeeban@pradeeban-laptop:~$ dropbox status # Should report "not running"
Dropbox isn't running!
pradeeban@pradeeban-laptop:~$ rm -r ~/.dropbox-dist/
pradeeban@pradeeban-laptop:~$ dropbox start -i
Starting Dropbox...
Dropbox started initializing fine during the start-up and also worked perfectly after that.

Sunday, April 10, 2011

Retina India and WWW2011India

WWW2011 Conference (20th International World Wide Web Conference) was held at HICC (Hyderabad International Convention Centre), Hyderabad, India 28th of March - 1st of April. Chathuri and myself from WSO2 attended the conference as delegates. It was a remarkable trip to Bangalore (26th & 27th, March 2011) and Hyderabad (28th March - 2nd of April 2011).

We attended the 2nd International Workshop on RESTful Design (WS-REST 2011 - 28th March: Proceedings), the 1st International Workshop on Social Media Engagement (SoME 2011 - 29th March), Dev Track – [Mostly Cloud Computing] (30th and 31st, March), and a paper presentation on a few Research Papers on the final day (Information Credibility, Web Applications, and Monetization). Key note speeches were given by Dr. A. P. J. Abdul Kalam (Scientist and ex-president of India), Sir Tim Berners-Lee (The inventor of the world wide web), and Christos H. Papadimitriou (Professor of Computer Science at UC Berkeley).

There were booths, posters, and exhibits as well. Google, Yahoo!, InfoSys, Tata Consultancy Services, ApnaCircle, Zoho, IET, and some other companies/organizations had their booths during the conference days. But one booth grabbed special attention from most of us. It was the booth from Retina India.

"Retina India is an umbrella organization of people with retinal disorders, their families and friends, which brings them on a common platform with experts such as physicians, researchers, counselors, low vision and mobility experts, and other specialists, such that there is a cohesive focus towards increasing awareness of retinal diseases in society as well as about the people who get affected by them, and inducing innovative research and treatment efforts for such diseases."

It was so impressing and motivating to listen to Mr.L.Subramani, who is a differently abled journalist also a trustee for the organization. He did a small presentation after the social event - a Kuchipudi (తెలుగు : కూచిపూడి) dance (The cultural dance of Andhra Pradesh in India) series from Yamini Reddy and team. We were also able to talk to him in person at the booth of RetinaIndia. His message was clear. It asked the *normal* people to open their eyes. It also had the strong power and message. He invited the developers of the web sites and applications to consider the accessibility aspect of the programs. He pointed out that many applications consider the accessibility by differently abled persons (specially people with vision problems, partial or full blindness), but not many web sites. His suggestion is to involve the differently abled people in the development of the sites and the applications, such that they will be able to take part in shaping up the accessibility of the products.

Retina India became the highlight of the event obviously. I strongly believe their vision will be successful not just in India, but all over the globe. May God bless the good hearts.

As a point to note: WWW2012 will be held at Lyon, France.

Wednesday, April 6, 2011

Localizing WSO2 Carbon based products

WSO2 Middleware Products and Services
WSO2 Carbon, is by design, an internationalized (i18n) platform, hence making all the products and services that are built on top of Carbon ready to be localized to any language of your choice. Users have shown interest and have also localized WSO2 products in Chinese, Sinhala, and some other languages to a considerable extent.

Componentized Architecture
WSO2 Carbon with its modular architecture, is made of components. You can either build the Carbon core and pick whatever the components you need and integrate them into your Carbon build, making a customized product of your choice, or you can simply pick on of the products, let it be Appserver, ESB, Mashup Server, from the list of products and build it from the profiles, as we have products well packed for the need of a software architect.

Getting the Product/Service
Now you have two choices, based on your requirements. If you are going to just use the WSO2 products, you can simply download and use the  binaries or download the released sources for the respective product and build the product using Maven, if you are a fan of building from the code.  But you may prefer to build WSO2 Products from the source repositories (svn) as well, if you want to build customized products, learn the complex code base of WSO2 Carbon, extend WSO2 Carbon or Stratos (WSO2 Carbon Platform Middleware as a Service), have the desire to use the technology in its bleeding edge, or OEM WSO2 products where you can get the commercial support from the WSO2 experts for your organization.

Localization ~ From the source
Now let's come to the localization. Say you want to use a WSO2 Product with the user interface in your language. For that, you have to localize the Resources.properties and JSResources.properties files in locations like carbon/components/stratos/tenant-mgt/org.wso2.carbon.tenant.mgt.ui/src/main/resources/org/wso2/carbon/tenant/mgt/ui/i18n, when coming to localize the source, even before building.

Localization ~Not a mere dream
But obviously what users choose is to localize the product binaries. Internationalization in WSO2 Carbon is done in such way so that by putting a single bundle, all text every where can be replaced. There is no manual work involved. If someone wants to introduce a new locale, just create a bundle containing all converted text, deploy & that's it.

eg: If you want to localize Component manager & User Manager to Spanish, here is what you need to do.

Create a OSGi bundle with following properties files in given folder hierarchy.

src/main/resources/org/wso2/carbon/component/mgt/core/Resources_es.properties
src/main/resources/org/wso2/carbon/userstore/ui/i18n/Resources_es.properties

Build the bundle & deploy feature. Now by changing the user interface language from the browser or system (based on your operating system), you should be able to see Carbon running in the chosen language.

And, if you need to localize every text, you just put all the resource files from every component into the above bundle. By design, we have followed the correct packaging. Hence, resource file from one component will not get replaced with another.

After localizing the relevant .properties files (basically changing the value string from English to Spanish, in the key=string pair in the relevant files), start (or restart if it is already started) WSO2 Stratos Manager. You can see the WSO2 Stratos Manager running in the Spanish (or whatever the localized language) interface.

Image 1: Stratos Manager - Interface in Spanish
submit.tenant=Enviar Inquilino
domain=Dominio
domain.information=Inf. de dominio
contact.details=Datos de contacto
admin.username=Admin Usuario
current.admin.password=actual contraseña del administrador
new.admin.password=Nueva contraseña del administrador
new.admin.password.repeat=Nueva contraseña del administrador (Repetición)
admin.password=Contraseña del administrador
admin.password.repeat=Contraseña del administrador (Repetición)
govern.add_tenants.menu=Añadir un nuevo inquilino
govern.view_tenants.menu=Ver los inquilinos
overview=Información general
tenants.list=Lista de Inquilinos
company.organization=Empresa/Organización
admin.contact=Contacto Administrativo
edit=Editar
multitenancy=Multiusuario
added.successfully=Ha agregado un nuevo inquilino con el dominio:
updated.successfully=Ha actualizado correctamente el inquilino con el dominio:
update.added.tenant=Actualizar la acaba de agregar/inquilino actualizada
update.tenant=Actualizar Inquilino
add.new.tenant=Añadir un nuevo inquilino
register.new.organization=Crear una nueva organización
view.all.tenants=Ver todos los inquilinos
tenant.admin=Inquilino Admin
tenant.description=Descripción Inquilino
admin.fullname=Nombre completo
admin.firstname=Nombre
admin.lastname=Apellido
admin.address=Dirección
admin.email=Correo electrónico
admin.telephone=Teléfono
admin.im=IM
admin.url=URL
self.registration=Registro de Inquilinos
gaas=GaaS
gaas.register.a.new.tenant=Crear un nuevo inquilino
active=Activo
theme.management=Tema de Gestión
word.verification=Verificación de la palabra
captcha.message=Escriba los caracteres que ves en la imagen de abajo.

created.date=Fecha de creación

Saturday, March 19, 2011

Amazon ELB HTTPS Stickiness

Stickiness is needed in most of the complex applications when scaled up in cloud. Say one user logs in. Now his information should be attached to him. If not, each time, he would be routed to a random instance, which will not identify him. Attaching a session id would provide the stickiness, where a particular user can be forwarded to the particular instance. 

I tried using amazon elb-api commands using terminal to enable stickiness for the elastic load balancer. it gave error when trying to apply the stickiness for the port 443, and works fine for 80.

Create Stickiness Policy
pradeeban@pradeeban:~/pem$ elb-create-app-cookie-stickiness-policy wso2cloud1-as -p my-app-cookie-lb-policy -c jsessionid -K KEY.pem -C CERT.pem
OK-Creating App Stickiness Policy

Setting the Policy to the Listener - Fails for port 443
pradeeban@pradeeban:~/pem$ elb-set-lb-policies-of-listener wso2cloud1-as --lb-port 443 --policy-names my-app-cookie-lb-policy -K KEY.pem -C CERT.pem
elb-set-lb-policies-of-listener: Service error: aws:Client.InvalidConfigurationRequest AWSRequestId:4b2c7fc3-4fbf-11e0-a778-d17858cabec6

Setting the Policy to the Listener - Works for port 80
pradeeban@pradeeban:~/pem$ elb-set-lb-policies-of-listener wso2cloud1-as --lb-port 80 --policy-names my-app-cookie-lb-policy -K KEY.pem -C CERT.pem
OK-Setting Policies

So it seemed, it was an issue with https/stickiness from the amazon's end. It was not giving any error when tried with amazon management console nevertheless, but simply not allowing to enable stickiness for the listener with the tcp protocol.

It works for --lb-port 80 --lb-port 443, but not for --lb-port 443 --lb-port 80 (since it picks the first entry only, it seems).

Tried the same with elb-create-lb-cookie-stickiness-policy (elb controlled stickiness) and the results was same.

So I felt, https/stickiness is not working for both application based or amazon elb based cookies, while it works for http.


But Amazon announced in Oct, 2010 that they have started supporting HTTPS stickiness.


I reported this in AWS forum, but later found that it (Setting stickiness policy) works. What we had to change was the protocol to https from tcp for the port 443. :)

--listener "lb-port=443,instance-port=9443,protocol=https"

HTTPS/Stickiness is fine with Amazon's, but not TCP/Stickiness. The TCP/Stickiness issue has already been discussed in another thread [1] in AWS forums. Hence we resolved the issue, by changing the protocol from TCP to HTTPS for the port 443. However we also noted that aiCache provides web application HTTPS acceleration and stickiness for TCP too.

[1] Service error when setting LB policies of listener
[2] Elastic Load Balancing with Sticky Sessions
[3] Amazon Makes the Cloud Sticky
[4] jmeter + amazon ec2 + load balancing (elb)
[5] How can I force "non-sticky" connections for my ELB? 
[6] Load Balancer (ELB) - port forwarding on the load balancer itself
[7] "Sticky connection" on ELB for https?  
[8] Using ELB to Serve Multiple Domains Over SSL on EC2 for Giggles and Unicorns
[9] Amazon Simple Monthly Calculator

Friday, March 18, 2011

AbiWord and Google Summer of Code - 2011

AbiWord has been accepted as a mentoring organization for Google Summer of Code 2011. It should also be noted that AbiWord has also been a mentoring organization in the Google Summer of Code for the years 2006, 2007, 2008, 2009, and 2010 too, making this time the 6th consecutive year.

Have a look at the project ideas from AbiWord. List of selected mentoring organizations can be found here.

Update: Pls find the latest revised version of this presentation at