Details
-
Bug
-
Resolution: Unresolved
-
Major
-
2.10 GA
-
False
-
False
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Not Started
-
Undefined
Description
- After deploying the APIManger, system-app-#-hook-pre pod goes to crash loopback with the following error.
Creating scope :by_name. Overwriting existing method Cinstance.by_name. [core] non-native log levels verbose, notice, critical emulated using UNKNOWN severity [core] ==> GET status [{}] [core] <== 200 GET status [{:status=>"ok", :version=>{:backend=>"3.1.0"}}] (0.009585783) Backend Internal API version 3.1.0 status: ok (1.8ms) SELECT 1 FROM v$database WHERE cdb = 'NO' AND open_mode = 'READ WRITE' UNION ALL SELECT 1 FROM v$pdbs WHERE name COLLATE BINARY_CI = 'xxxxxx.xxxx.xxx.example.com' AND open_mode = 'READ WRITE' Cannot connect to oracle_enhanced://SYSTEM@database.host.vm.com/xxxxxx.xxxx.xxx.example.com
- The system database is configured as Oracle 19c Database in CDB mode (Containerized DB) and using a PDB (Pluggable Database)
- We have followed the instructions in docuemntation
- Also note that the client libraries available for version 19 is 19.11. The documentation indicates 19.8 which is no longer available.
- Please investigate this issue and provide a solution.
Summary:
The issue happens when the service name does not match the name of the DB in the v$pdbs table, for example, when the service name includes the DB domain, i.e. service name is THREESCALE.oracle.example.com and the DB name in v$pdbs is THREESCALE (or anything different).
There is a connection probe that is executed in the System pre-hook (in database.rb before v2.12, and in connection_probe.rb since v2.12), and the SQL queries do not return results in this case, that's why the DB connection is considered failed and the setup process does not progress.
The value for the #{connection_config[:database]} variable is taken from the connection string - it's the last part after /, for example, it is THREESCALE.oracle.example.com for the connection string oracle-enhanced://username:password@host:1521/THREESCALE.oracle.example.com.
Specifying PDB name there may not work (potential error message - ORA-12514: TNS:listener does not currently know of service requested in connect descriptor.
Changing the PDB name to match the service name might also not work, as there is a limit on the length of the PDB name.
The workaround suggested in PR 54 does not always work see comment, and moreover it will not apply for 3scale 2.12 and higher (see this comment on the PR).
Attachments
Issue Links
- is documented by
-
THREESCALE-10753 Show that connection string for oracle might need to be in other format
- New