Skip to content
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

Closed
kocic11 opened this issue May 9, 2017 · 22 comments
Closed

Building WebLogic Docker Install Images Fails #372

kocic11 opened this issue May 9, 2017 · 22 comments
Assignees
Labels

Comments

@kocic11
Copy link

kocic11 commented May 9, 2017

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

@mriccell
Copy link
Member

@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?

@kocic11
Copy link
Author

kocic11 commented May 10, 2017 via email

@mriccell
Copy link
Member

@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"

@kocic11
Copy link
Author

kocic11 commented May 10, 2017 via email

@mriccell
Copy link
Member

I have tested this just now and I do not get this error. Are you root when you build the image?
Thanks
Monica

@kocic11
Copy link
Author

kocic11 commented May 16, 2017 via email

@Djelibeybi
Copy link
Member

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.

@kocic11
Copy link
Author

kocic11 commented May 17, 2017 via email

@Djelibeybi
Copy link
Member

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?

@kocic11
Copy link
Author

kocic11 commented May 18, 2017 via email

@Djelibeybi
Copy link
Member

Out of curiousity, please run the following two commands on your host:

$ file fmw_12.2.1.2.0_wls_Disk1_1of1.zip
$ md5sum fmw_12.2.1.2.0_wls_Disk1_1of1.zip

And paste the results

@Djelibeybi
Copy link
Member

Can you also paste the results from:

$ docker run --rm -ti oracle/serverjre:8 java -version

@kocic11
Copy link
Author

kocic11 commented May 18, 2017 via email

@Djelibeybi
Copy link
Member

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.

@kocic11
Copy link
Author

kocic11 commented May 18, 2017 via email

@Djelibeybi
Copy link
Member

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.

@kocic11
Copy link
Author

kocic11 commented May 18, 2017 via email

@kocic11
Copy link
Author

kocic11 commented May 19, 2017 via email

@Djelibeybi
Copy link
Member

@mriccell can you please update all the WebLogic Dockerfiles to change the permission of the files after COPY?

@Djelibeybi
Copy link
Member

Specifically, you should move the chown oracle:oracle -R /u01 command from the first RUN command to the one that occurs after the COPY directive.

@mriccell
Copy link
Member

@kocic11 change #391 should resolve the installation problem.

@kocic11
Copy link
Author

kocic11 commented May 21, 2017

Thanks Monica,

The change resolved the issue.

Regards,
Aleksandar

@kocic11 kocic11 closed this as completed May 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants