Skip to Content.
Sympa Menu

perfsonar-user - Re: [perfsonar-user] Multiple services on a single port

Subject: perfSONAR User Q&A and Other Discussion

List archive

Re: [perfsonar-user] Multiple services on a single port


Chronological Thread 
  • From: Aaron Brown <>
  • To: Zafar Gilani <>
  • Cc: ,
  • Subject: Re: [perfsonar-user] Multiple services on a single port
  • Date: Mon, 11 Jan 2010 15:27:34 -0500

You may be able to do this with a modified init script, though it wouldn't work with the "enabled services" gui, the status web page wouldn't work nor would the separate init scripts work (i.e. you wouldn't be able to start/stop the SNMP MA with /etc/init.d/snmpMA.sh).

That init script would be responsible for starting up a single instance of the daemon that handle all the services.

Copy an existing script (e.g. snmpMA.sh), and then modify the TOOL_EXE to be something like:

perl -I /usr/local/perfSONAR-PS/ perfSONAR_PS-PingER/lib -I /usr/local/perfSONAR-PS/perfSONAR_PS/perfSONAR_PS-perfSONARBUOY -I /usr/local/perfSONAR_PS/perfSONAR_PS-SNMPMA/lib  -I /usr/local/perfSONAR_PS/perfSONAR_PS-LookupService/lib  /usr/local/perfSONAR-PS/Shared/bin/perfsonar-daemon.pl

The basic idea is to run the daemon script run with the various services lib directories in the perl include path.

You'll then need to combine all the various config files into a single config file:

cat /usr/local/etc/perfSONAR/*conf > /usr/local/etc/perfSONAR/combined.conf

Then go through and remove duplicate entries at the top-level, e.g. you'll have "disable_echo  0" in there repeatedly. Note: this does not apply to anything inside an <endpoint> block. Also, remove the extraneous <port> entries so that all the endpoint elements are under a single port entry.

Modify the init script to point to the "combined.conf" file.

Once you've done that, try running the init script and fix any issues you run into.

To get it to boot properly, you'll need to make sure that service starts before anything else so that when the services try to start up, the "one" service will already have that port open.

I'm not positive everything that this might break, and it will not upgrade, but it should meet the "all services on one port" requirement.

Cheers,
Aaron





On Jan 11, 2010, at 2:26 PM, Zafar Gilani wrote:

Hey fellow users,

I was just wondering whether I can shift multiple services to listen on one port using one IP address (say for example 4 services mentioned below listen on xyz.xyz.xyz.xyz:pp):

snmpMA - currently listening on port 8065
pinger Measurement Archive and Regular Tester - currently listening on
port 8075
perfSONAR BUOY Measurement Archive - currently listening on port 8085
Lookup service - currently listening on port 8095

I found that these services are up using the perfSONAR-PS and perfsonar-daemon, the script for daemon.pl for each service is placed at:
/usr/local/perfSONAR-PS/<service>/bin/daemon.pl

and configuration files at:
/usr/local/etc/perfSONAR.

I changed the value of the port inside the <port xx> .. </port> tag for each conf file but only one service can be started to listen on one port, attempting to start another service fails. I believe this is the expected behavior since perfSONAR is designed in such a way. The daemon.pl script used by various services (mentioned above) are same but start another instance of daemon to listen onto a different port each time a service is started.

However since it is an important requirement of SLAC's security policy to keep least amount of ports in open state, I wanted to ask whether what we are trying to do is possible at all. What kind of changes would be required in order to achieve this? And whether "single port" approach is recommended or not (and any reasons for particular recommendations).

Regards,
Zafar | Research Associate | SLAC

Winter 2010 ESCC/Internet2 Joint Techs
Hosted by the University of Utah - Salt Lake City, UT
January 31 - February 4, 2010




Archive powered by MHonArc 2.6.16.

Top of Page