vagabondan / DBforBIX

DBforBix since 3.0 version is managed from Zabbix Web interface and behaves like an ordinary active Zabbix Proxy. Current version: DBforBIX 3.2.0
GNU General Public License v3.0
8 stars 1 forks source link

Implement autoreconnect on connection closed #1

Closed vagabondan closed 7 years ago

vagabondan commented 7 years ago

[2017-02-15 15:58:08] [WARN ] [0001zabtevapp01:10051/TEV.MSK.DB4bix/TEV.MSK.WF.Queue.DB4bix/CRMR_MSK/oracle.discovery.DB4bix.config[wfkpiquery,{$DSN}][run(Scheduler.java:109)]]: could not fetch value oracle.TDBlockEventProcessingQueue java.sql.SQLException: Closed Connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:207) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:867) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:786) at org.apache.commons.dbcp2.cpdsadapter.PooledConnectionImpl.prepareStatement(PooledConnectionImpl.java:250) at org.apache.commons.dbcp2.cpdsadapter.ConnectionImpl.prepareStatement(ConnectionImpl.java:102) at com.smartmarmot.dbforbix.scheduler.SimpleItem.getItemData(SimpleItem.java:49) at com.smartmarmot.dbforbix.scheduler.Scheduler.run(Scheduler.java:100) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) [2017-02-15 15:58:08] [WARN ] [0001zabtevapp01:10051/TEV.MSK.DB4bix/TEV.MSK.WF.Queue.DB4bix/CRMR_MSK/oracle.discovery.DB4bix.config[wfkpiquery,{$DSN}][run(Scheduler.java:109)]]: could not fetch value oracle.duplicateeventmetric2 java.sql.SQLException: Closed Connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:207) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:867) at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:786) at org.apache.commons.dbcp2.cpdsadapter.PooledConnectionImpl.prepareStatement(PooledConnectionImpl.java:250) at org.apache.commons.dbcp2.cpdsadapter.ConnectionImpl.prepareStatement(ConnectionImpl.java:102) at com.smartmarmot.dbforbix.scheduler.SimpleItem.getItemData(SimpleItem.java:49) at com.smartmarmot.dbforbix.scheduler.Scheduler.run(Scheduler.java:100) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505)

vagabondan commented 7 years ago

It's already there. Closed connection is not reproduced.

vagabondan commented 7 years ago

Bug is reproduced. Need full reinitialization on Closed connection exception.

vagabondan commented 7 years ago

Done.