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.54k stars 5.42k forks source link

OracleDatabase 19.3.0 ERROR [stage-2 2/3] 11/17 orainstRoot.sh: No such file or directory given enough storage #1872

Closed tsvirs closed 2 years ago

tsvirs commented 3 years ago

Hello, when execute sudo ./buildContainerImage.sh -v 19.3.0 -e, during the execution of the creation of the image... ` > [stage-2 2/3] RUN /opt/oracle/oraInventory/orainstRoot.sh && /opt/oracle/product/19c/dbhome_1/root.sh:

13 0.925 /bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory

`

I'm not sure if it might due to insufficient space because it seems the storage is more than enough.

/ # df -B 1G / Filesystem 1G-blocks Used Available Use% Mounted on overlay 126 70 49 59% /

yunus-qureshi commented 3 years ago

Please take a look at this @Mahi0911

mahipalm0911 commented 3 years ago

Can you confirm the amount of space that you have available inside your container can you run " df -B 1G / " inside the container ( Any of Running Container ) and post the output, please? If the available space is greater than 18gb , please run the build again . This error may be because the build has not created all the files with necessary permissions

tsvirs commented 3 years ago

image

tsvirs commented 3 years ago

/ # df -B 1G / Filesystem 1G-blocks Used Available Use% Mounted on overlay 126 70 49 59% /

mahipalm0911 commented 3 years ago

could you please post the dockerfile you are using @tsvirs

tsvirs commented 3 years ago

image

mahipalm0911 commented 3 years ago

I mean "Dockerfile" Location of the file - OracleDatabase/SingleInstance/dockerfiles/19.3.0/Dockerfile

tsvirs commented 3 years ago

LICENSE UPL 1.0

#

Copyright (c) 2018, 2020 Oracle and/or its affiliates.

#

ORACLE DOCKERFILES PROJECT

--------------------------

This is the Dockerfile for Oracle Database 19c

REQUIRED FILES TO BUILD THIS IMAGE

----------------------------------

(1) db_home.zip

Download Oracle Database 19c Enterprise Edition or Standard Edition 2 for Linux x64

from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

#

HOW TO BUILD THIS IMAGE

-----------------------

Put all downloaded files in the same directory as this Dockerfile

Run:

$ docker build -t oracle/database:19.3.0-${EDITION} .

#

Pull base image

---------------

FROM oraclelinux:7-slim as base

Labels

------

LABEL "provider"="Oracle" \ "issues"="https://github.com/oracle/docker-images/issues" \ "volume.data"="/opt/oracle/oradata" \ "volume.setup.location1"="/opt/oracle/scripts/setup" \ "volume.setup.location2"="/docker-entrypoint-initdb.d/setup" \ "volume.startup.location1"="/opt/oracle/scripts/startup" \ "volume.startup.location2"="/docker-entrypoint-initdb.d/startup" \ "port.listener"="1521" \ "port.oemexpress"="5500"

Argument to control removal of components not needed after db software installation

ARG SLIMMING=true

Environment variables required for this build (do NOT change)

-------------------------------------------------------------

ENV ORACLE_BASE=/opt/oracle \ ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 \ INSTALL_DIR=/opt/install \ INSTALL_FILE_1="LINUX.X64_193000_db_home.zip" \ INSTALL_RSP="db_inst.rsp" \ CONFIG_RSP="dbca.rsp.tmpl" \ PWD_FILE="setPassword.sh" \ RUN_FILE="runOracle.sh" \ START_FILE="startDB.sh" \ CREATE_DB_FILE="createDB.sh" \ SETUP_LINUX_FILE="setupLinuxEnv.sh" \ CHECK_SPACE_FILE="checkSpace.sh" \ CHECK_DB_FILE="checkDBStatus.sh" \ USER_SCRIPTS_FILE="runUserScripts.sh" \ INSTALL_DB_BINARIES_FILE="installDBBinaries.sh" \ RELINK_BINARY_FILE="relinkOracleBinary.sh" \ SLIMMING=$SLIMMING

Use second ENV so that variable get substituted

ENV PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch/:/usr/sbin:$PATH \ LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib \ CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Copy files needed during both installation and runtime

-------------

COPY $SETUP_LINUX_FILE $CHECK_SPACE_FILE $INSTALL_DIR/ COPY $RUN_FILE $START_FILE $CREATE_DB_FILE $CONFIG_RSP $PWD_FILE $CHECK_DB_FILE $USER_SCRIPTS_FILE $RELINK_BINARY_FILE $ORACLE_BASE/

RUN chmod ug+x $INSTALL_DIR/*.sh && \ sync && \ $INSTALL_DIR/$CHECK_SPACE_FILE && \ $INSTALL_DIR/$SETUP_LINUX_FILE && \ rm -rf $INSTALL_DIR

#############################################

-------------------------------------------

Start new stage for installing the database

-------------------------------------------

#############################################

FROM base AS builder

ARG DB_EDITION

Copy DB install file

COPY --chown=oracle:dba $INSTALL_FILE_1 $INSTALL_RSP $INSTALL_DB_BINARIES_FILE $INSTALL_DIR/

Install DB software binaries

USER oracle RUN chmod ug+x $INSTALL_DIR/*.sh && \ sync && \ $INSTALL_DIR/$INSTALL_DB_BINARIES_FILE $DB_EDITION

#############################################

-------------------------------------------

Start new layer for database runtime

-------------------------------------------

#############################################

FROM base

USER oracle COPY --chown=oracle:dba --from=builder $ORACLE_BASE $ORACLE_BASE

USER root RUN $ORACLE_BASE/oraInventory/orainstRoot.sh && \ $ORACLE_HOME/root.sh

USER oracle WORKDIR /home/oracle

HEALTHCHECK --interval=1m --start-period=5m \ CMD "$ORACLE_BASE/$CHECK_DB_FILE" >/dev/null || exit 1

Define default command to start Oracle Database.

CMD exec $ORACLE_BASE/$RUN_FILE

tsvirs commented 3 years ago

Dockerfile.zip

tsvirs commented 3 years ago

Still, no idea how to get through it.

mahipalm0911 commented 3 years ago

I think it has not happened on a clean install. orainstRoot.sh script is only not created if an oraInventory is already present.

Is there any cached or dangling image ?

tsvirs commented 3 years ago

=> [builder 2/2] RUN chmod ug+x /opt/install/*.sh && sync && /opt/install/installDBBinaries.sh ee 85.7s => [stage-2 1/3] COPY --chown=oracle:dba --from=builder /opt/oracle /opt/oracle 100.7s => ERROR [stage-2 2/3] RUN /opt/oracle/oraInventory/orainstRoot.sh && /opt/oracle/product/19c/dbhome_1/root.sh

Would you think it might be a permission problem? Because when in [stage-2 1/3], there were not any /opt/oracle directories have been created in my /opt/ .

mahipalm0911 commented 3 years ago

$ docker builder prune This removes build cache . Run this command and try building the image again

tsvirs commented 3 years ago

WARNING! This will remove all dangling build cache. Are you sure you want to continue? [y/N] y Deleted build cache objects:

Total reclaimed space: 87.99GB

=> [builder 2/2] RUN chmod ug+x /opt/install/*.sh && sync && /opt/install/installDBBinaries.sh ee 70.5s => [stage-2 1/3] COPY --chown=oracle:dba --from=builder /opt/oracle /opt/oracle 65.1s => ERROR [stage-2 2/3] RUN /opt/oracle/oraInventory/orainstRoot.sh && /opt/oracle/product/19c/dbhome_1/root.sh 0.8s


tsvirs commented 3 years ago

=> ERROR [stage-2 2/3] RUN /opt/oracle/oraInventory/orainstRoot.sh && /opt/oracle/product/19c/dbhome_1/root.sh 0.8s


[stage-2 2/3] RUN /opt/oracle/oraInventory/orainstRoot.sh && /opt/oracle/product/19c/dbhome_1/root.sh:

13 0.715 /bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory


executor failed running [/bin/sh -c $ORACLE_BASE/oraInventory/orainstRoot.sh && $ORACLE_HOME/root.sh]: exit code: 127

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

mahipalm0911 commented 3 years ago

Are you available for a call on zoom ?

mahipalm0911 commented 3 years ago

check the size of " LINUX.X64_193000_db_home.zip " file and make sure the file is properly downloaded . could you paste the md5 sum here .

fuero commented 3 years ago

Same here.

The file's checksum seems alright:

$ sha256sum dockerfiles/19.3.0/LINUX.X64_193000_db_home.zip
ba8329c757133da313ed3b6d7f86c5ac42cd9970a28bf2e6233f3235233aa8d8  dockerfiles/19.3.0/LINUX.X64_193000_db_home.zip

It does seem like the installer crashes:

+ /opt/oracle/product/19c/dbhome_1/runInstaller -silent -force -waitforcompletion -responsefile /opt/install/db_inst.rsp -ignorePrereqFailure
Launching Oracle Database Setup Wizard...

[FATAL] [INS-32038] The operating system group (dba), specified for central inventory (oraInventory) ownership, is invalid.
   CAUSE: The user performing the installation (oracle) is not a member of the operating system group (dba).
   ACTION: Specify an operating system group that the installing user (oracle) is a member of. All the members of this operating system group will have write permission to the central inventory directory (oraInventory).
[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.
fuero commented 3 years ago

Here's the log of the build attempt: ./buildContainerImage.sh -e -v 19.3.0 2>&1 | tee build.log build.log.gz

Changes against d648e8a915da1a72983c6dcbfd6280e81bb42762 to get more info from the installer and force it to use a larger volume (--tmpdir / TMPDIR): localchanges.diff.gz

johnlabarge commented 2 years ago

I'm having the same issue. Any updates on this or work arounds?

futoyama commented 2 years ago

I had the same problem. I used podman instead of docker and ran buildContainerImage.sh as a non-root user. However, when I ran buildContainerImage.sh as root user, it terminated normally.

sami-bsf commented 2 years ago

Re-zipping the folder after Safari unzipped it automatically broke it for me with this issue.

Not sure if it helps someone else on macOS or might help troubleshoot underlying issue.

abhisbyk commented 2 years ago

@tsvirs I am unable to reproduce this. This happens mostly because of the corrupted LINUX.X64_193000_db_home.zip. Please download this zip file again from the OTN. The buildContainerImage.sh script does the md5 checksum verification of the zip file automatically. The sample command is as follows: ./buildContainerImage.sh -e -v 19.3.0

Please update if the same problem persists. Thanks.

abhisbyk commented 2 years ago

Closing this issue for now. Please reopen if this issue is encountered again.