Confluence 5.8 setup wizard fails when creating the embedded H2 database on Mac OSX

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When setting up Confluence 5.8 on Mac OSX using the embedded H2 database, the following error appears in the logs and setup does not complete:

This issue only affects users installing Confluence 5.8 on Mac OSX and using the embedded H2 (trial) database.

The embedded H2 database is not supported for production environments. See Supported Platforms for more information. 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2015-05-12 15:28:54,167 WARN [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1] [mchange.v2.resourcepool.BasicResourcePool] run com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@3c36ff04 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: -- referer: http://localhost:8080/confluence/setup/setupdbchoice-start.action | url: /confluence/setup/setupembeddeddb-default.action | userName: anonymous | action: setupembeddeddb-default org.h2.jdbc.JdbcSQLException: Remote connections to this server are not allowed, see -tcpAllowOthers [90117-176] at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) at org.h2.message.DbException.get(DbException.java:178) at org.h2.message.DbException.get(DbException.java:154) at org.h2.message.DbException.get(DbException.java:143) at org.h2.server.TcpServerThread.run(TcpServerThread.java:84) at java.lang.Thread.run(Thread.java:745) at org.h2.engine.SessionRemote.done(SessionRemote.java:606) at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:119) at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:430) at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:311) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107) at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91) at org.h2.Driver.connect(Driver.java:74) at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134) at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182) at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137) at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014) at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32) at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810) at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

See CONFSERVER-37625 - Setup wizard fails when creating embedded H2 database on Mac OSX for more information or to follow the progress of this issue.

Workaround

If you need to set up Confluence 5.8 on Mac OSX (for example to evaluate Confluence, or for ecosystem developers wishing to test their plugins) you will need to modify your /etc/hosts file to include your hostname as follows:

  1. Ensure that /etc/hosts maps 127.0.0.1 to both localhost and your hostname:

    1 2 3 4 ... 127.0.0.1 localhost <hostname> ::1 localhost <hostname> ...
  2. Purge your local ~/.m2/repository/com/atlassian/confluence directory

  3. Execute:

    1 2 3 4 5 sudo scutil --set HostName <hostname> sudo scutil --set LocalHostName <hostname> sudo scutil --set ComputerName <hostname> dscacheutil -flushcache sudo shutdown -r now
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.