Accessing CQ5.4’s Apache Felix using Remote Shell

Recently, I came across an odd situation where accessing Apache Felix at http://host:4502/system/console kept returning 404. I’m not sure what exactly had happened and without access to the Felix console coupled with a few problematic OSGi jars not being removed when we deleted the install folders in /apps, we were running completely blind. It was then that I started looking for a way to access Felix from a shell just so that if all else fails, we can at least have a second door to access the felix installation from a commandline. As well, a shell gives you quicker access to certain information than a the web console.

On CQ5.4, I tried installing the Gogo shell bundles from here [1] but Felix started going into a loop of installing, stopping, and starting a number of bundles including Sling, thus rendering the instance unstable.

Instead, I went for the Apache Felix Shell Service (1.4.3) and Apache Felix Remote Shell (1.1.2) bundles. Then it was a matter of installing the bundles using the web console and opening a commandline terminal and typing:

> telnet localhost 6666

You can run all sorts of OOTB commands like ps (lists all bundles), install, uninstall, stop, start, etc. There are also other command bundles you could look up or write yourself to give reporting, diagnostic, or the odd kick to get Felix behaving correctly if something in the JCR Installer didn’t behave correctly.

As an aside, in CQ5.5,  you can supposedly install the Gogo shell and a remote shell via this package here [2].



– Sarwar Bhuiyan

Accessing CQ5.4’s Apache Felix using Remote Shell

2 thoughts on “Accessing CQ5.4’s Apache Felix using Remote Shell

  1. You can get the Gogo shell as well. You need the following:

    Gogo Related Bundles:
    2. org.apache.felix.gogo.command
    3. org.apache.felix.gogo.runtime

    Apache Felix Shell Remote

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s