-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Affects Version/s: 6.16.0
-
Fix Version/s: 6.18.0
-
Component/s: Database, Docker Image
-
Labels:
-
Severity:Critical
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 ':' '/')
- is duplicated by
-
RTFACT-20371 Docker Image Fails to start with Oracle DB
- Ready for Code Review
-
RTFACT-18903 Artifactory's entrypoint function, waitForDB, does not handle all oracle tns names
- Ready for Code Review