docker-images
docker-images copied to clipboard
/bin/sh: /opt/oracle/oraInventory/orainstRoot.sh: No such file or directory
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
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
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
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
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
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
I got it. Thank you for your help.
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 theDockerfile
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
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.
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.
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
@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.
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 \