Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-20882

Artifactory's Docker entrypoint cannot handle TNS Connection String for Oracle DB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: 2 - Critical
    • Resolution: Done
    • Affects Version/s: 6.16.0
    • Fix Version/s: 6.18.0
    • Component/s: Database, Docker Image
    • Labels:
    • Severity:
      Critical

      Description

      Currently, the artifactory-entrypoint.sh script can only handle the "SID" format of Oracle JDBC connections. It's hard-coded sed commands do not expect the level of parenthesis in place in the updated TNS Connection String model.

      For example, this URL will work with the current implementation:

      url=jdbc:oracle:thin:@localhost:1521:ORCL

      However, this URL will fail during the entrypoint connection test:

      jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=3203))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=artdb)))

       

      This is due to the sed regex, given the error printed:

      2019-12-12 18:50:38 [625 entrypoint-artifactory.sh] Setting DB_URL to jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=REDACTED)(PORT=3203))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=REDACTED))) (ignoring DB_HOST and DB_PORT if set)

      2019-12-12 18:50:38 [445 entrypoint-artifactory.sh] Waiting for DB oracle to be ready on url=jdbc/oracle/thin/@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=REDACTED)(PORT=3203))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=REDACTED))) within 30 seconds

      2019-12-12 18:50:38 [453 entrypoint-artifactory.sh] .

      2019-12-12 18:50:39 [453 entrypoint-artifactory.sh] .

       

      Current sed regex:

      DB_HOST_PORT=$(grep -e '^url=' "$PROPS_FILE" | sed -e 's,.@(.):.*,\1,g' | tr ':' '/')

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              amithk Amith Kumar
              Reporter:
              patrickr Patrick Russell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-20882 -
                  SYNCHRONIZED
                  • Last Sync Date: