Options

Why Vertica ODBC driver v 12 refer to non-existing dir for reporting error message

Hi,

I got error message from app that uses Vertica ODBC driver v 12:

[Vertica][DSI] An error occurred while attempting to retrieve the error message for key 'VPrepareError' with message parameters ['no connection to the server
'] and component ID 101: Could not open error message files - Check that "/opt/vertica/lib64/en-US/VerticaMessages.xml" or "/opt/vertica/lib64/VerticaMessages_en-US.xml" exists and are accessible.

Xml files do exist, bu many-many versions ago they were moved to /opt/vertica/us-en.

Apparently, hardcoded dir name for XML messages have not been changed .

Install is standard vertica-client rmp:
$ rpm -qa|grep vertica-client
vertica-client-12.0.1-0.x86_64

I do not have any reference to Vertica driver in /etc/odbc.ini, or /etc/odbcinst.ini.
I am using driver connect string, where you are specifying driver file name with full path.
in isql, that would be options -3 and -k.

This error - incorrect XML dir - do exist for many years, but I thought it was fixed in recent driver version. To my big surprise, error still there.

Thank you!

Best Answer

  • Options
    s_crossmans_crossman Vertica Employee Employee
    Answer ✓

    Sergey,

    I added your example to the Jira. I had supplied a similar one giving bad table name in a select

Answers

  • Options
    s_crossmans_crossman Vertica Employee Employee

    Sergey,

    I have seen this as well. I couldn't find a simila rbug report so added VER-84772 to track the issue. Looks like it goes back to at least version 7 if not earlier.

    I hope the following helps you get proper error messages. I've never used this without odbc,ini and odbcinst.ini, but I think it's independent of them and will work in your configuraiton.

    Documentation reference:
    https://www.vertica.com/docs/12.0.x/HTML/Content/Authoring/ConnectingToVertica/ClientODBC/RequiredODBCDriverConfigurationSettings.htm

    You can create a vertica.ini file and include a setting for ErrorMessagesPath that points to the correct location. Then set the env var so the Vertica.ini file can be found by the driver.

  • Options
    Sergey_Cherepan_1Sergey_Cherepan_1 ✭✭✭
    edited December 2022

    I am not a fan of required client config. Apart from installing vertica-client, nothing should be done.
    Vertica ODBC driver works fine without any config. Well. with exception that XML message translation is pointing into incorrect dir.

    Here is how to use ODBC connect string, without any config odbc.ini or odbcinst.ini, after plain install of vertica-client rpm. It is called driver-connect mode and supported in ODBC 3:

    scherepanov@myworkstation:~$ /usr/bin/isql -3 -k 'driver=/opt/vertica/lib64/libverticaodbc.so;database=;servername=myservername;uid=dbadmin;pwd=nopicking;label=VerticaODBCNoConfig example' <<< "select 1;"
    +---------------------------------------+
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    +---------------------------------------+
    SQL> +---------------------+
    | ?column? |
    +---------------------+
    | 1 |
    +---------------------+
    SQLRowCount returns 1
    1 rows fetched
    SQL>

    I used to supply libverticaodbc.so with application when I cannot install or upgrade vertica-client on server. Specifying different path for libverticaodbc.so works just fine in drive-connect mode.

    In my opinion required config for ODBC is a nuisance. That chapter should be removed from docs, or renamed "Optional config".

  • Options
    Kedis1999Kedis1999 Vertica Customer
    1. If you have installed Vertica ODBC driver version 12, then you may get following error messages while connecting to Vertica database.
      Error Message :
      The directory specified does not exist. Please verify that the directory exists and that the path is correct.
      Solution :
      Verify whether the directory exists and if the path is correct. You can use the following command to check the directory existence.
      dir /a/p %path%
      If the directory doesn't exist, create it using the below command.
      mkdir %path%
      If you still face issue, please contact us at sales@vertica.com.
  • Options

    Please update internal JIRA VER-84772 with following info.

    This bug is easily reproduced. Try to connect to Vertica on Linux using ODBC, and specify incorrect database name.
    You will get an error exactly as I posted.

  • Options

    Looks like issue not fixed. I installed vertica-client v 12.0.4, and still getting same diagnostics on errors.

  • Options
    SruthiASruthiA Vertica Employee Administrator

    @Sergey_Cherepan_1 : I just checked. yes it is not fixed yet.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file