OmniSci DB not connecting

Comments

6 comments

  • Avatar
    Candido Dessanti

    Hi @HAPPY,

    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 /etc/gai.conf file 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.

    Candido

    0
    Comment actions Permalink
  • Avatar
    HAPPY

    Thank you @candido.dessanti ! Could this be the reason that I am unable to connect to the DB from my local using PymapD?

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    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

    Best regards, Candido

    0
    Comment actions Permalink
  • Avatar
    HAPPY

    [quote="candido.dessanti, post:2, topic:2942"] 127.0.0.1 [/quote]

    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.

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    Hi,

    that's strange, because our database listens on all IPV4 interfaces in the server

    0
    Comment actions Permalink
  • Avatar
    HAPPY

    [quote="candido.dessanti, post:2, topic:2942"] 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 /etc/gai.conf file 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.

    Candido [/quote]

    It works now! Thanks @candido.dessanti

    1
    Comment actions Permalink

Please sign in to leave a comment.