Libtango java tools won't connect tango db on Raspberry Pi
I've been scratching my head trying to try jive and astor for 4 days now :(
I am running tango on a Raspberry Pi 3 running Raspbian (to eventually use a Pi PLC). I have installed tango-db and PyTango from binaries without problem and have been testing Tango with Python.
However, I haven't been able to use any libtango java tools (jive, astor etc.) since they are unable to connect to the tango database for some strange reason.
Here are the steps that I used to install the tools.
1.Installed open jdk 8 (I also tried with Oracle JRE 8)
2.Installed liblog4j1.2-java by
3. Downloaded libtango-java_9.2.5a-1_all.deb from https://people.debian.org/~picca/ and
Below are the errors and trace info I received when trying to run Astor and Jive
I have made sure that Tango is running on localhost:10000 without problems. Below is how I connect to the tango db using python3:
HERE ARE WHAT I HAVE DONE:
- Viewed the login log of mariadb right after the error and it doesn't show any fail login attempt
- Changed libtango-java_9.2.5a-1_all.deb to libtango-java_7.2.6-1_all.deb. This time jive doesn't show error, just the connection failed message and I am able to get to the GUI of jive (but no connection)
- Tried using the jive version that comes with all dependencies here with the same result: https://bintray.com/tango-controls/maven/Jive/7.18#files/org/tango
- As advised by the doc and some forum messages, I tried setting the shell & system environment variable MYSQL_USER=tango MYSQL_PASSWORD=tango both inside and outside the tango-db script to no avail
- Made sure that logging in manually to mariadb using user and password tango works
- Installed jive on a Windows PC on the same network to connect to the tango database on the Pi. Same problem.
Here is how I install tango on the Raspberry Pi:
1. Install mariadb-server with no password for root user
2. Install tango-db:
(when prompted for tango user and password, I used "tango" for both)
3. Start tango by:
(tango starts automatically at boot, but I need to restart every time to make it work)
I would be grateful if someone could shed some light on what is happening.
I'm not an expert but I dare an answer …
Is your '/etc/hosts' under control ?
Does your '/etc/tangorc' reflect the '/etc/hosts' ?
By the past, with older versions, I encountered issues with the name resolution due to typo in these files.
Hope it helps
Thanks for your suggestion.
Both files seem to be normal.
I have tried changing the last entry to 127.0.0.1 to no avail.
Here is the content of /etc/tangorc
I have tried changing it to TANGO_HOST=127.0.0.1:10000 to no avail.
|OK, just out of some really wild guess, I disable ipv6 on the Pi and now everything works!|
well done on solving your problem on your own! I do not know why IPV6 interfered with jive but not with Python. I am running ubuntu 20.04 on my laptop and have IPV6 enabled and Jive working (with OpenJDK 11). However I am using the latest version of Tango 9.3.4 compiled from source. But I am not sure if this is the reason.
My /etc/hosts file looks like like this:
I hope your problems are solved now and you can talk to your PLC.