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
Building WebLogic Docker Install Images Fails #372
Comments
@kocic11 Have you downloaded the WebLogic installer (zip file) from OTN and place it in the same directory where the Dockerfile is without extracting it? |
Monica,
Yes, the zip file is in the same directory as Dockerfile file and it is not
extracted.
You can see the directory listing in the attached file.
Regards,
Aleksandar
…On Wed, May 10, 2017 at 3:08 PM Monica RIccelli ***@***.***> wrote:
@kocic11 <https://github.com/kocic11> Have you downloaded the WebLogic
installer (zip file) from OTN and place it in the same directory where the
Dockerfile is without extracting it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYHfTuLmGsfKTE8N15P1UclQCBIF5Yjiks5r4gsdgaJpZM4NVXep>
.
|
@kocic11 please try building the image without the -s option to skip the checksum of the installer zip file. Run "buildDockerImage -v 12.2.1.2 -d" |
Same error (see attached file):
Step 10 : USER oracle
---> Running in a6f7895f6aac
---> 861c839391e9
Removing intermediate container a6f7895f6aac
Step 11 : RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$FMW_PKG && cd - &&
$JAVA_HOME/bin/java -jar /u01/$FMW_JAR -silent -responseFile
/u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME
-ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME
INSTALL_TYPE="WebLogic Server" && rm /u01/$FMW_JAR /u01/$FMW_PKG
/u01/oraInst.loc /u01/install.file
---> Running in 8211ad979584
java.io.FileNotFoundException: /u01/fmw_12.2.1.2.0_wls_Disk1_1of1.zip
(Permission denied)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.tools.jar.Main.run(Main.java:307)
at sun.tools.jar.Main.main(Main.java:1288)
COPY copies the files as root and it is the reason for this error:
Step 8 : COPY $FMW_PKG install.file oraInst.loc /u01/
Regards,
Aleksandar
…On Wed, May 10, 2017 at 5:15 PM, Monica RIccelli ***@***.***> wrote:
@kocic11 <https://github.com/kocic11> please try building the image
without the -s option to skip the checksum of the installer zip file. Run
"buildDockerImage -v 12.2.1.2 -d"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYHfTnoaJzEgu4EiRn3PeUIGkzIpl46Fks5r4ijbgaJpZM4NVXep>
.
|
I have tested this just now and I do not get this error. Are you root when you build the image? |
I ran the script as both root and oracle user with the same result.
Regards,
Aleksandar
…On Mon, May 15, 2017 at 7:09 PM, Monica RIccelli ***@***.***> wrote:
I have tested this just now and I do not get this error. Are you root when
you build the image?
Thanks
Monica
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYHfTrhqzhEA4u8H81ms9GvRjTHloiwuks5r6NsggaJpZM4NVXep>
.
|
Is SElinux in enforcing mode? If so, can you try with SElinux set to permissive or disabled? We've been seeing a few |
Avi,
Yes, it was in enforcing mode. I tried with permissive mode with the same
result:
[oracle@localhost tmp]$ sudo getenforce
[sudo] password for oracle:
Enforcing
[oracle@localhost tmp]$ sudo setenforce 0
[oracle@localhost tmp]$ sudo getenforce
Permissive
Then:
[oracle@localhost dockerfiles]$ sh ./buildDockerImage.sh -v 12.2.1.2 -g -s
Result:
Step 11 : RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$FMW_PKG && cd - &&
$JAVA_HOME/bin/java -jar /u01/$FMW_JAR -silent -responseFile
/u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME
-ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME
INSTALL_TYPE="WebLogic Server" && rm /u01/$FMW_JAR /u01/$FMW_PKG
/u01/oraInst.loc /u01/install.file
---> Running in 69c001d16db3
java.io.FileNotFoundException: /u01/fmw_12.2.1.2.0_wls_Disk1_1of1.zip
(Permission denied)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.tools.jar.Main.run(Main.java:307)
at sun.tools.jar.Main.main(Main.java:1288)
I still think it is a result of the COPY command that uses ROOT user to
copy files:"All new files and directories are created with a UID and GID of
0 <https://docs.docker.com/engine/reference/builder/#copy>."
Regards,
Aleksandar
…On Wed, May 17, 2017 at 6:41 PM, Avi Miller ***@***.***> wrote:
Is SElinux in enforcing mode? If so, can you try with SElinux set to
permissive or disabled? We've been seeing a few permission denied errors
caused by SElinux recently.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYHfTulCLeOoA34zXAXIFBNenUJWwSqQks5r63eYgaJpZM4NVXep>
.
|
I can't reproduce this issue on a system with Can you try switching to using either |
I changed to btrfs, but the result was the same (see attached file):
From docker info:
Storage Driver: btrfs
Build Version: Btrfs v4.4.1
Library Version: 101
Error:
java.io.FileNotFoundException: /u01/fmw_12.2.1.2.0_wls_Disk1_1of1.zip
(Permission denied)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.tools.jar.Main.run(Main.java:307)
at sun.tools.jar.Main.main(Main.java:1288)
…On Wed, May 17, 2017 at 7:42 PM, Avi Miller ***@***.***> wrote:
I can't reproduce this issue on a system with btrfs or the overlay2
storage drivers. I see you're still using the default devicemapper
driver, which is not recommended.
Can you try switching to using either btrfs or overlay2 to see if that
resolves your issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYHfThAhKURI-zUauPkECV2AufqXWZYpks5r64X4gaJpZM4NVXep>
.
|
Out of curiousity, please run the following two commands on your host:
And paste the results |
Can you also paste the results from:
|
Here it is:
[oracle@localhost 12.2.1.2]$ pwd
/home/oracle/github/docker-images/OracleWebLogic/dockerfiles/12.2.1.2
[oracle@localhost 12.2.1.2]$ file fmw_12.2.1.2.0_wls_Disk1_1of1.zip
fmw_12.2.1.2.0_wls_Disk1_1of1.zip: Zip archive data, at least v2.0 to
extract
[oracle@localhost 12.2.1.2]$ md5sum fmw_12.2.1.2.0_wls_Disk1_1of1.zip
27f9fcce1b8dd1cb5bcf8bef348f3737 fmw_12.2.1.2.0_wls_Disk1_1of1.zip
[oracle@localhost 12.2.1.2]$ docker run --rm -ti oracle/serverjre:8 java
-version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Regards,
Aleksandar
|
Ok, all of that is correct. I have no idea why it's not building on your system. It works just fine on all of mine. |
Avi,
I am also surprised that it works for you :), considering how COPY command
works.
If I comment out the steps after "Copy packages", the image is built. Here
is how the /u01 folder looks:
[oracle@localhost dockerfiles]$ docker run --rm -it
oracle/weblogic:12.2.1.2-generic ls -all /u01
total 810156
drwxr-xr-x. 1 oracle oracle 124 May 18 20:26 .
drwxr-xr-x. 1 root root 158 May 18 20:29 ..
-rwxrwx---. 1 root root 829588063 May 8 00:39
fmw_12.2.1.2.0_wls_Disk1_1of1.zip
-rw-rw-r--. 1 root root 225 May 6 02:57 install.file
-rw-rw-r--. 1 root root 55 May 6 02:57 oraInst.loc
drwx------. 1 oracle oracle 160 May 18 20:26 oracle
As shown, the package is owned by root.
Can you run the same command for your image?
Regards,
Aleksandar
…On Thu, May 18, 2017 at 4:10 PM, Avi Miller ***@***.***> wrote:
Ok, all of that is correct. I have no idea why it's not building on your
system. It works just fine on all of mine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYHfTrksrVpbWhjMO5Fzp8yBuIkOQKJ0ks5r7KXMgaJpZM4NVXep>
.
|
I get what I'd expect:
Can you change the
Let's see if changing the permissions fixes it for you. I agree that something is weird here, because you're right that the |
Yes, changing permission works for me. It was the workaround I used to
build the image.
…On Thu, May 18, 2017 at 4:47 PM, Avi Miller ***@***.***> wrote:
I get what I'd expect:
$ docker run --rm -ti oracle/weblogic:12.2.1.2-generic ls -all /u01
total 12
drwxr-xr-x 1 oracle oracle 52 May 17 23:45 .
drwxr-xr-x 1 root root 158 May 18 20:43 ..
-rw-r--r-- 1 oracle oracle 8986 Oct 11 2016 fmw_12212_readme.htm
drwx------ 1 oracle oracle 410 May 17 23:41 oracle
Can you change the RUN command after the COPY to this:
RUN chmod +xr $SCRIPT_FILE && \
chown oracle:oracle /u01/*
Let's see if changing the permissions fixes it for you. I agree that
something is weird here, because you're right that the oracle user
shouldn't be allowed to delete the $FMW_PKG.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYHfTj33MBSdaWWq8uMrFPKhlgPiv7Bgks5r7K5bgaJpZM4NVXep>
.
|
Since we have identified the issue and have a workaround, will you update
the Docker file? It was the whole point of this exercise.
Regards,
Aleksandar
On Thu, May 18, 2017 at 5:28 PM, Aleksandar Kocic <akocic11@gmail.com>
wrote:
… Yes, changing permission works for me. It was the workaround I used to
build the image.
On Thu, May 18, 2017 at 4:47 PM, Avi Miller ***@***.***>
wrote:
> I get what I'd expect:
>
> $ docker run --rm -ti oracle/weblogic:12.2.1.2-generic ls -all /u01
> total 12
> drwxr-xr-x 1 oracle oracle 52 May 17 23:45 .
> drwxr-xr-x 1 root root 158 May 18 20:43 ..
> -rw-r--r-- 1 oracle oracle 8986 Oct 11 2016 fmw_12212_readme.htm
> drwx------ 1 oracle oracle 410 May 17 23:41 oracle
>
> Can you change the RUN command after the COPY to this:
>
> RUN chmod +xr $SCRIPT_FILE && \
> chown oracle:oracle /u01/*
>
> Let's see if changing the permissions fixes it for you. I agree that
> something is weird here, because you're right that the oracle user
> shouldn't be allowed to delete the $FMW_PKG.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#372 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AYHfTj33MBSdaWWq8uMrFPKhlgPiv7Bgks5r7K5bgaJpZM4NVXep>
> .
>
|
@mriccell can you please update all the WebLogic |
Specifically, you should move the |
Thanks Monica, The change resolved the issue. Regards, |
When building a WebLogic docker image the script fails with the following error:
java.io.FileNotFoundException: /u01/fmw_12.2.1.2.0_wls_Disk1_1of1.zip (Permission denied)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.io.FileInputStream.(FileInputStream.java:93)
at sun.tools.jar.Main.run(Main.java:307)
at sun.tools.jar.Main.main(Main.java:1288)
See attached file for more information and script output.
Building WebLogic Docker Install Images Fails.txt
The text was updated successfully, but these errors were encountered: