Ad Widget

Collapse

dbforbix run failed,but orabbix can monitor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Phoenix
    Junior Member
    • Apr 2015
    • 7

    #1

    dbforbix run failed,but orabbix can monitor

    Hello, everyone:
    I have a problem.dbforbix can monitor oracle,mysql,mssql.I try to monitor oracle,run command "/etc/init.d/dbforbix start" is failed.
    [root@localhost dbforbix]# /etc/init.d/dbforbix start
    Starting DBforBIX service:
    [root@localhost dbforbix]# Stopping
    java.lang.Exception: ERROR on main - Connections is empty
    at com.smartmarmot.dbforbix.DBforBIX.run(DBforBIX.jav a:106)
    at com.smartmarmot.dbforbix.bootstrap.main(bootstrap. java:45)

    check the log:
    2015-04-16 09:21:17,994 [main] INFO DBforBIX - Starting DBforBIX Version 0.6
    2015-04-16 09:21:18,037 [main] INFO DBforBIX - DBforBIX started with pid:GNU libgcj 4.4.7 20120313
    (Red Hat 4.4.7-11) [15733
    2015-04-16 09:21:18,037 [main] INFO DBforBIX - PidFile -> ./logs/dbforbix.pid
    2015-04-16 09:21:18,051 [main] ERROR DBforBIX - Error when attempting to obtain DB Driver: oracle.j
    dbc.OracleDriver on Thu Apr 16 09:21:18 CST (China) 2015java.lang.ClassNotFoundException: oracle.jdb
    c.OracleDriver not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:lib/commons-codec-1.4.jar,f
    ile:lib/commons-daemon-1.0.5.jar,file:lib/commons-dbcp-1.4.jar,file:lib/commons-lang-2.5.jar,file:li
    b/commons-logging-1.1.1.jar,file:lib/commons-pool-1.5.4.jar,file:lib/jtds-1.2.5.jar,file:lib/log4j-1
    .2.15.jar,file:lib/mysql-connector-java-5.1.14-bin.jar,file:lib/postgresql-9.0-801.jdbc4.jar,file:./
    ,file:./dbforbix-0.6.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
    2015-04-16 09:21:18,076 [main] ERROR DBforBIX - Error on Configurator for database ORACLEDB1 -->No
    driver found for jdbcracle:thin:@10.2.0.150:1521:OCP
    2015-04-16 09:21:18,076 [main] INFO DBforBIX - This Database ORACLEDB1 removed
    2015-04-16 09:21:18,076 [main] ERROR DBforBIX - ERROR on main - Connections is empty

    I check my config file,can't find error.
    1)My oracle database's TNS is started.
    [root@ocp ~]# su - oracle -c "lsnrctl status"

    LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 16-APR-2015 10:01:55

    Copyright (c) 1991, 2010, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC15 21)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
    Start Date 16-APR-2015 08:43:41
    Uptime 0 days 1 hr. 18 min. 14 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u01/app/11.2.0/dbhome_1/network/admin/listener.ora
    Listener Log File /u01/app/diag/tnslsnr/ocp/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC15 21)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.2.0.1 50)(PORT=1521)))
    Services Summary...
    Service "ocpXDB.edu.cn" has 1 instance(s).
    Instance "ocp", status READY, has 1 handler(s) for this service...
    Service "orcl.edu.cn" has 1 instance(s).
    Instance "ocp", status READY, has 1 handler(s) for this service...
    The command completed successfully
    [root@ocp ~]# ps -ef|grep ora_pmon
    oracle 16732 1 0 02:00 ? 00:00:00 ora_pmon_ocp
    root 32466 26112 0 10:02 pts/1 00:00:00 grep ora_pmon
    [root@ocp ~]# [/I]
    2)java version
    [root@ocp ~]# java -version
    java version "1.6.0_17"
    OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-x86_64)
    OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
    3)zabbix agent can access zabbix server,not limit
    4)dbforbix config :
    [root@localhost dbforbix]# more conf/config.props|grep -v '^#'
    ZabbixServerList=ZabbixServer1

    ZabbixServer1.Address=10.2.4.188
    ZabbixServer1.Port=10051


    DBforBIX.PidFile=./logs/dbforbix.pid
    DBforBIX.Sleep=30
    DBforBIX.MaxThreadNumber=100

    DatabaseList=ORACLEDB1

    DatabaseList.MaxActive=10
    DatabaseList.MaxWait=100
    DatabaseList.MaxIdle=1
    ORACLEDB1.Url=jdbcracle:thin:@10.2.0.150:1521:OCP
    ORACLEDB1.User=zabbix
    ORACLEDB1.Password=zabbix
    ORACLEDB1.DatabaseType=oracle
    ORACLEDB1.QueryListFile=./conf/oraclequery.props
    ORACLEDB1.MaxActive=10
    ORACLEDB1.MaxWait=100
    ORACLEDB1.MaxIdle=1


    The error is connection error,need help
  • erisan500
    Senior Member
    Zabbix Certified Specialist
    • Aug 2005
    • 285

    #2
    you need to copy ojdbc6.jar to the /opt/dbforbix/lib folder.

    ojdbc6.jar can be found in the C:\Oracle\product\11.2.0\dbhome_1\jdbc\lib folder.
    EriSan
    Zabbix Certified Specialist

    Comment

    Working...