oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.58k stars 5.44k forks source link

Oracle 21c: /bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory #2056

Closed xtender closed 2 years ago

xtender commented 3 years ago

Since Oracle 21c has been released, could you add it please too

xtender commented 3 years ago

And could you update images on https://container-registry.oracle.com/ please

marcelo-ochoa commented 3 years ago

I just submitted a PR #2057 to support Docker image build using 21c binary dist. I the meantime you can checkout my branch https://github.com/marcelo-ochoa/docker-images/tree/21c_image Marcelo.

xtender commented 3 years ago

@marcelo-ochoa Hi Marcelo, I've just tried to deploy it after the merge, using

./buildContainerImage.sh -e -v 21.3.0 -o '--build-arg SLIMMING=false'

but got this error:

Step 17/22 : USER root
 ---> Running in 89a3b041a8d8
Removing intermediate container 89a3b041a8d8
 ---> f1d04294a3a0
Step 18/22 : RUN $ORACLE_BASE/oraInventory/orainstRoot.sh &&     $ORACLE_HOME/root.sh
 ---> Running in 9df720e38f37
/bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory
Removing intermediate container 9df720e38f37
The command '/bin/sh -c $ORACLE_BASE/oraInventory/orainstRoot.sh &&     $ORACLE_HOME/root.sh' returned a non-zero code: 127

ERROR: Oracle Database container image was NOT successfully created.
ERROR: Check the output and correct any reported problems with the build operation.
xtender commented 3 years ago

Full log: buildContainerImage.log

abhisbyk commented 3 years ago

@xtender I am not able to reproduce this issue on my machine. I used the main branch of oracle/docker-images repo and the following command to successfully build the image:

./buildContainerImage.sh -e -v 21.3.0 -o '--build-arg SLIMMING=false' Which branch are you using to build the image?

I noticed from your logs that the database setup was not successful and probably orainstRoot.sh is because of this. I am attaching a snap of my logs. You should see the following after successful database setup:

finishing deferred symbolic links:
  bin/lbuilder           -> ../nls/lbuilder/lbuilder
  lib/libocci.so         -> libocci.so.21.1
  lib/libjavavm.a        -> ../javavm/jdk/jdk8/lib/libjavavm.a
  lib/libagtsh.so        -> libagtsh.so.1.0
  lib/libclntsh.so       -> libclntsh.so.21.1
  javavm/lib/jce.jar     -> ../../javavm/jdk/jdk8/lib/jce.jar
  javavm/admin/cbp.jar   -> ../../javavm/jdk/jdk8/admin/cbp.jar
  lib/libclntshcore.so   -> libclntshcore.so.21.1
  jdk/bin/ControlPanel   -> jcontrol
  jdk/jre/bin/ControlPanel -> jcontrol
  javavm/admin/libjtcjt.so -> ../../javavm/jdk/jdk8/admin/libjtcjt.so
  javavm/admin/classes.bin -> ../../javavm/jdk/jdk8/admin/classes.bin
  javavm/lib/security/cacerts -> ../../../javavm/jdk/jdk8/lib/security/cacerts
  javavm/lib/security/README.txt -> ../../../javavm/jdk/jdk8/lib/security/README.txt
  javavm/lib/sunjce_provider.jar -> ../../javavm/jdk/jdk8/lib/sunjce_provider.jar
  javavm/lib/security/java.security -> ../../../javavm/jdk/jdk8/lib/security/java.security
  jdk/jre/lib/amd64/server/libjsig.so -> ../libjsig.so
Launching Oracle Database Setup Wizard...

[WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
   ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2021-08-18_04-58-09AM.log
   ACTION: Identify the list of failed prerequisite checks from the log: installActions2021-08-18_04-58-09AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /opt/oracle/product/21c/dbhome_1/install/response/db_2021-08-18_04-58-09AM.rsp

You can find the log of this install session at:
 /tmp/InstallActions2021-08-18_04-58-09AM/installActions2021-08-18_04-58-09AM.log

As a root user, execute the following script(s):
        1. /opt/oracle/oraInventory/orainstRoot.sh
        2. /opt/oracle/product/21c/dbhome_1/root.sh

Execute /opt/oracle/oraInventory/orainstRoot.sh on the following nodes:
[9835e003f203]
Execute /opt/oracle/product/21c/dbhome_1/root.sh on the following nodes:
[9835e003f203]

Successfully Setup Software with warning(s).
Moved the install session logs to:
 /opt/oracle/oraInventory/logs/InstallActions2021-08-18_04-58-09AM
Removing intermediate container 9835e003f203
 ---> 1dc1119eea1a
Step 14/22 : FROM base
 ---> 2f6848e0cbf3
Step 15/22 : USER oracle
 ---> Running in 3a016c06bf82
Removing intermediate container 3a016c06bf82
 ---> 559fe1204896
Step 16/22 : COPY --chown=oracle:dba --from=builder $ORACLE_BASE $ORACLE_BASE
 ---> ceab8a3b273a
Step 17/22 : USER root
 ---> Running in 32dfbc5e07b5
Removing intermediate container 32dfbc5e07b5
 ---> b23fa8b71a1a
Step 18/22 : RUN $ORACLE_BASE/oraInventory/orainstRoot.sh &&     $ORACLE_HOME/root.sh
 ---> Running in 93b44939df7e
Changing permissions of /opt/oracle/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /opt/oracle/oraInventory to dba.
The execution of the script is complete.
Check /opt/oracle/product/21c/dbhome_1/install/root_93b44939df7e_2021-08-18_05-04-45-751588393.log for the output of root script
Removing intermediate container 93b44939df7e
 ---> 5159d68cb002
Step 19/22 : USER oracle
 ---> Running in c3442eb4efcc
Removing intermediate container c3442eb4efcc
 ---> 7609bc142760
Step 20/22 : WORKDIR /home/oracle
 ---> Running in c69ba7a87181
Removing intermediate container c69ba7a87181
 ---> 528bfb37b49b
Step 21/22 : HEALTHCHECK --interval=1m --start-period=5m    CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1
 ---> Running in 5906f20af969
Removing intermediate container 5906f20af969
 ---> 75341e819891
Step 22/22 : CMD exec $ORACLE_BASE/$RUN_FILE
 ---> Running in db825efa260d
Removing intermediate container db825efa260d
 ---> 7f9a8da5b70b
Successfully built 7f9a8da5b70b
Successfully tagged oracle/database:21.3.0-ee

  Oracle Database container image for 'ee' version 21.3.0 is ready to be extended:

    --> oracle/database:21.3.0-ee

  Build completed in 786 seconds
akoni50 commented 3 years ago

@abhisbyk I wanted root privileges on the container to install additional packages, is there any predefined password for gaining root access?

yunus-qureshi commented 3 years ago

@akoni50 you may try docker exec -u root /bin/bash

abhisbyk commented 3 years ago

@akoni50 In addition to what @yunus-qureshi explained above, you need to change the working directory using -woption. The working directory is set to /home/oracle/. Only oracle user has permissions to it. So, you can use the following command docker exec -it -u root -w / <container-name> /bin/bash

no-response[bot] commented 2 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.