Last active
January 27, 2016 08:19
-
-
Save lukewpatterson/6491377 to your computer and use it in GitHub Desktop.
db2 in docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM base | |
RUN echo "deb http://archive.canonical.com/ubuntu precise partner" >> /etc/apt/sources.list | |
RUN echo "deb-src http://archive.canonical.com/ubuntu precise partner" >> /etc/apt/sources.list | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list | |
RUN echo "deb-src http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get --yes install ksh | |
RUN apt-get --yes --force-yes install apt-utils | |
RUN apt-get --yes install sudo | |
RUN sudo apt-get --yes install db2exc | |
------------- | |
... blows up with | |
sysctl: permission denied on key 'kernel.msgmni' | |
sysctl: permission denied on key 'kernel.msgmnb' | |
sysctl: permission denied on key 'kernel.msgmax' | |
sysctl: permission denied on key 'fs.file-max' | |
* Starting DAS: failed. | |
ftp://ftp.software.ibm.com/ps/products/db2/info/vr101/pdf/en_US/DB2InstallingServers-db2ise1010.pdf | |
http://www.mail-archive.com/[email protected]/msg02074.html | |
kernel.msgmni (MSGMNI) 1 024 * <size of RAM in GB> | |
kernel.msgmax (MSGMAX) 65 536 | |
kernel.msgmnb (MSGMNB) 65 536 | |
http://edin.no-ip.com/blog/hswong3i/db2-express-c-10-1-ubuntu-12-04-howto | |
ubuntu@development:~$ ipcs -l | |
------ Shared Memory Limits -------- | |
max number of segments = 4096 | |
max seg size (kbytes) = 32768 | |
max total shared memory (kbytes) = 8388608 | |
min seg size (bytes) = 1 | |
------ Semaphore Limits -------- | |
max number of arrays = 128 | |
max semaphores per array = 250 | |
max semaphores system wide = 32000 | |
max ops per semop call = 32 | |
semaphore max value = 32767 | |
------ Messages Limits -------- | |
max queues system wide = 1127 | |
max size of message (bytes) = 8192 | |
default max size of queue (bytes) = 16384 | |
`sysctl -a` to get original values: | |
kernel.msgmni = 1127 | |
kernel.msgmax = 8192 | |
kernel.msgmnb = 16384 | |
fs.file-max = 399839 | |
---------- | |
so will change to | |
(for 4 gig) | |
sysctl -w kernel.msgmni=4096 | |
sysctl -w kernel.msgmax=65536 | |
sysctl -w kernel.msgmnb=65536 | |
sysctl -w fs.file-max=6815744 | |
then | |
service procps start | |
does it persist after reboot? -- no, add to /etc/sysctl.d/60-ibm.conf | |
http://www.mail-archive.com/[email protected]/msg03681.html | |
have to add `hostname` to /etc/hosts | |
deb http://ubuntu.mirror.cambrium.nl/ubuntu/ precise main universe | |
deb http://ubuntu.mirror.cambrium.nl/ubuntu/ precise main | |
? $ sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install ia32-libs | |
deb http://ubuntu.mirror.cambrium.nl/ubuntu/ precise main universe | |
(before running the next stuff, might have to sudo apt-get --yes install dpkg) | |
add architecure i386 | |
? $ sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install ia32-libs | |
sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install ia32-libs-multiarch | |
/home/db2inst1/sqllib/acs/acsnnas | |
http://unix.stackexchange.com/questions/13391/getting-not-found-message-when-running-a-32-bit-binary-on-a-64-bit-system | |
https://www.nesono.com/node/368 http://docs.docker.io/en/latest/examples/running_riak_service/ | |
RUN dpkg-divert --local --rename --add /sbin/initctl | |
RUN ln -s /bin/true /sbin/initctl | |
# sudo dpkg --configure -a | |
? DEBCONF_FRONTEND=noninteractive | |
$ cat db2_update_acs.42240 | |
checking /home/db2inst1/sqllib/acs/acsnnas ... | |
/home/db2inst1/sqllib/acs/acsnnas: error while loading shared libraries: libssl.so.0.9.7: cannot open shared object file: No such file or directory | |
No valid acs agent found. Aborting. | |
sudo apt-get install libssl0.9.8 ? | |
http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/index.jsp?topic=%2Fcom.ibm.db2.luw.qb.server.doc%2Fdoc%2Fr0025127.html |
@mikewaters Now I know what you're talking about -- switching the device driver backend a la http://muehe.org/posts/switching-docker-from-aufs-to-devicemapper/ .
This post makes me think that there may indeed be a problem with the default backend, so I'm trying with device-mapper and we'll see how it goes. I'm using boot2docker on OSX at the moment, so there's an additional layer of complexity.
Has aufs always been the default backend for Docker?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update : It seems like my issue was db2 related and I simply needed to run "db2set DB2COMM=tcpip" for my comms to start working correctly