How to run multiple no-database server

Suppose there're two areas which need to run separately;

sys/Area1/device10
sys/Area1/device11

sys/Area2/device20
sys/Area2/device21

So I run two servers(no database) using the same port like this

MyTangoServer.exe Area1 -ORBendPoint giop:tcp::10000 -nodb
MyTangoServer.exe Area2 -ORBendPoint giop:tcp::10000 -nodb

And the client side use
Tango://server_computer:10000/sys/Area1/device10#dbase=no
Tango://server_computer:10000/sys/Area2/device20#dbase=no

Then only the first server(Area1) accept clients.
The other clients which try to reach Area2 cannot find the devices.

If I run the Area2 first, only the Area2 is available.
That is first come, first served.



So, unlike using database which shares the same port, I should use different port like this

MyTangoServer.exe Area1 -ORBendPoint giop:tcp::10000 -nodb
MyTangoServer.exe Area2 -ORBendPoint giop:tcp::10001 -nodb

Tango://server_computer:10000/sys/Area1/device10#dbase=no
Tango://server_computer:10001/sys/Area2/device20#dbase=no


Even the multiple setting like below does not seem to work;
TANGO_HOST=server_computer:10000,server_computer:10001


Is this normal?

Edited 7 years ago
Hi,

Yes this is normal and expected.
The TANGO_HOST variable is used only when you use a Database server.
The definition of the TANGO_HOST environment variable in the Tango manual is clear (section A.12.3.1):

This environment variable is the anchor of the system. It specifies where the Tango database server is
running. Most of the time, its syntax is
TANGO_HOST=<host>:<port>
host is the name of the computer where the database server is running and port is the port number on which
it is listening.

In the case you described, there is no database server, since there is no database. So the TANGO_HOST environment variable is not used.

When you run a server without database, you precise a port where it will listen to clients requests.
You cannot share this port between 2 servers running on the same machine.
You need to give a different port number to the second server if you want this to work, as you noticed.
And on your client side, you need to know on what port and on what host the server exporting the device you are interested in is listening.

What you noticed is expected.

Kind regards
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
 
Register or login to create to post a reply.