Can't connect with Tools

Hi,
I am a beginner with Tango and I am trying to install Tango using two running docker containers, one with database, one with tango on a Debian Server.
I share my docker code as it wasn't a plain work to build them following online resources.

MYSQL Container

git clone https://github.com/tango-controls/docker-mysql.git 
#  Compilation of mysql image
docker build -t tango-db ./docker-mysql/

# Running the container on a different mysql port
docker run -e MYSQL_ROOT_PASSWORD=root –rm -i -t -p 13306:3306 tango-db

# The following just to check if mysql is working
mysql -h 127.0.0.1 -P 13306 -u root -p

TANGO Container

git clone https://github.com/tango-controls/tango-cs-docker.git
# Compilation of Tango Image
docker build -t tango tango-cs-docker/

# Running Tango Container
docker run -it –rm -p 10000:10000 –name tango_databaseds -e ORB_PORT=10000 -e TANGO_HOST=127.0.0.1:10000 -e MYSQL_HOST=192.168.0.34:13306 -e MYSQL_USER=root -e MYSQL_PASSWORD=root -e MYSQL_DATABASE=tango tango

I obtain the following log:

wait-for-it.sh: waiting 30 seconds for 192.168.0.34:13306
wait-for-it.sh: 192.168.0.34:13306 is available after 0 seconds
2017-02-16 10:05:45,776 WARN No file matches via include "/etc/supervisor/conf.d/*.conf"
2017-02-16 10:05:45,779 INFO supervisord started with pid 1
2017-02-16 10:05:46,781 INFO spawned: 'tango-db' with pid 16
2017-02-16 10:05:46,783 INFO spawned: 'tango-starter' with pid 17
2017-02-16 10:05:46,786 INFO spawned: 'tango-accesscontrol' with pid 18
2017-02-16 10:05:46,788 INFO spawned: 'tango-test' with pid 19
2017-02-16 10:05:46,966 INFO exited: tango-accesscontrol (exit status 1; not expected)
2017-02-16 10:05:46,973 INFO exited: tango-starter (exit status 1; not expected)
2017-02-16 10:05:48,079 INFO success: tango-db entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-02-16 10:05:48,080 INFO spawned: 'tango-starter' with pid 58
2017-02-16 10:05:48,083 INFO spawned: 'tango-accesscontrol' with pid 59
2017-02-16 10:05:48,083 INFO success: tango-test entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-02-16 10:05:49,180 INFO success: tango-starter entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-02-16 10:05:49,180 INFO success: tango-accesscontrol entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

First question: For what I know it seems to me that is working, is it true from log?
Second… now I want to launch Jive Astor and all the tools from a Windows Workstation.
I installed the binaries and than created the following vars:
MYSQL_USER root
MYSQL_PASSWORD root
TANGO_HOST 192.168.0.34:13306
TANGO_ROOT C:\Program Files\tango

Now trying to launch Jive I get the following error:
Des -> Connection to database failed !
org.omg.com.CORBA.TRANSIENT:Retries exceeded, couldn't reconnect to 127.0.0.1:2809 vmcid: 0x0 minor code:0 completed:No
Reason-> TangoApi_DATABASE_CONNECTION_FAILED
Origin-> connect_to_dbase(192.168.0.34,13306)

I verified that mysql is accessible from the windows machine, so is not a connection problem, I suppose is a setting problem. Where is trying to connect to address 127.0.0.1:2809 ? Is Jive trying to connect to a localhost Tango server?
I exposed on Tango docker container port 10000, should I expose more ports?

On Astor I get the same error:
Des -> Connection to database failed !
org.omg.com.CORBA.TRANSIENT:Retries exceeded, couldn't reconnect to 127.0.0.1:2809 vmcid: 0x0 minor code:0 completed:No

Any clue? Thanks
Hi,

It looks like you misunderstood the TANGO_HOST concept.
The TANGO_HOST environment variable is used to know how to contact the TANGO Database server (which will then talk to your MySQL server), not the MySQL server.
So the hostname and port number given in the TANGO_HOST definition must be the hostname where your TANGO Database server is running and the port number must be the port number where your database server is listening to (10000 in your case it seems).

Hoping this helps a bit.
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.
Yes! Was helpful!
This was the point… I was slipping on a banana peel.
Now I can connect to server, thanks
Edited 2 months ago
 
Register or login to create to post a reply.