ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
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
Symptoms
The following appears in the atlassian-bitbucket.log
when testing a connection to an Oracle
DB
:
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:
jdbc.url=jdbc:oracle:thin:@//HOSTNAME:PORT/SERVICE_NAME
For more information what Service Name is, please refer to Defining Database Services.