This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Problem Connecting to MariaDB - pypyodbc.OdbcNoLibrary: 'ODBC Library is not found. Is LD_LIBRARY_PA

For comparison, I have another MariaDB SQL server that I can connect to using MySQL 8.0, but this new one I'm trying to get into Orion is giving me fits. 

On the Orion polling server, I can connect to the target host in ODBC Data Source Administrator using both the MariaDB 3.1 and MySQL 8 drivers, but when I try to connect in the Application Component monitor, I get the following error. 

Unexpected error occurred. pypyodbc.OdbcNoLibrary: 'ODBC Library is not found. Is LD_LIBRARY_PATH set?'

error.bmp

My connection string (one of many variations I've tried):

Driver={MariaDB ODBC 3.1 Driver};Port=3306;Server=${IP};DataBase={information_schema};Uid=${USER};Pwd=${PASSWORD};

Here is the ODBC connection, validating using DSN:

ODBC+MySQL_MariaDB.bmpODBC_MariaDB.bmp

 

Here is the ODBCINST.ini and a list of my ODBC 64 bit drivers on my polling engine. 

ODBCINST.ini.bmpdrivers.bmp

For the community, what am I missing? I'm stumped at this point...

  • Lots of this: 

    2020-06-07 18:15:37,860 [140599006472000] INFO job_application - Starting poll of component 184615 (Up Time)
    2020-06-07 18:15:37,868 [140599006472000] ERROR job_application - Traceback (most recent call last):
    File "/opt/SolarWinds/Agent/bin/Plugins/SharedPythonLibs/pypyodbc.py", line 427, in <module>
    ODBC_API = ctypes.cdll.LoadLibrary('libodbc.so')
    File "/opt/SolarWinds/Agent/bin/Plugins/Python3/lib/python3.7/ctypes/__init__.py", line 434, in LoadLibrary
    return self._dlltype(name)
    File "/opt/SolarWinds/Agent/bin/Plugins/Python3/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
    OSError: libodbc.so: cannot open shared object file: No such file or directory

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "job_application.py", line 49, in execute
    probe_result = probe_helper.run_probe(description, job_cache, probe_credentials)
    File "/opt/SolarWinds/Agent/bin/Plugins/APM/probe_helper.py", line 57, in run_probe
    method = get_probe(description)
    File "/opt/SolarWinds/Agent/bin/Plugins/APM/probe_helper.py", line 53, in get_probe
    return __import__(module, globals(), locals(), ["run_probe"]).run_probe
    File "/opt/SolarWinds/Agent/bin/Plugins/APM/probes/OdbcQAProbe.py", line 8, in <module>
    import log_helper, pypyodbc
    File "/opt/SolarWinds/Agent/bin/Plugins/SharedPythonLibs/pypyodbc.py", line 439, in <module>
    raise OdbcNoLibrary('ODBC Library is not found. Is LD_LIBRARY_PATH set?')
    pypyodbc.OdbcNoLibrary: 'ODBC Library is not found. Is LD_LIBRARY_PATH set?'

  • couple of things I thought of being it is unix...

    Does the user the script/program is running under have permissions to see those libraries?  If it can't see them, it assumes they are not there.

    Secondly, do you set the LD_LIBRARY_PATH environment in the shell of the user executing the script/program?

    Just 2 things that came to mind.