Network timeout error while connecting to Oracle SQL database with runner

Problem to solve

I am facing the following network timeout error while connecting to oracle database - ORA-12170 - TCP connect timeout error. I am using sqlcl in gitlab runner to connect with the database.

Configuration

The following configuration is used in gitlab yml file

image: ubuntu:22.04

    - export SQLCL_VERSION="25.4.2.044.1837"
    - export SQLCL_ZIP="sqlcl-${SQLCL_VERSION}.zip"
    - export SQLCL_URL="https://download.oracle.com/otn_software/java/sqldeveloper/${SQLCL_ZIP}"
  - sql -v
    - |
      sql <oracle-db> <<EOF
      select 'CONNECTED_OK' from dual;
      exit
      EOF

The network timeout error is raised before the final step.

Thanks for taking the time to be thorough in your request, it really helps! :blush:

Verify that the GitLab Runner host which executes the job, can reach the Oracle database server, e.g. by invoking the Oracle sqlcl command directly on the host. In my experience, database servers are often locked down for remote access, only granting access by IP address or local clients. That needs an Oracle DBA’s help then.