FUSE ESB (Servicemix) 4.3.0 and Debian Lenny

December 23rd, 2010 § 6 comments

Following text will help those who have problems enabling login over SSH for karaf console, this walkthrough is based on FUSE ESB (Servicemix) 4.3.0 (the procedure is the same for 4.2.0). Even though these steps were made on Debian Lenny, once installed and configured bundle can easily be transferred to another linux distribution (I have tested this approach on SLES 10 SP1, that is i moved configured FUSE ESB (servicemix) bundle from Debian Lenny to SLES 10 SP1).

Installing FUSE ESB (Servicemix) 4.3.0 is pretty straightforward:

1. Download FUSE ESB (Servicemix) 4.3.0 to some location on your disk (I use /opt directory for bundles and software like this (but you can choose whichever directory you want to).

2. Once downloaded unpack the archive:

# cd /opt
# mv /download_location /opt
# tar xzf  apache-servicemix-4.3.0-fuse-02-00.tar.gz

3. Since i like directory nomenclatures to be short but descriptive, i renamed the unpacked directory name to fuse-smix.

# cd /opt (if not already)
# mv apache-servicemix-4.3.0-fuse-03-00 fuse-smix

4. This is the part where i usually configure FUSE ESB (Servicemix) with service wrapper (after all, i do want to run FUSE ESB (Servicemix) as a service.

# cd /opt/fuse-smix/bin
# ./karaf

If everything is configured properly (service ports not overlapping with some other service … etc), you should get a karaf console like (or similar to) this:

        __ __                  ____
       / //_/____ __________ _/ __/
      / <  / __ `/ ___/ __ `/ /_
     / /| |/ /_/ / /  / /_/ / __/
    /_/ |_|\__,_/_/   \__,_/_/         
  Apache Karaf (2.0.0-fuse-01-00)
Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or 'osgi:shutdown' to shutdown Karaf.

5. Now, issue the following commands to install service wrapper

# smx@root> features:install wrapper
# smx@root> wrapper:install

6. To install FUSE ESB (Servicemix) 4.3.0 as a service on your favorite distribution follow the output of the last command issued (i.e. wrapper:install). For Debian Lenny it goes like this:

# ln -s /opt/fuse-smix/bin/karaf-service /etc/init.d/
# update-rc.d karaf-service defaults

7. Now start your FUSE ESB (Servicemix) 4.3.0 service and enjoy.

# /etc/init.d/karaf-service start

Now, when you try to access karaf service via SSH, you’ll get a notice and you won’t be able to connect:

# ssh -l smx -p 8101 IP_ADDRESS_OF_YOUR_MACHINE
no matching cipher found: client aes256-ctr,aes192-ctr,aes128-ctr server aes128-cbc,3des-cbc,blowfish-cbc

To, override this error, you need to do the following:

1. Download Bouncy Castle Crypto API.

# wget http://www.bouncycastle.org/download/bcprov-jdk16-145.jar

2. Move bcprov-jdk16-145.jar file to the %KARAF_HOME%/lib/ (where %KARAF_HOME% is the root directory of your FUSE ESB (Servicemix) 4.3.0 installation. In my case, %KARAF_HOME% is /opt/fuse-smix).

# mv bcprov-jdk16-145.jar /opt/fuse-smix/lib

3. Now you need to edit a few files, and the first one to edit is named /opt/fuse-smix/etc/karaf-wrapper.conf . Add following directives inside the file:

# Java Application
# Application Parameters.  Add parameters as needed starting from 1

Save the file. Needless to say, in this file you can also increase/decrease Initial and Maximum Heap Sizes, assign a username under which you wish to run FUSE ESB (Servicemix) 4.3.0 and generally do some other nice things.

4. The second file to edit is named /opt/fuse-smix/etc/configure.properties, where you need to add the following line:

org.apache.felix.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider

Save the file and (re)start your FUSE ESB (Servicemix) 4.3.0 service.

5. Now, you should be able to connect to karaf console using SSH:

# ssh -l smx -p 8101 IP_ADDRESS_OF_YOUR_MACHINE
smx@IP_ADDRESS's password:
        __ __                  ____
       / //_/____ __________ _/ __/
      / <  / __ `/ ___/ __ `/ /_
     / /| |/ /_/ / /  / /_/ / __/
    /_/ |_|\__,_/_/   \__,_/_/         
  Apache Karaf (2.0.0-fuse-01-00)
Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or 'osgi:shutdown' to shutdown Karaf.

6. Enjoy using your FUSE ESB (Servicemix) 4.3.0.

Tagged , , , , , ,

§ 6 Responses to FUSE ESB (Servicemix) 4.3.0 and Debian Lenny"

  • Adolfo De Unánue says:

    This is an excellent article, but, I still have problems to access via ssh.
    I am getting the following error:

    no matching cipher found: client aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se server

    I already check that the lines of the file are exactly as yours
    (The only difference is that the file is named conf.properties and not configure.properties)

  • drade says:

    Hi Adolfo,

    Can you check whether the bcprov library is actually loaded or not ? That is did you add bcprov library to your wrapper JAVA application classpath ?

    Type in something like:

    # ps aux | grep karaf

    Output from above command should list the following line (path may differ, but it should be loaded).


    Alternatively, if you can post your wrapper.log file, karaf-wrapper.conf as well as your config.properties, i could check whether you have everything setup correctly.

  • Adolfo De Unánue says:

    Hi again!

    Thank you for your quick response1

    The output of the command “ps aux | grep karaf” is

    root      4780  0.9  5.1 1745844 634592 ?      Sl   10:46   1:03 java -Dkaraf.home=/opt/apache-servicemix-4.3.0 -Dkaraf.base=/opt/apache-servicemix-4.3.0 -Dkaraf.data=/opt/apache-servicemix-4.3.0/data -Dcom.sun.management.jmxremote -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -Djava.endorsed.dirs="%JAVA_HOME%/jre/lib/endorsed:%JAVA_HOME%/lib/endorsed:/opt/apache-servicemix-4.3.0/lib/endorsed" -Djava.ext.dirs="%JAVA_HOME%/jre/lib/ext:%JAVA_HOME%/lib/ext:/opt/apache-servicemix-4.3.0/lib/ext" -Xmx1024m -Djava.library.path=/opt/apache-servicemix-4.3.0/lib/ -classpath /opt/apache-servicemix-4.3.0/lib/karaf-wrapper.jar:/opt/apache-servicemix-4.3.0/lib/karaf.jar:/opt/apache-servicemix-4.3.0/lib/karaf-jaas-boot.jar:/opt/apache-servicemix-4.3.0/lib/karaf-wrapper-main.jar:/opt/apache-servicemix-4.3.0/lib/bcprov-jdk16-146.jar -Dwrapper.key=s5cvp15Nkzd8L_pL -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=4778 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wrapper -Dwrapper.service=TRUE -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1 org.apache.karaf.shell.wrapper.Main org.apache.felix.karaf.main.Main

    and as you can see the bcprov library is loaded 🙁

    My config files are (the relevant parts):


    # Java Application
    # Application Parameters.  Add parameters as needed starting from 1


    config.properties (at the end of the file):

    org.apache.felix.karaf.security.providers = org.bouncycastle.jce.provider.BouncyCastleProvider

    Thanks again

  • drade says:

    Hi Adolpho,

    I have found the solution to your issue with accessing apache’s servicemix karaf console via SSH. For apache’s servicemix bundle you need to register BouncyCastle’s crypto API library by doing the following:

    Edit the file named config.properties and replace the following line:

    # javax.transaction is needed to avoid class loader constraint violation when using javax.sql



    Restart your apache servicemix and enjoy !

  • Adolfo De Unánue says:

    You are absolutely right!

    That made the trick!

    Thank you for your help!

    (I know all you have to did, so I really appreciate it, thanks again)

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.

What's this?

You are currently reading FUSE ESB (Servicemix) 4.3.0 and Debian Lenny at Ze Fish. Ooooh, fishy, fishy, fishy fish !.