How to Connect to an Instance of ArmarX/Ice Running on Another Machine

Table of Contents

ToDo: Add flavor text.

On the Master

Stop ArmarX and MongoDB if already running

armarx stop
armarx memory stop

Get your hostname:

export ARMARX_MASTER=$(hostname)

Create new profile

armarx switch "$ARMARX_MASTER"

Edit $ARMARX_WORKSPACE/armarx_config/profiles/$ARMARX_MASTER/default.cfg:

  • Replace localhost by 0.0.0.0 in the following keys:
    • Ice.Default.Locator
    • IceGrid.Registry.Client.Endpoints
    • ArmarX.MongoHost
  • Note the Ice port, e.g. 20328 in tcp -p 20328 -h 0.0.0.0 (the value of Ice.Default.Locator and IceGrid.Registry.Client.Endpoints, which should be equal)
  • Note the MongoDB port, e.g. 20329 in ArmarX.MongoPort=20329

Make sure the profile is active:

$ armarx profile
[...]
Available profiles (* = active):
default
* <$ARMARX_MASTER>

If not, switch to it

armarx switch "$ARMARX_MASTER"

Start ArmarX and MongoDB

armarx start
armarx memory start

On the Client

Define the hostname of the master, replacing <HOSTNAME_OF_MASTER> with the value of $ARMARX_MASTER from above.

export ARMARX_MASTER=<HOSTNAME_OF_MASTER>

Create new profile

armarx switch "$ARMARX_MASTER"

Edit $ARMARX_WORKSPACE/armarx_config/profiles/$ARMARX_MASTER/default.cfg:

  • Replace localhost by value of $ARMARX_MASTER in the following keys:
    • Ice.Default.Locator
    • IceGrid.Registry.Client.Endpoints
    • ArmarX.MongoHost

      Alternatively, you can also enter the master's IP address.

  • Replace the port (number following -p) by the Ice port noted before in
    • Ice.Default.Locator
    • IceGrid.Registry.Client.Endpoints
  • Replace the MongoDB port in
    • ArmarX.MongoPort

Make sure the profile is active:

$ armarx profile
[...]
Available profiles (* = active):
default
* <HOSTNAME_OF_MASTER>

If not, switch to it

armarx switch "$ARMARX_MASTER"

Check whether the connection works:

armarx status

Output should look like this:

Profile: <HOSTNAME_OF_MASTER>
Registries:
Master: <HOSTNAME_OF_MASTER>
IceGrid Nodes + running servers:
NodeMain (<HOSTNAME_OF_MASTER>)
IceStorm (Active, PID: 11404)
IceGrid applications + associated servers:
IceStorm
IceStorm (Active, PID: 11404)