docker-images icon indicating copy to clipboard operation
docker-images copied to clipboard

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

Open tsvirs opened this issue 3 years ago • 23 comments

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% /

tsvirs avatar Mar 13 '21 07:03 tsvirs

Please take a look at this @Mahi0911

yunus-qureshi avatar Mar 24 '21 07:03 yunus-qureshi

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

mahipalm0911 avatar Mar 25 '21 06:03 mahipalm0911

image

tsvirs avatar Mar 27 '21 03:03 tsvirs

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

tsvirs avatar Mar 27 '21 04:03 tsvirs

could you please post the dockerfile you are using @tsvirs

mahipalm0911 avatar Mar 27 '21 04:03 mahipalm0911

image

tsvirs avatar Mar 27 '21 07:03 tsvirs

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

mahipalm0911 avatar Mar 27 '21 07:03 mahipalm0911

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 avatar Mar 27 '21 08:03 tsvirs

Dockerfile.zip

tsvirs avatar Mar 28 '21 00:03 tsvirs

Still, no idea how to get through it.

tsvirs avatar Mar 29 '21 01:03 tsvirs

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 ?

mahipalm0911 avatar Mar 29 '21 05:03 mahipalm0911

=> [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/ .

tsvirs avatar Mar 29 '21 08:03 tsvirs

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

mahipalm0911 avatar Mar 29 '21 09:03 mahipalm0911

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 avatar Mar 29 '21 12:03 tsvirs

=> 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.

tsvirs avatar Mar 29 '21 12:03 tsvirs

Are you available for a call on zoom ?

mahipalm0911 avatar Mar 29 '21 15:03 mahipalm0911

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 .

mahipalm0911 avatar Apr 01 '21 11:04 mahipalm0911

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 avatar Aug 04 '21 16:08 fuero

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

fuero avatar Aug 04 '21 17:08 fuero

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

johnlabarge avatar Nov 30 '21 21:11 johnlabarge

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.

futoyama avatar Dec 18 '21 13:12 futoyama

  • Cleared docker image cache as above.
  • Disabled Safari unzipping or "opening" downloads automatically.
  • Downloaded the zip file again
  • it worked with ./buildContainerImage.sh -v 19.3.0 -s

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.

sami-bsf avatar Dec 30 '21 14:12 sami-bsf

@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 avatar May 24 '22 10:05 abhisbyk

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

abhisbyk avatar Sep 05 '22 08:09 abhisbyk