Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Anchortoptop

4.2. Remote Console

The remote console feature allows to connect to a running ServiceMix Karaf instance from a remote computer and perform all the operations that are usually accessible from the local console.

Launch options

The ServiceMix Kernel Karaf shell scripts supports a number of options to control the remote console:

  • console: launch ServiceMix Kernel Karaf in the default mode (both local and remote console activated). This is the default mode
  • server: launch ServiceMix Kernel Karaf in with a remote console but no local console
  • client: launch ServiceMix Kernel Karaf in with a local console only

These options affect two system properties that can be set if you don't use the standard shell scripts:

  • servicemixkaraf.startLocalConsole
  • servicemixkaraf.startRemoteShell

Using the client jar

From Apache ServiceMix Kernel 1.1.0 and posterior versions, it is It is also possible to use a more lightweight way to connect to a ServiceMix Kernel Karaf instance using the following command line:

...

There are a few parameters that can be set on the command line to change the URL used to connect to the KernelKaraf, the user or the password.
All these parameters are detailed in the help screen:

...

bgColor#000000

...

nopaneltrue

...

For example, to shut down the Kernel Karaf from the command line, you can run the following command:

...

bgColor#000000

...

nopaneltrue

...

...

titleSending direct commands from the client

The client jar

...

also supports passing command line arguments to the remote

...

Karaf.

...

#top

Using an SSH client

You can use any standard SSH client to connect to a ServiceMix Kernel Karaf instance. The default port is 8101.

...

...

titleError messages when using some ssh clients

...

...

Code Block

channel_by_id: 1: bad id: channel free
channel_input_success_failure: 1: unknown
channel_by_id: 1: bad id: channel free
channel_input_success_failure: 1: unknown

#top

Using another

...

Karaf instance

First, open a terminal and launch a Kernel Karaf in server mode (you could use a Kernel Karaf instance in console mode too):

...

...

On another terminal, start a Kernel another Karaf instance in client mode:

...

...

At this point in time, you can not use the same

...

Karaf installation to start both the server and the client, so you need to create a new instance using the 'admin create xxx' command and use that one to start the client. If you are on a different host or already use another copy of

...

Karaf, this requirement does not hold.

Once the console appears, you can run the remote rsh command to connect to the other Kernel:

Code Block

remote rsh tcp://localhost:8101/ -u smx -p smx 

You can also do that in a single command line from the prompt by appending the previous ServiceMix command to the shell command:

...

To verify that your are connected to the remote Kernelinstance, run the following command:

...

and check the system informations.

...

The TCP port is configured at the following location:

...

The defaut configuration is as below:

...

The port used can easily be changed by changing the default port 8101 in the sshPort property.

The security realm used by the console when authenticating remote users is named servicemix karaf, so you can override this realm as explained in the 4.5. Security framework security section.

#top

...

...