SonarCloud scanning failed with Bitbucket pipeline for SQL and PL/SQL of Oracle Database

In the BitBucket pipeline we found that SonarCloud is not able to connect to the configured in sonar_project.properties file.

  • BitBucket Cloud is the repository
  • BitBucket Cloud is the CI system used
  • SQL & PL / SQL Languages are used with the repository for analysis
  • The SonarCloud project is private
  • Error observed with BitBucket pipeline
    ERROR Error during SonarScanner Engine execution
    java.lang.IllegalStateException: SQLException occurred while loading the Data Dictionary.
    at com.sonar.plsql.plugin.C.A(Unknown Source)
    at com.sonar.plsql.plugin.C.(Unknown Source)
    at com.sonar.plsql.plugin.I.execute(Unknown Source)

Caused by: oracle.net.ns.NetException: ORA-12170: Cannot connect. TCP connect timeout of 20000ms for host. (CONNECTION_ID=kDg34FFxSS+skzajxLv6Xw==)

at oracle.net.nt.TcpNTAdapter.handleEstablishSocketException(TcpNTAdapter.java:385)
at oracle.net.nt.TcpNTAdapter.establishSocket(TcpNTAdapter.java:350)

We have whitelisted below IP addresses and however its not successful to connect DB which residing in our private network.
IPv4 inbound for bitbucket.org, api.bitbucket.org, and altssh.bitbucket.org
104.192.136.0/21
185.166.140.0/22
13.200.41.128/25

SonarQube Cloud currently allows the following static IP addresses for outgoing calls to supported DevOps platforms (GitHub, GitLab, Azure DevOps Services, and BitBucket Cloud):

Please suggest your inputs on valid IP address for SonarQube and BitBucket Cloud to run the pipeline successfully.

Thanks,
Raghunath

Hey there.

For whitelisting IP addresses, you’re going to want to focus on the Valid IP addresses for Bitbucket Pipelines build environments section of the Atlassian documentation, and not Valid IP addresses for bitbucket.org, api.bitbucket.org, and [altssh.bitbucket.org](http://altssh.bitbucket.org/)