[ZBX-17314] Error: Cannot connect to ODBC DSN:[SQL_ERROR]:[01000][0][[unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/12.2/client64/lib/libsqora.so.12.1' : file not found]| Created: 2020 Feb 13  Updated: 2020 Feb 14  Resolved: 2020 Feb 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Freddy Alexander Perez Assignee: Edgar Akhmetshin
Resolution: Won't fix Votes: 0
Labels: Oracle, ldd, odbc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2020-02-13-08-39-59-206.png    

 Description   

I'm getting the following error from my Zabbix server:

[root@ZabbixMonitor ~]# isql -v EX1
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/oracle/12.2/client64/lib/libsqora.so.12.1' : file not found
[ISQL]ERROR: Could not SQLConnect

I am trying to monitor oracle tablespaces through Zabbix, install oracle-instantclient-basic and odbc of oracle on the Zabbix server, I configured files /etc/odbcinst.ini and /etc/odbc.ini

/etc/odbcinst.ini contains:

[Oracle12c]
Description = Oracle ODBC Driver
Driver = /usr/lib/oracle/12.2/client64/lib/libsqora.so.12.1
Trace = yes
TraceFile = /var/log/odbcoracle
 
[EX1]
Driver = Oracle12c
Servername = 172.xx.xx.xx:1521/EX1   "Server where is configured oracle database"
Database = ED1
Port = 1521
UserID = EX1adm
Password = xxxxx
DatabaseCharacterSet = AL16UTF16


 Comments   
Comment by dimir [ 2020 Feb 13 ]

This issue tracker is international and the language is English, please translate.

Also, how is this related to Zabbix?

Comment by Freddy Alexander Perez [ 2020 Feb 13 ]

I am trying to monitor oracle tablespaces through Zabbix, install oracle-instantclient-basic and odbc of oracle on the Zabbix server and configure the directory /etc/odbcinst.ini and /etc/odbc.ini

the directory /etc/odbcinst.ini was configured: 

[Oracle12c]
Description = Oracle ODBC Driver
Driver = /usr/lib/oracle/12.2/client64/lib/libsqora.so.12.1
Trace = yes
TraceFile = /var/log/odbcoracle

 

and directory 

[EX1]
Driver = Oracle12c
Servername = 172.xx.xx.xx:1521/EX1   "Server where is configured oracle database"
Database = ED1
Port = 1521
UserID = EX1adm
Password = xxxxx
DatabaseCharacterSet = AL16UTF16

 

Comment by Glebs Ivanovskis [ 2020 Feb 13 ]

FreddPerez, check read permissions for /usr/lib/oracle/12.2/client64/lib/libsqora.so.12.1 and "x" permissions for /usr/lib/oracle/12.2/client64/lib/, /usr/lib/oracle/12.2/client64/, /usr/lib/oracle/12.2/, /usr/lib/oracle/, /usr/lib/, and /usr/ directories.

Comment by Edgar Akhmetshin [ 2020 Feb 14 ]

Hello Freddy,

You need to check if file exists and correct LD path config:

echo "/usr/lib/oracle/12.2/client64/lib" > /etc/ld.so.conf.d/oracle-client-12.2.conf
sudo ldconfig
# check if path is listed
sudo ldconfig -v

Also sudo/ldd can be used to check if zabbix user is able to see all the required libraries.

Please be advised that this section of the tracker is for bug reports only. The case you have submitted can not be qualified as one, so please reach out to [email protected] for commercial support or consultancy services. Alternatively, you can also use our IRC channel or community forum (https://www.zabbix.com/forum) for assistance. With that said, we are closing this ticket. Thank you for understanding.

Regards,
Edgar

Comment by dimir [ 2020 Feb 14 ]

edgar.akhmetshin, sudo will not work with redirection, what you need is tee:

echo "/usr/lib/oracle/12.2/client64/lib" | sudo tee /etc/ld.so.conf.d/oracle-client-12.2.conf
Comment by Freddy Alexander Perez [ 2020 Feb 14 ]

Thanks for you help, the command that I received for you was the solution:

 

echo "/usr/lib/oracle/12.2/client64/lib" | sudo tee /etc/ld.so.conf.d/oracle-client-12.2.conf

 

 

 

 

 

 

Generated at Fri Apr 04 12:17:07 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.