When I try to connect to Omnisci from the terminal I see the below message. It does connect me to the DB and OmniSci Immerse also works fine but why is this Thrift message coming. Also, when I try to connect to this DB from my local using Pymapd and the server’s public IP and port: 6274, it fails to connect. Could you tell what is wrong? Thanks!
The error you are getting can be safely ignored, and it’s caused by the configuration of the /etc/hosts file that maps the localhost with an ipv4 and an ipv6 address.
With such configuration the thrift library tries to connect on IPV6 first, then in IPV4, causing the error on the first attempt while succeeding in the second.
To modify this behaviour you can change the precedence of name resolution from IPV6 to IPV4 uncommenting this line in the
precedence ::ffff:0:0/96 100
So the ipv4 address will be called first.
When using omnisql you can also specify an ipv4 address different than localhost with the - s switch
omnisql - s 127.0.0.1
or If it’s not needed disable the ipv6 on your system or modify the /etc/hosts file.
Each of those would solve the Connection refused message.
Thank you @candido.dessanti ! Could this be the reason that I am unable to connect to the DB from my local using PymapD?
If the pymapd (you should switch to pyomnisci) is installed on the same host of the database, and you are usint localhost as address in the connect string, it’s possible.
Just swap localhost with 127.0.0.1 in the connection URL, and then check if you are able to connect. If you are not,please post the error message here
Thanks @candido.dessanti ! I am able to connect to the DB whee I use Pymapd on the same server and give “localhost” in the connection string but when I try to use PymapD installed on another server and use “public IP” of the OmniSci server as hostname then it fails to connect.
that’s strange, because our database listens on all IPV4 interfaces in the server
It works now! Thanks @candido.dessanti