oracle-database-operator icon indicating copy to clipboard operation
oracle-database-operator copied to clipboard

ORD Pod Crash looping

Open tabbyl21 opened this issue 3 years ago • 10 comments

I tried to create a CDB using the cdb.yaml provided however its status is stuck as "ValidatingPods' and the Message is 'Waiting for ORDS Pod(s) to be ready'. The logs from the cdb-dev-ords pod are : `cp: cannot create regular file '/opt/oracle/ords/params/ords_params.properties': No such file or directory sed: can't read /opt/oracle/ords/params/ords_params.properties: No such file or directory sed: can't read /opt/oracle/ords/params/ords_params.properties: No such file or directory sed: can't read /opt/oracle/ords/params/ords_params.properties: No such file or directory sed: can't read /opt/oracle/ords/params/ords_params.properties: No such file or directory sed: can't read /opt/oracle/ords/params/ords_params.properties: No such file or directory Warning: Support for executing: java -jar ords.war has been deprecated. Please add ords to your PATH and use the ords command instead. Run the following command to add ords to your PATH:

echo -e 'export PATH="$PATH:/opt/oracle/ords/bin"' >> ~/.bash_profile

Start a new shell to pick up this change.

ORDS: Release 22.2 Production on Thu Sep 08 19:43:10 2022

Copyright (c) 2010, 2022, Oracle.

Configuration: /home/oracle/

Unknown command: ords install [simple]

Use ords install --help to review the help for this command spawn java -jar /opt/oracle/ords/ords.war user sql_admin SQL Administrator Warning: Support for executing: java -jar ords.war has been deprecated. Please add ords to your PATH and use the ords command instead. Run the following command to add ords to your PATH:

echo -e 'export PATH="$PATH:/opt/oracle/ords/bin"' >> ~/.bash_profile

Start a new shell to pick up this change.

ORDS: Release 22.2 Production on Thu Sep 08 19:43:12 2022

Copyright (c) 2010, 2022, Oracle.

`

tabbyl21 avatar Sep 08 '22 19:09 tabbyl21

It seems that you have downloaded the wrong ORDS version. DBoperator supports ords 21.4.3 the ; DBoperator with ords 22.2 is on the way

mmalvezz avatar Sep 12 '22 13:09 mmalvezz

Gotcha, I downloaded the ords service from here: https://www.oracle.com/tools/ords/ords-downloads-2143.html . Is there anything else that corresponds to version 21.4.3 ?

tabbyl21 avatar Sep 13 '22 20:09 tabbyl21

Right, this is the correct link

mmalvezz avatar Sep 14 '22 08:09 mmalvezz

So thats the ords version I am using with the pod crashlooping. Is there anything else I need to configure.

tabbyl21 avatar Sep 14 '22 17:09 tabbyl21

Based on the log output you provided above, you are using ORDS 22.2: . ORDS: Release 22.2 Production on Thu Sep 08 19:43:10 2022 . and not the required/supported 21.4.3

rcitton-oracle avatar Sep 15 '22 06:09 rcitton-oracle

Gotcha! How would I get/use 21.4.3? I have the zip file for 21.4.3 (downloaded from here: https://www.oracle.com/tools/ords/ords-downloads-2143.html ) in my ords directory and the dockerfile is using that zip. Here is the output of running ls on my ords dir cdbadmin.properties.tmpl '#Dockerfile#' Dockerfile ords-21.4.3.117.0405.zip ords_params.properties.tmpl runOrds.sh setupwebuser.sh standalone.properties.tmpl

Output from Running kubectl get events -n oracle-database-operator-system LAST SEEN TYPE REASON OBJECT MESSAGE 34m Normal Pulling pod/cdb-dev-ords-rs-dsk72 Pulling image "__omitted/oracle/ords:21.4.3" 4m11s Warning BackOff pod/cdb-dev-ords-rs-dsk72 Back-off restarting failed container

tabbyl21 avatar Sep 15 '22 17:09 tabbyl21

here You can follow the steps output on making ORDS 21.4.3. I wonder if you see anything different from what you have done? . You could drop ords pod: "kubectl delete -f cdb.yaml" and in case retry building the new image as above url

rcitton-oracle avatar Sep 16 '22 06:09 rcitton-oracle

So I removed all of my local docker images and re ran all of the steps. When I run the command kubectl apply -f config/samples/onpremdb/cdb.yaml and then kubectl get cdb.database.oracle.com -A The output is NAMESPACE NAME CDB NAME DB SERVER DB PORT SCAN NAME REPLICAS STATUS MESSAGE oracle-database-operator-system cdb-dev devcdb [omitted] 1521 devdb 1 Failed Check DB connection parameters And the cdb-dev-ords pod terminates pretty quickly.

tabbyl21 avatar Oct 06 '22 19:10 tabbyl21

What should the 'Database Server Name' , 'Database Service Name' and 'Scan Name ' be set to. I was also wondering what the difference between the yaml file here and here

tabbyl21 avatar Oct 06 '22 20:10 tabbyl21

Make sure to set dbServer: equal to your hostname or scan name if you are using RAC , The parameter scanName: is redundant and is bound to be removed. To debug this kind of connection issue during installation you can try to get pod log information before it dies
/usr/bin/kubectl logs /usr/bin/kubectl get pods -n oracle-database-operator-system|grep ords|cut -d ' ' -f 1 -n oracle-database-operator-system or otherwise you can run the ords installation manually by recreating the ords image in this way sed -i 's/$ORDS_HOME/$RUN_FILE/["/usr/sbin/init"]/g' Dockerfile && docker build -t oracle/ords-dboper:latest . once you have reloaded the ords image in your registry and redeployed the ords pod connect to the pod and execute the installation script /opt/oracle/ords/runOrds.sh

mmalvezz avatar Oct 06 '22 22:10 mmalvezz