Bamboo fails with error "ORA-12514, TNS:listener does not currently know of service requested in connect descriptor"

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

    

Summary

When installing Bamboo, or starting it, it will throw an ORA-12514 error, and fail to start.

Environment

  • Any Bamboo supported version.
  • Oracle Database, any version supported.

Diagnosis

When Bamboo is being configured for the first time, or when it's starting up, it will fail on the database connection step. In the logs we will see:

atlassian-bamboo.log
2021-10-25 10:49:38,435 ERROR [localhost-startStop-1] [HikariPool] HikariPool-1 - Exception during pool initialization.
java.sql.SQLRecoverableException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
 
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:874)
       at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:807)
       at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:77)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:767)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:572)
       at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:136)
       at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:369)
       at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:198)
       at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:467)
       at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:541)
       at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
       at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
       at org.hibernate.hikaricp.internal.HikariCPConnectionProvider.configure(HikariCPConnectionProvider.java:59)
       at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:107)
       at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
       at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
       at com.atlassian.bamboo.upgrade.BootstrapTaskConnectionProvider.getConnectionProvider(BootstrapTaskConnectionProvider.java:33)
       at com.atlassian.bamboo.upgrade.BootstrapTaskConnectionProvider.getConnectionProvider(BootstrapTaskConnectionProvider.java:28)
       at com.atlassian.bamboo.upgrade.BootstrapTaskConnectionProvider.getConnection(BootstrapTaskConnectionProvider.java:82)
       at com.atlassian.bamboo.upgrade.utils.impl.BootstrapUpgradeHelper.getDatabaseConnection(BootstrapUpgradeHelper.java:45)
       at com.atlassian.bamboo.upgrade.tasks.validation.BuildNumberInSharedHomeMatchesDatabase.getBuildNumberFromDatabase(BuildNumberInSharedHomeMatchesDatabase.java:96)
(...)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
 
       at oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:289)
       at oracle.net.ns.NSProtocol.connect(NSProtocol.java:365)
       at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1636)
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:606)
       ... 38 more


Cause

The most common cause for a listener not responding is that it is unreachable by Bamboo.

Solution

If the Database can't be reached, then we recommend to try the following:

  • Make sure Oracle is up and running.
  • Make sure Bamboo can reach the Database.



Last modified on Oct 29, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.