Liferay Browser Launcher

Since we deployed our Liferay 6.1 environment at work, we’ve noticed that tomcat refused to shutdown cleanly. When executing the shutdown script, it would hang for a while before killing itself. We finally came up with a solution that appears to work, so I decided to share.

In Liferay 6.1, by default when the portal has initialized it will launch your system’s default browser and go to the portal home. This behaviour can be disabled and altered by adding this config to your file:

#Enter a URL to automatically launch a browser to that URL when the portal has fully initialized.
#Enter a blank URL to disable this feature.

This simple line fixed our issues. Our theory? Well, our Liferay instance is running on a linux server with no desktop environment and no installed browser. It seems like at startup a process goes off to open the browser, never finishes, and thus hangs around preventing a clean shutdown.

Seems like a bug as it should clearly not hang when no browser if found.

Hope that helps someone out there.