"IO Error: Invalid number format for port number" when connecting to Oracle database
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
Bitbucket Server is setup manually with Oracle as backend, as opposed to migrating database after setup is complete.
After configuration is complete and bitbucket.properties is created with the required details, the following error(s) appear in the atlassian-bitbucket.log:
1
2
3
4
5
6
7
8
9
....
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: IO Error: Invalid number format for port number
....
....
Caused by: java.sql.SQLRecoverableException: IO Error: Invalid number format for port number
....
....
Caused by: oracle.net.ns.NetException: Invalid number format for port number
....
Cause
JDBC Url format incorrect in bitbucket.properties.
bitbucket.properties
1
jdbc.url=jdbc:oracle:thin:@//dfw-vu-devodb1.uat.svbank.com:1526:DEVOPSPOCDB
Resolution
Changed the Url as follows:
bitbucket.properties
1
jdbc.url=jdbc:oracle:thin:@//dfw-vu-devodb1.uat.svbank.com:1526/DEVOPSPOCDB
There should be a slash "/" rather than a colon ":" before the database name/SID.
Was this helpful?