3

I use the following Schemaspy to connect to one postgreSQL DB successfully. But when I connect to another DB, it reports error "failed to connect to database URL [jdbc....]"

java -jar schemaSpy.jar -t pgsql -db erp -host 122.5.XX.XX -port 2345 -u olive -p zhy -o dbschema -dp postgresql-9.4-1201.jdbc41.jar -s public

I am not postgreSQL expert. The host IP address could be pinged, and I could use pgadmin to connect to the DB.

Is there any postgreSQL setting I need to pay attention for the DB so that it could be connected by schemaspy? or any special port I need to open?

Thanks.

Artil
  • 71
  • 4

2 Answers2

4

Just now I figured out the reason. SchemaSpy has one bug. It ignores -port parameter and always connects to 5432 port. So I change command to -host 122.5.XX.XX:2345 and it connects to DB correctly now.

For the first DB which was successful before, it uses 5432 port and so I didn't notice the issue.

Anyway, it is fixed now. :)

Artil
  • 71
  • 4
1

This bug still exists in the latest release of SchemaSpy 5.0.0 dated 08/16/2010, that is available on SourceForge. The fix for this version is to append the port to the host, as the author suggests above.

There is a new version of SchemaSpy available on github https://github.com/schemaspy/schemaspy

mthorley
  • 2,592
  • 2
  • 18
  • 8