Skip to content

/bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory #2472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nadamien opened this issue Sep 23, 2022 · 13 comments
Open

Comments

@nadamien
Copy link

Hey,

Hope everyone is well, have a bit of an issue.

I am using bitbucket runner to run a pipeline to create the 19c image on docker, and its failing with orainstRoot.sh missing,
I am don't have any errors on the installation so I am guessing its working now.

can anyone help on this, I am running this on oraclelinux:8-slim because oraclelinux:7-slim gave me few issues on no having proper kernel parameters, Thank you.

docker build --build-arg DB_EDITION=$DB_EDITION --progress=plain -t $CONTAINER_REGISTRY_HOST/$NAME_PREFIX/$CONTAINER_NAME:$IMAGE_VERSION -f ../../$NAME_PREFIX/ds-db/Dockerfile ../../$NAME_PREFIX/ds-db

 precomp/public/ORACA.COB -> oraca.cob
  javavm/admin/classes.bin -> ../../javavm/jdk/jdk8/admin/classes.bin
  javavm/admin/libjtcjt.so -> ../../javavm/jdk/jdk8/admin/libjtcjt.so
  jdk/jre/bin/ControlPanel -> jcontrol
  javavm/admin/lfclasses.bin -> ../../javavm/jdk/jdk8/admin/lfclasses.bin
  javavm/lib/security/cacerts -> ../../../javavm/jdk/jdk8/lib/security/cacerts
  javavm/lib/sunjce_provider.jar -> ../../javavm/jdk/jdk8/lib/sunjce_provider.jar
  javavm/lib/security/README.txt -> ../../../javavm/jdk/jdk8/lib/security/README.txt
  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...
------------------------ Oracle_home done
------------------------ slimming Oracle_home
Removing intermediate container dcc65c88d66c
 ---> 42f2044b2fad
Step 18/38 : USER root
 ---> Running in 640fdfd55282
Removing intermediate container 640fdfd55282
 ---> 5a8be3dcddef
Step 32/38 : USER root
 ---> Running in 8e64f584f651
Removing intermediate container 8e64f584f651
 ---> 704199e82010
Step 33/38 : RUN echo "Have we come this far??" &&     free -h &&      cat /proc/sys/kernel/shmall
 ---> Running in 20690023cdc8
Have we come this far??
              total        used        free      shared  buff/cache   available
Mem:           15Gi       1.2Gi       7.8Gi        32Mi       6.2Gi        13Gi
Swap:          16Gi          0B        16Gi
18446744073692774399
Removing intermediate container 20690023cdc8
 ---> 67820e2b718c
Step 34/38 : RUN $ORACLE_BASE/oraInventory/orainstRoot.sh &&    $ORACLE_HOME/root.sh
 ---> Running in 99dc28230936
/bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory
The command '/bin/sh -c $ORACLE_BASE/oraInventory/orainstRoot.sh &&    $ORACLE_HOME/root.sh' returned a non-zero code: 127
@jesusferm
Copy link

i have the same error, i use fedora 37 x86_64, use docker:

Step 19/24 : RUN $ORACLE_BASE/oraInventory/orainstRoot.sh && $ORACLE_HOME/root.sh
---> Running in f31fd09e92f2
/bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory
Removing intermediate container f31fd09e92f2
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.

REPOSITORY TAG IMAGE ID CREATED SIZE
6ab1487eb6ff 3 minutes ago 7.17GB
ba0848374df6 4 minutes ago 10.2GB
01c60dd01ed5 3 hours ago 135MB
oraclelinux 7-slim 779edc935fbd 5 days ago 135MB

1 similar comment
@jesusferm
Copy link

i have the same error, i use fedora 37 x86_64, use docker:

Step 19/24 : RUN $ORACLE_BASE/oraInventory/orainstRoot.sh && $ORACLE_HOME/root.sh
---> Running in f31fd09e92f2
/bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory
Removing intermediate container f31fd09e92f2
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.

REPOSITORY TAG IMAGE ID CREATED SIZE
6ab1487eb6ff 3 minutes ago 7.17GB
ba0848374df6 4 minutes ago 10.2GB
01c60dd01ed5 3 hours ago 135MB
oraclelinux 7-slim 779edc935fbd 5 days ago 135MB

@Javahelpdesk
Copy link

I have the same error: Please note my environment: ubuntu 22.0.x, podman not docker, use user mode instead of root.

--> c7a8afb8796
--> 0fd6baf83d6
[3/3] STEP 4/10: USER root
--> 476dea49a2d
[3/3] STEP 5/10: RUN $ORACLE_BASE/oraInventory/orainstRoot.sh && $ORACLE_HOME/root.sh
/bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory
Error: error building at STEP "RUN $ORACLE_BASE/oraInventory/orainstRoot.sh && $ORACLE_HOME/root.sh": error while running runtime: exit status 127

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

Please kindly help

@yunus-qureshi
Copy link
Member

Are you setting the env vars mentioned here?

https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/README.md#building-the-container-images-using-podman

@Javahelpdesk
Copy link

@palmaguer
Copy link

I know it's been a while since this was posted but could be useful...

In my case, I am running Dockers in Macbook M1 so I created a new builder virtualizing x86 architecture building an Oracle Database 19.3.0.0 Enterprise and Standalone (No RAAC) image using a local Oracle Linux 8 image that I created without any problem.
Same problem /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory , after some attempts I decided to comment out the execution lines along with the HEALTHCHECK, additional to that I changed the last CMD to only execute the /bin/bash(Similar to Linux Dockerfile). Now I could build the image so I started a container and browsed the server until I found a log with the an error similar to this:

[WARNING] [INS-08101] Unexpected error while executing the action at state: 'supportedOSCheck'
   CAUSE: No additional information available.
   ACTION: Contact Oracle Support Services or refer to the software manual.
   SUMMARY:
       - java.lang.NullPointerException

I followed the following recommendation from this document (OracleRealApplicationCluster-README)

  • You must add CV_ASSUME_DISTID=OEL8 inside the Dockerfile as an env variable.

So I added the variable in the initial ENV section of my Dockerfile.

    WALLET_DIR="" \
    # Execute the below command to validate OS version and then export CV_ASSUME_DISTID to the supported version of OEL for 19c
    CV_ASSUME_DISTID=OEL8

# 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

@Amwidtf
Copy link

Amwidtf commented Oct 13, 2023

I have the same error when building 19c,os is Ubuntu 22.04.3 LTS and Docker Engine version is 24.0.6.
Using different users to execute script is the same error.
./buildContainerImage.sh -v 19.3.0 -e

Checking Docker version.
Dockerfile
Checking if required packages are present and valid...
LINUX.X64_193000_db_home.zip: OK
==========================
Container runtime info:
Client: Docker Engine - Community
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 24
  Running: 24
  Paused: 0
  Stopped: 0
 Images: 44
 Server Version: 24.0.6
 Storage Driver: overlay2
  Backing Filesystem: zfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 61f9fd88f79f081d64d6fa3bb1a0dc71ec870523
 runc version: v1.1.9-0-gccaecfc
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.2.0-34-generic
 Operating System: Ubuntu 22.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 62.02GiB

Building image 'oracle/database:19.3.0-ee' ...
[+] Building 78.9s (12/14)                                                                                                                                                                                                docker:default
 => [internal] load .dockerignore                                                                                                                                                                                                   0.0s
 => => transferring context: 2B                                                                                                                                                                                                     0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                0.0s
 => => transferring dockerfile: 5.06kB                                                                                                                                                                                              0.0s
 => [internal] load metadata for docker.io/library/oraclelinux:7-slim                                                                                                                                                               1.8s
 => CACHED [base 1/4] FROM docker.io/library/oraclelinux:7-slim@sha256:09e76dbbb70c3fd3496bebbb7dd00811371d7e509a2e8179e219d3909070f744                                                                                             0.0s
 => [internal] load build context                                                                                                                                                                                                   0.0s
 => => transferring context: 537B                                                                                                                                                                                                   0.0s
 => [base 2/4] COPY setupLinuxEnv.sh checkSpace.sh /opt/install/                                                                                                                                                                    3.1s
 => [base 3/4] COPY runOracle.sh startDB.sh createDB.sh createObserver.sh dbca.rsp.tmpl setPassword.sh checkDBStatus.sh runUserScripts.sh relinkOracleBinary.sh configTcps.sh /opt/oracle/                                          0.0s
 => [base 4/4] RUN chmod ug+x /opt/install/*.sh &&     sync &&     /opt/install/checkSpace.sh &&     /opt/install/setupLinuxEnv.sh &&     rm -rf /opt/install                                                                      56.3s
 => [builder 1/2] COPY --chown=oracle:dba LINUX.X64_193000_db_home.zip db_inst.rsp installDBBinaries.sh /opt/install/                                                                                                               7.1s
 => [builder 2/2] RUN chmod ug+x "/opt/install"/*.sh &&     sync &&     "/opt/install"/"installDBBinaries.sh" ee                                                                                                                    0.3s
 => [stage-2 1/4] COPY --chown=oracle:dba --from=builder /opt/oracle /opt/oracle                                                                                                                                                    0.0s
 => ERROR [stage-2 2/4] RUN "/opt/oracle"/oraInventory/orainstRoot.sh &&     "/opt/oracle/product/19c/dbhome_1"/root.sh                                                                                                             5.1s
------
 > [stage-2 2/4] RUN "/opt/oracle"/oraInventory/orainstRoot.sh &&     "/opt/oracle/product/19c/dbhome_1"/root.sh:
0.268 /bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory
------
Dockerfile:130
--------------------
 129 |     USER root
 130 | >>> RUN "$ORACLE_BASE"/oraInventory/orainstRoot.sh && \
 131 | >>>     "$ORACLE_HOME"/root.sh
 132 |
--------------------
ERROR: failed to solve: process "/bin/sh -c \"$ORACLE_BASE\"/oraInventory/orainstRoot.sh &&     \"$ORACLE_HOME\"/root.sh" did not complete successfully: 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.

@oraclesean
Copy link
Contributor

The transferring context: 537B line suggests that all necessary files were not copied. That's usually because you're out of space on the /var/log/docker directory. Try:

df -h /var/lib

If there's less than 8G on the physical filesystem, check the contents with:

docker system df

Repeated builds add to the size of the cache. Eventually, /var/lib/docker runs out of space and builds fail. You may also have containers or volumes eating up space, too.

To clean up the cache, run:

docker builder prune

Use docker rm to clean up individual, unused volumes, containers, or images.

You can also move the contents of /var/lib/docker to a filesystem with more space.

@Amwidtf
Copy link

Amwidtf commented Nov 4, 2023

The line suggests that all necessary files were not copied. That's usually because you're out of space on the directory. Try:transferring context: 537B``/var/log/docker

df -h /var/lib

If there's less than 8G on the physical filesystem, check the contents with:

docker system df

Repeated builds add to the size of the cache. Eventually, runs out of space and builds fail. You may also have containers or volumes eating up space, too./var/lib/docker

To clean up the cache, run:

docker builder prune

Use to clean up individual, unused volumes, containers, or images.docker rm

You can also move the contents of /var/lib/docker to a filesystem with more space.

Hi,
It seems that I have enough disk space, but my file system is zfs, and I'm not sure if it's related to this.
I was able to build successfully in my Ubuntu Windows subsystem, but this machine failed to build successfully after multiple attempts.

root@mini:/opt# df -h /var/lib/docker
Filesystem                        Size  Used Avail Use% Mounted on
rpool/ROOT/ubuntu_nmc0cy/var/lib  1.8T   16G  1.8T   1% /var/lib

@oraclesean
Copy link
Contributor

@Amwidtf try running the commands I posted originally:

  • docker system df to see the space used by Docker's different object types
  • docker builder prune to remove old cache
    If a system suddenly stops building properly, it's usually related to build cache filling up.

@htschannerl
Copy link

I encountered the same error myself. I attempted to resolve it by trying both versions 21.3.0 and 19.3.0, assuming that the issue might have been version-related. After extensive attempts at debugging, I identified both the problem and the solution.

The issue stemmed from the Oracle binary installation, although it did not generate any error during the build process.

The error was actually triggered by the ulimit nofile configuration.

To rectify this, I edited the file buildContainerImage.sh, specifically at line 319, where I included the parameter --ulimit nofile=65536:65536 in the docker build command.

Originally, the command looked like this:
${CONTAINER_RUNTIME}" build --force-rm=true --no-cache=true \

Now, the revised command appears as follows:
${CONTAINER_RUNTIME}" build --ulimit nofile=65536:65536 --force-rm=true --no-cache=true \

DmitriyStoyanov added a commit to DmitriyStoyanov/oracle-docker-images that referenced this issue Jun 5, 2024
According to oracle#2472
Changed line in script according to comment oracle#2472 (comment)
@anasali0006
Copy link

anasali0006 commented Sep 8, 2024

I am working on M3 Pro chip with Docker Desktop, and I had exactly the same issue:
[stage-2 2/4] RUN "/opt/oracle"/oraInventory/orainstRoot.sh && "/opt/oracle/product/19c/dbhome_1"/root.sh:
0.087 /bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory

There was a very small mistake that I was doing. The DB Zip file(LINUX.ARM64_1919000_db_home), which I downloaded from Oracle website was Zero Bytes size. There was some issue in the download. Make sure that size of file is around 2.2GB.

When I redownloaded the file, and used that one, error vanished.

@Chandan1154
Copy link

Hi All ,

I am getting this error while building a docker can anyone suggest me

this for mac:

30.08 ln: target '/home/oracle/' is not a directory: No such file or directory

1 warning found (use docker --debug to expand):

  • FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 25)
    Dockerfile:89

88 |
89 | >>> RUN chmod ug+x $INSTALL_DIR/*.sh &&
90 | >>> sync &&
91 | >>> $INSTALL_DIR/$CHECK_SPACE_FILE &&
92 | >>> $INSTALL_DIR/$SETUP_LINUX_FILE &&
93 | >>> rm -rf $INSTALL_DIR
94 |

ERROR: failed to solve: process "/bin/sh -c chmod ug+x $INSTALL_DIR/*.sh && sync && $INSTALL_DIR/$CHECK_SPACE_FILE && $INSTALL_DIR/$SETUP_LINUX_FILE && rm -rf $INSTALL_DIR" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/mr1k2lcnqkwua93n5s6lcva6s

ERROR: Oracle Database container image was NOT successfully created.
ERROR: Check the output and correct any reported problems with the build operation.
(base) chandan@chandans-MacBook-Air dockerfiles %

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants