-
Bug
-
Resolution: Fixed
-
Low
-
5.8
-
OSX
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:
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)
This issue only affects users installing Confluence 5.8.1-RC on Mac OSX and using the embedded H2 (trial) database.
Workaround
If you need to set up Confluence 5.8.1-RC1 on Mac OSX (for example, ecosystem developers that want to test their add-ons prior to the release of 5.8) 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:
... 127.0.0.1 localhost <hostname> ::1 localhost <hostname> ...
2. Purge your local ~/.m2/repository/com/atlassian/confluence directory
3. Execute:
sudo scutil --set HostName <hostname> sudo scutil --set LocalHostName <hostname> sudo scutil --set ComputerName <hostname> dscacheutil -flushcache sudo shutdown -r now
(your hostname must be the same for all three variables)