Grails definition:
development {
dataSource {
driverClassName = "org.postgres开发者_StackOverflow中文版ql.Driver"
dialect = org.hibernate.dialect.PostgreSQLDialect
pooled = false
jndiName = null
url = "jdbc:postgresql://10.197.6.214:5432/mydatabase"
dbCreate = "create-drop"
username = "myusername"
password = "password"
}
}
psql statement which can connect:
psql -h 10.197.6.214 -d mydatabase -U myusername
pg_hba.conf:
# IPv4 local connections:
host all all 0.0.0.0/0 trust
# IPv6 local connections:
host all all ::1/128 md5
postgresql.conf
listen_addresses = '*'
port=5432
How could this possibly be happening?
More info: It looks like if I start grails from the machine running the database, startup works, but if I try from another machine, startup fails, despite psql connecting without issue.
Looks like the DataSources.groovy
definition had a bad entry, which caused the main connection bomb at the bottom of the stacktrace. Tracing all the way back up, I had a bad secondary datasource definition.
精彩评论