[Dxspider-support] Two Spider nodes on the same linux box

Dirk Koopman djk at tobit.co.uk
Mon Jan 14 12:35:55 GMT 2008


Luigi Carlotto wrote:
> Hello Dirk, hello the list !
> 
> Currently I'm running a single Spider node on my Linux box.
> Due to differentiate the traffic on the node (node to node links and node
> to users links) I would like to set up a second spider node, but running on
> the same Linux computer where is running my actual node.
> 
> Is it possible ??
> 
> I suppose the following:
> 1. Create a different local user, sysop2 for example, to run the second
> cluster under.
> 2. Change the internal cluster port for the second istance, from 27754 to
> 27755 for example.
> 

Although you don't need to do 1) it makes some things slightly easier.

So.

* create a new user (say sysop2)
* login (or su or sudo bash) to root
* cd ~sysop2
* mkdir spider
* cd /spider
* cp -a * ~sysop2/spider
* cd ~sysop2
* chown -R sysop2:sysop2 spider
* vi /etc/inittab
* copy the line:

sp:2345:respawn:su -c "perl /spider/perl/cluster.pl > /dev/null 2>&1" sysop

and change that second (new) line to

sq:2345:respawn:su -c "DXSPIDER_ROOT=/home/sysop2/spider perl 
$DXSPIDER_ROOT/perl/cluster.pl > /dev/null 2>&1" sysop2

so that you now have *two* lines where there was one.

* now login as sysop2
* firstly # out anything you have in spider/local_cmd/crontab (so you 
don't try to connect to the same things as the first node with the same 
callsign).
* now edit your spider/local/DXVars.pm so that its $mycall and $myalias 
are different from your other node (different SSIDs) and, as you have 
suggested, change your $clusterport to 27755 or something other than 27754.
* edit your .bashrc and add

export DXSPIDER_ROOT=/home/sysop2/spider

to the end of the file.

* logout and login as sysop2 again (VERY IMPORTANT)
* echo $DXSPIDER_ROOT
* check that a) get an answer and b) it is "/home/sysop2/spider" 
otherwise repeat from the "edit your .bashrc" stage again.

* cd spider/perl
* ./update_sysop.pl
* edit spider/local/Listeners.pm
* you either need to change the ['0.0.0.0', 7300] to say ['0.0.0.0, 
7301] or use specific (different) IP addresses for each instance instead 
of '0.0.0.0'.

you can now check whether it comes up OK by

* ./cluster.pl

You should see it launch and not complain about lock files and so forth.

* now you can either stop it, login as root, run: telinit q
* or just reboot.

You will need to clean up your connect scripts. Make sure that the 
callsign you login as (to other nodes) is the new one with the new SSID.

* If you use the curses based console program then it will automatically 
login to the correct node depending on what you login as.

Hope this helps.

Dirk



More information about the Dxspider-support mailing list