fuzziebrain / docker-oracle-xe

Docker build for Oracle Database 18c Express Edition (XE). This project is now archived with the release of version 21c.
MIT License
272 stars 127 forks source link

Unable to get this docker image to work. #29

Closed gatman closed 5 years ago

gatman commented 5 years ago

Hello,

I'm unable to get this to work. I tried the latest on master branch as well as the 0.3.0 release. My docker host is Ubuntu 14.04 running Docker version 18.06.1-ce, build e68fc7a

I'm using this downloaded RPM.

oracle-database-xe-18c-1.0-1.x86_64.rpm

Badness I noticed in the output:

. . .

  Installing : binutils-2.27-34.base.0.1.el7.x86_64                      11/117 
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)
  Installing : GeoIP-1.5.0-13.el7.x86_64                                 12/117 

. . .

  Installing : systemd-219-62.0.4.el7_6.3.x86_64                         70/117 
Failed to get D-Bus connection: Operation not permitted
  Installing : elfutils-default-yama-scope-0.172-2.el7.noarch            71/117 

 . . .

  Installing : 1:smartmontools-6.5-1.el7.x86_64                          79/117 
  Installing : iputils-20160308-10.el7.x86_64                            80/117Error unpacking rpm package iputils-20160308-10.el7.x86_64

error: unpacking of archive failed on file /usr/bin/ping;5c54ecdb: cpio: cap_set_file
error: iputils-20160308-10.el7.x86_64: install failed
  Installing : initscripts-9.49.46-1.0.1.el7.x86_64                      81/117 
  Installing : gssproxy-0.7.0-21.el7.x86_64                              82/117 
  Installing : ksh-20120801-139.0.1.el7.x86_64                           83/117 
failed to link /usr/share/man/man1/ksh.1.gz -> /etc/alternatives/ksh-man: No such file or directory
. . .

Failed:
  iputils.x86_64 0:20160308-10.el7                                              

Complete!
The command '/bin/sh -c yum install -y oracle-database-preinstall-18c &&   yum install -y 
/tmp/${ORACLE_XE_RPM} &&   rm -rf /tmp/${ORACLE_XE_RPM}' returned a non-zero code: 1

I also have my own centos image I tried to use as a base. I use centos with an s6 overlay for many of my images.

cent7:7.6.1810

With that version I used:

oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
and
oracle-database-xe-18c-1.0-1.x86_64.rpm

I was able to get an image that started but I had commented out these lines:

HEALTHCHECK --interval=1m --start-period=2m --retries=10 \
  CMD "$ORACLE_BASE/scripts/$CHECK_DB_FILE"
CMD exec ${ORACLE_BASE}/scripts/${RUN_FILE}

I ran those commands by hand instead. (I was going to tweak the scripts for use in s6).

The listener came up but but the DB never did. It complained about kernel parameters. I noticed some of parameters weren't changed by the preinstall scripting. Specifically shared memory.

I'm curious, do I need to alter the kernel parms on my docker host?

Looking forward to getting XE up to a newer version.

Thanks, Glenn

demonguru18 commented 5 years ago

Hello, I dont know if this might help, but seems the user did not have enough permission.

Installing : binutils-2.27-34.base.0.1.el7.x86_64                      11/117 
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)

Did you try running with "sudo" command

Also, I have created this step by step tutorial on mac, you can probably refer to it as it should work on linux. How To Install Oracle Database 18c XE on Docker Container on Mac OS https://www.youtube.com/watch?v=CbopSCwATIg Hope this helps.

fuzziebrain commented 5 years ago

@gatman Don't use Centos as a base image. If you do, you will need to download the preinstall RPM and install that before Oracle XE. Do you have SELinux in enforcing mode on your host OS?

gatman commented 5 years ago

@gatman Don't use Centos as a base image. If you do, you will need to download the preinstall RPM and install that before Oracle XE. Do you have SELinux in enforcing mode on your host OS?

Sorry to respond so late. I just started a new job. I'm was/am trying to to prepare this new organization to start using containers. It's going to be a long road:-)

I'm doing this initial(experimental) work on my personal box which is currently 14.04 of ubuntu. I'm about to go ahead and upgrade to 18.04.2 as the LTS on 14.04 is running out.

Ubuntu doesn't run selinux by default it use apparmor by default. If there are specific things I need to open up on the host I'll look into the apparmor way of doing it.

As far as using centos: I have tried this image(oracle linux based) directly as well as basing one on centos. Neither work for me. The reason I chose centos is that this new org has decided on openshift and will only have RHEL base images. I'm not sure they have approved Oracle Linux specifically. So I'm experimenting with basing it on centos so I can switch the base image to RHEL at work. As part of that image build I did install the preinstall rpm as mentioned above. I think my issue is around kernel parameters. I think something in the docker host's settings are messing me up. Some of the parameters set by the pre-install take others do not. Shared memory settings didn't take for instance. Do the host's kernel parameters need to be at least as (large/high) as the container? That would seem to make sense to me.

Thanks, Glenn

gatman commented 5 years ago

Hello, I dont know if this might help, but seems the user did not have enough permission.

Installing : binutils-2.27-34.base.0.1.el7.x86_64                      11/117 
install-info: /usr/share/info/dir: could not read (No such file or directory) and could not create (No such file or directory)

Did you try running with "sudo" command

Also, I have created this step by step tutorial on mac, you can probably refer to it as it should work on linux. How To Install Oracle Database 18c XE on Docker Container on Mac OS https://www.youtube.com/watch?v=CbopSCwATIg Hope this helps.

I will look this over and see if it helps. Thanks for the response.

gatman commented 5 years ago

I confirmed that the issue was with the the docker host's kernel params. It makes sense, given the container shares the same kernel with the docker host. My personal machine is ubuntu. So I added a file 90-oracle18c-sysctl.conf to the /etc/sysctl.d/ directory and I was able to run both my custom image and the one based on oracle linux. Contents below:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

Should I close this issue or do you guys do that?

Thanks! Glenn

fuzziebrain commented 5 years ago

@gatman I can close it. Thanks for your feedback and sharing your solution. Good luck with your new job!