ORA-12514, TNS:listener does not currently know of service requested in connect descriptor

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

Symptoms

The following appears in the atlassian-bitbucket.log when testing a connection to an OracleDB:

1 2 3 2012-10-17 15:59:55,818 WARN [http-7990-17] bitbucket 959x29x1 1m1q59y 10.11.44.156 "POST /admin/db/edit HTTP/1.1" c.a.s.i.m.DefaultMigrationService A connection could not be opened with the DataSource java.sql.SQLException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor ... 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 

Cause

Bitbucket Server does not support connecting to Oracle servers using a TNS Alias or SID for identification -BSERV-4148 - Support connecting to Oracle with SID or TNS name.

Resolution

As currently Bitbucket Server supports connecting to an Oracle DB only using a Service Name (refer to the "Database Name" parameter on the table you'll see on this link) you'll need to configure a Service Name for your database and specify that as a connection parameter on the "Database Name" field.

If you are not using TNS Alias to connect, then please check the JDBC URL in your bitbucket.properties file, in particular, the port number your database is listening on. The JDBC URL for Oracle is of the form:

1 jdbc.url=jdbc:oracle:thin:@//HOSTNAME:PORT/SERVICE_NAME

For more information what Service Name is, please refer to Defining Database Services.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.