Cannot connect to database

What happened?

A database error occurred, probably because your database connection is misconfigured. You will have to fix this problem and then restart or redeploy Roller before you can proceed. Here's what happened when Roller tried to establish a connection:

  • SUCCESS: Got parameters. Using configuration type JDBC_PROPERTIES
  • -- Using JDBC driver class: org.postgresql.Driver
  • -- Using JDBC connection URL: jdbc:postgresql://
  • -- Using JDBC username: roller_user
  • -- Using JDBC password: [hidden]
  • SUCCESS: loaded JDBC driver class [org.postgresql.Driver]
  • ERROR: unable to obtain database connection. Likely problem: bad connection parameters or database unavailable.

Why did that happen?

In case the clues above are not enough to help you figure out what is going wrong, here are some more details. The root cause of the problem is an exception of type [org.postgresql.util.PSQLException]

To help you debug the problem, here is the stack trace for that exception:

    [org.postgresql.util.PSQLException: The connection attempt failed.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(
	at org.postgresql.core.ConnectionFactory.openConnection(
	at org.postgresql.jdbc.PgConnection.<init>(
	at org.postgresql.Driver.makeConnection(
	at org.postgresql.Driver.connect(
	at java.sql.DriverManager.getConnection(
	at java.sql.DriverManager.getConnection(
	at org.apache.roller.weblogger.ui.core.RollerContext.contextInitialized(
	at org.apache.catalina.core.StandardContext.listenerStart(
	at org.apache.catalina.core.StandardContext.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.core.ContainerBase.addChildInternal(
	at org.apache.catalina.core.ContainerBase.addChild(
	at org.apache.catalina.core.StandardHost.addChild(
	at org.apache.catalina.startup.HostConfig.deployWAR(
	at org.apache.catalina.startup.HostConfig$
	at java.util.concurrent.Executors$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
Caused by: connect timed out
	at Method)
	at org.postgresql.core.PGStream.<init>(
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(
	... 23 more]