Change TangoHost Not Working in Jive

Hello All

I am using tango-8.1.2 patched version in Fedora OS.
I have connected two PCs one to one.

PC1 TANGO_HOST= 01hw587782:10000
hostname of PC1= 01hw587782

PC2 TANGO_HOST= 01hw341679:10000
hostname of PC2 = 01hw341679

Below is the entry in /etc/hosts file of PC1

IP Address of PC1 01hw587782
Ip Address of PC2 01hw341679

Below is the entry in /etc/hosts file of PC2

IP Address of PC1 01hw587782
Ip Address of PC2 01hw341679

Now When I open jive in PC1 and I try to change the Tango_Host
Following error is coming:

Tango Error

Desc-Connection To database failed
Reason-TangoAPI_Database_Connection_Failed
Origin-connect to d_base(01hw341679,10000)

Please find the attached file for the error


Any Suggestions ?

Thanks and Regards
TCS-GMRT TEAM




Regards,
TCS_GMRT
Edited 8 years ago
Hi,

I have attached the screenshot you sent me. I have seen this error before but I forgot why. From the jive error I see it is trying to connect to 127.0.0.1. This means somewhere the ip host address is being converted to 127.0.0.1. Maybe when you start the database on the local hosts it resolves the ip name to localhost. Try starting jive on each host with the TANGO_HOST set the host it is running on (I presume this works). Then look at the information on the device sys/database/2 (the database device) to see which ip address it is exported under.

Can you ping between the two devices?

Andy

Hello Andy

Try starting jive on each host with the TANGO_HOST set the host it is running on (I presume this works).

It is working.

Then look at the information on the device sys/database/2 (the database device) to see which ip address it is exported under.

I looked a the information on device sys/database/2
host: 01hw587782 (Ip Address of PC1)

Similarly i tried the same in PC2
host: 01hw341679 (Ip Address of PC2)

Can you ping between the two devices?


I tried to access the device of PC2 from PC1, for that i tried following in python


>>> test=PyTango.DeviceProxy("01hw341679:10000/sys/Database/2")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/site-packages/PyTango/device_proxy.py", line 129, in __DeviceProxy__init__
return DeviceProxy.__init_orig__(self, *args, **kwargs)
PyTango.ConnectionFailed: DevFailed[
DevError[
desc = TRANSIENT CORBA system exception: TRANSIENT_ConnectFailed
origin = Connection::connect
reason = API_CorbaException
severity = ERR]

DevError[
desc = Failed to connect to database on host 01hw341679 with port 10000
origin = Connection::connect
reason = API_CantConnectToDatabase
severity = ERR]
]
>>>

Problem is still there. I am unable to access the tango of different machine conencted in network, It says Tango_API Database conenction failed.

Thanks and Regards
TCS-GMRT TEAM



Regards,
TCS_GMRT
This is the info I get from the tango vm:

- Device Info —————————————-

Device: sys/database/2
type_id: IDL:Tango/Device_5:1.0
iiop_version: 1.2
host: tango9-vm (10.0.2.15)
port: 10000
Server: DataBaseds/2
Server PID: 1194
Exported: true
last_exported: 7th January 2016 at 11:44:11
last_unexported: 20th December 2015 at 21:21:37

- Polling Status ————————————-


Does it look similar to yours? Maybe you can send it to us?

I meant to say ping between the hosts. I wonder if the host names are not getting resolved correctly. Are you using DHCP or static ip addresses? Do these computers have multiple host addresses?

I did find a bug in the tango-db startup script recently which caused it to start the database with the wrong options if there were multiple (commented) entries in the /etc/tangorc file.

How do you start the Tango database? What is the option on the command line? You can check with the ps command. If you are only listening on the port and not the host it might explain your problem. If you are using the /etc/init.d/tango-db script you can try modifying the following lines in the start function:

        if [ $CANON_HOST = "localhost" ]
        then
                DAEMON_ARGS="2 -ORBendPoint giop:tcp:$HOST:$PORT"
        else
                DAEMON_ARGS="2 -ORBendPoint giop:tcp:$HOST:$PORT"
                tango_admin –ping-network 40 || return 2
        fi

Andy
- Device Info of PC1

Device: sys/database/2
type_id: IDL:Tango/Device_4:1.0
iiop_version: 1.2
host: 01hw587782 (192.xxx.x.4)
port: 10000
Server: DataBaseds/2
Server PID: 6262
Exported: true
last_exported: 7th January 2016 at 10:44:42
last_unexported: 17th December 2015 at 21:42:25

Yes, I am able to ping between the hosts.

Both machines are connected in network and have static-ip address.

I do not use tango-db script to start tango.

I just run the tango start command from terminal to start
$tango start

Following is the entry in the /etc/hosts file

192.xxx.x.4 01hw587782
192.xxx.x.5 01hw341679

Thanks and Regards
TCS-GMRT TEAM

Regards,
TCS_GMRT
Can you check the command which is used to run the Database server with ps aux e.g.

tango-cs@tango9-vm:~$ ps aux | grep DataBase
tango 1225 0.1 0.4 1308772 27280 ? Sl 14:06 0:00 /usr/local/tango-9.1.0/bin/DataBaseds 2 -ORBendPoint giop:tcp::10000

I have managed to reproduce your error by specifying a TANGO_HOST which is not reachable. In thiss case jive gives an error saying it cannot reconnect to 127.0.0.1:2809. So the problem seems to lie with the fact that your TANGO_HOST is not reachable for some reason.

To make sure you have access to the database port on the remote pc you should try to connect tot the port with telnet e.g.

telnet 01hw587782 10000

Here is an example using the tango9-vm:

telnet tango9-vm 10000
Trying 10.0.2.15…
Connected to tango9-vm.
Escape character is '^]'.

Send me the output if you have problems analysing it.

Andy
Edited 8 years ago
Hello Andy
Following is the errror coming

$ DataBaseds 2 -ORBendPoint giop:tcp::10000
main(): arrived
omniORB: Failed to bind to address :: port 10000. Address in use?
omniORB: Error: Unable to create an endpoint of this description: giop:tcp::10000
Received a CORBA::Exception
INITIALIZE CORBA system exception: INITIALIZE_TransportError
Exiting

This executed successfully
telnet 01hw587782 10000
Trying 192.xxx.x.xxx…
Connected to 01hw587782.
Escape character is '^]'

Thanks and Regards
TCS-GMRT TEAM

Regards,
TCS_GMRT
The error to bind to port 10000 does not sound right. You should try another address e.g. 20000. In this case change TANGO_HOST of course.

Which other program is using this port? Another version of the Database server running in the bkg?

Andy
Hello Andy

Tried changing the TANGO_HOST=01hw587782:20000 by changing the port.
Jive not able to open, Still the same error:

Desc-Connection To database failed
Reason-TangoAPI_Database_Connection_Failed
Origin-connect to d_base(01hw587782,20000)


Thanks and Regards
TCS-GMRT TEAM


Regards,
TCS_GMRT
Hi TCS-GMRT,

hard to say why this is not working as I do not have access to your system. When you change the port number does the message at the Database startup about not being able to bind to port disappear? Have you checked the process is running only once? Does telnet to the database port (20000) work from the remote host (not only on the local host) with the ip name and address? It is not clear from your replies if this is really the case. It would be better if you sent the output with the prompt.

The only other suggestion I can make is to try switch on tracing of the low level (omniORB). You can do this by specifying "-ORBtraceLevel 40" on the command line for a C++ client. Send the output to a file using "export ORBtraceFile=<afile>" before you start the Tango client or jive and send us the file. It will allow us to see what is happening on the protocol level.

Normally multiple instances of TANGO_HOST on different machines work well and does not cause a problem. Are these physical machines (most Tango sites use this feature)? Is there a network filter/firewall between these machines?

NOTE: While playing around with Tango on my laptop I can confirm that I see the same errors that you report (cannot bind to address, cannot connect to database) if the hostname ip address is wrong! This happens easily if you are using dhcp but have static addresses in the /etc/hosts (e.g. my case when connected to wifi). In this case you get exactly the same error as you report. So I can only encourage you to double check the host names and addresses in the /etc/host files.

Andy
Edited 8 years ago
 
Register or login to create to post a reply.