Mserver

From MidasWiki
Revision as of 15:51, 17 August 2015 by Suz (talk | contribs)
Jump to navigation Jump to search


Purpose

The MIDAS remote server (mserver) provides remote access to any MIDAS client.

It is needed when one or more of an experiment's MIDAS clients are running on a different host. In this case,

  1. a mserver client must be started on the host where the experiment resides
  2. and the user must take action to allow programs on remote machines to run on the host machine (see Security#MIDAS programs on remote machines). Without this action, only programs running on the local host will be allowed.


The mserver utility usually runs in the background and doesn't need to be modified. In the case where debugging is required, the mserver can be started with the -d flag which will write an entry for each transaction to a log file /tmp/mserver.log. The log entry contains the time stamp and RPC call request.

More than one copy of mserver can be started on a system, provided they use different tcp ports. This is useful if, for example, different experiments are in use on a single host at the same time.

Arguments

       [-e ] : experiment to connect to (see MIDAS experiment)
       [-h ] : help
       [-m ] : Multi process server (default)
       [-p ] : Port; listen for connections on specified tcp port. Default value is taken from ODB key /Experiment/midas server port.
       [-d ] : Write debug info to /tmp/mserver.log
       [-D ] : Become a Daemon

Usage

Start mserver on the default port (1175) as a Daemon :

> mserver -D

Start mserver on port 1176

> mserver -p 1176    


Old version of mserver (pre-August 2015)

The MIDAS remote server (mserver) provides remote access to any MIDAS client.

It is needed when one or more of an experiment's MIDAS clients are running on a different host. In this case, a mserver client must be started on the host where the experiment resides. To start a version of mserver on a different port, use the -p argument (see usage). To restrict access to the remote host to certain nodes, use the -a argument as shown below.

Arguments (old version)

       [-h ] : help
       [-s ] : Single process server
       [-t ] : Multi thread server
       [-m ] : Multi process server (default)
       [-p ] : Port number; listen for connections on specified tcp port.
       [-a ] : Hostname: only allow access for a specified host. Multiple -a arguments can be used (see Usage).
       [-d ] : Write debug info to /tmp/mserver.log
       [-D ] : Become a Daemon

Usage (old version)

>mserver -D
>mserver -p 7072 -D
>mserver -p 7071 -D -a localhost -a node01 -a node02 -a node03


To connect a client to this version of mserver, use the format "hostname:port", e.g.

# frontend started from client node
fe_test -h node01:7071 -e test
 
# frontend started from the backend node00 
ssh -n node01 /home/expt/online/fe_test.exe -h node00:7071 -e test -i 0 -D