[Schemaspy-users] can't connect to a database
Brought to you by:
johncurrier
|
From: Tomi N/A <he...@gm...> - 2012-07-20 15:23:19
|
Hello, I've been using SchemaSpy with pleasure for years with various databases, but right now I can't connect to a locally hosted PostgreSQL database: $ java -jar /opt/schema\ spy/schemaSpy_5.0.0.jar -t pgsql -db mydb -u postgres -o ~/sspy -host localhost -port 5433 -dp /usr/share/java/postgresql.jar Using database properties: [/opt/schema spy/schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/pgsql.properties Failed to connect to database URL [jdbc:postgresql://localhost/mydb] org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:136) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) ...(snip)... It appears to make no sense since it is very easy to check that something is, in fact, listening on the specified port using telnet: tnalfir@tasha:~$ telnet localhost 5433 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. I can connect to the database in question using SQL Workbench, which uses the same JDBC driver I use with SchemaSpy, so I know that it is PostgreSQL that is listening on the port and that the the JDBC driver isn't to blame. The only thing that's non-standard is the port (5433 instead of 5432), but I specify it explicitly so I assumed it would not be a problem. Any ideas what the problem might be? Thanks. Cheers, Tomislav |