JDBC driver uses default port (5433) even when different port is specified
I've configured a DB with a port that differs from the default one (58001 instead of 5433). I can connect to the DB just fine with 'vsql -p 58001'. However, if I try to hook up to the DB using the JDBC driver ("jdbc:vertica://localhost:58001/mydb"), the connection fails, since it tries to use the default port (5433) anyway: ----- Caused by: java.sql.SQLException: [Vertica][VJDBC](100176) Failed to connect to host localhost on port 5433. Reason: Connection refused at com.vertica.io.ProtocolStream.(Unknown Source) at com.vertica.core.VConnection.connect(Unknown Source) at com.vertica.jdbc.BaseConnectionFactory.doConnect(Unknown Source) at com.vertica.jdbc.AbstractDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:579) at java.sql.DriverManager.getConnection(DriverManager.java:221) ----- I can confirm that I am not sending 5433 as the port when setting up the connection, so perhaps the JDBC driver doesn't check the port I give it, and always uses the default? I'm using the Vertica community edition, v6.1.2-0 on a SuSE machine. Thanks for your help.
0
Comments