9 years ago
Cloned JDBC Datasource doesn't preserve DB credentials
Hello,
The title says it all really. I cloned a custom JDBC datasource which already had credentials filled in, but the credentials weren't preserved. I wasn't told about this and had to go digging in the collector logs:
[06-03 07:19:34.455 UTC] [MSG] [DEBUG] [pool-29-thread-29::collector.jdbc:Task:155185:db-server.some.where:PostgresServer-5432:jdbc:166] [JDBCTask._collect:223] Create JDBC connection, CONTEXT=timeout=10s, url=jdbc:postgresql://db-server.some.where:5432/, username=, passwordLength=0 [06-03 07:19:34.463 UTC] [MSG] [ERROR] [pool-29-thread-29::collector.jdbc:Task:155185:db-server.some.where:PostgresServer-5432:jdbc:166] [JDBCTask._collect:231] Failed to create JDBC connection, CONTEXT=timeout=10s, url=jdbc:postgresql://db-server.some.where:5432/, username=, passwordLength=0, EXCEPTION=FATAL: no PostgreSQL user name specified in startup packet org.postgresql.util.PSQLException: FATAL: no PostgreSQL user name specified in startup packet at org.postgresql.Driver$ConnectThread.getResult(Driver.java:341) at org.postgresql.Driver.connect(Driver.java:264) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at com.santaba.agent.collector3.jdbc.JDBCTask._collect(JDBCTask.java:228) at com.santaba.agent.collector3.DataCollectingTask.execute(DataCollectingTask.java:123) at com.santaba.agent.collector3.CollectingTaskExecutionRunable.run(CollectingTaskExecutionRunable.java:20) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
I've a href="https://communities.logicmonitor.com/topic/751-debugging-information/" rel="">mentioned this already, but it would be pretty useful to have the above lines in a popup window or error log right in the web UI, rather than digging into the collector logs.