0x1fff / docker-informix

Docker container for IBM Informix Dynamic Server
Apache License 2.0
31 stars 15 forks source link

Trying to use it on Bluemix #4

Open debu66er opened 8 years ago

debu66er commented 8 years ago

I am having issues running this container on Bluemix. I read you are using it on Bluemix, right? Can you comment me if I am doing anything wrong? Or if you found any difficulties I am missing?

I created the docker image using your instructions and iif.12.10.FC6TL.linux-x86_64.tar, and it was created successfully. Then I pushed it to Bluemix and now I am trying to start it there.

The issue is that after 1 minute or so, the container stops. I don't see any reason in the logs (they don't show too much info).

I attach a print screen of the info I use to start the container and here are the logs, just to check if you can help with any comment. Thanks a lot!

capture1 capture2

Logs:

4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:17 Warning: CONSOLE = /home/informix/data/logs/console.log open failed. Redirecting output to '/dev/null'.\n","stream":"stderr","time":"2016-04-12T12:10:17.010536405Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"\n","stream":"stdout","time":"2016-04-12T12:10:22.313033072Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"WARNING: server initialization failed or timed out.\n","stream":"stdout","time":"2016-04-12T12:10:22.313065586Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"Check the message log, online.log, for errors.\n","stream":"stdout","time":"2016-04-12T12:10:22.313072857Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:17 Loading Module \u003cBUILTINNULL\u003e\n","stream":"stderr","time":"2016-04-12T12:10:17.008145595Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"\n","stream":"stderr","time":"2016-04-12T12:10:16.933509839Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:16 Event alarms enabled. ALARMPROG = '/opt/IBM/informix/etc/alarmprogram.sh'\n","stream":"stderr","time":"2016-04-12T12:10:16.974200831Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:17 Booting Language \u003cbuiltin\u003e from module \u003c\u003e\n","stream":"stderr","time":"2016-04-12T12:10:17.008136266Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:17 Loading Module \u003cCNULL\u003e\n","stream":"stderr","time":"2016-04-12T12:10:17.006342294Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:17 Booting Language \u003cc\u003e from module \u003c\u003e\n","stream":"stderr","time":"2016-04-12T12:10:17.006320262Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"\n","stream":"stderr","time":"2016-04-12T12:10:16.861625275Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:16 Successfully added a bufferpool of page size 2K.\n","stream":"stderr","time":"2016-04-12T12:10:16.933474166Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:16 Requested shared memory segment size rounded from 110629KB to 110632KB\n","stream":"stderr","time":"2016-04-12T12:10:16.861632354Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:15 Requested shared memory segment size rounded from 4308KB to 4796KB\n","stream":"stderr","time":"2016-04-12T12:10:15.433339215Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"Tue Apr 12 12:10:16 2016\n","stream":"stderr","time":"2016-04-12T12:10:16.861618963Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"\n","stream":"stderr","time":"2016-04-12T12:10:16.861581463Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:16 Could not disable priority aging: errno = 13\n","stream":"stderr","time":"2016-04-12T12:10:16.445432388Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"Your evaluation license will expire on 2016-07-11 00:00:00\n","stream":"stderr","time":"2016-04-12T12:10:15.394011505Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"chmod: cannot access `/home/informix/data/backup': No such file or directory\n","stream":"stderr","time":"2016-04-12T12:10:15.265468504Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"12:10:15 IBM Informix Dynamic Server Started.\n","stream":"stderr","time":"2016-04-12T12:10:15.432898265Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"chmod: cannot access `/home/informix/data/spaces/dbs_root/dbs_root.000': No such file or directory\n","stream":"stderr","time":"2016-04-12T12:10:15.264833526Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"mkdir: cannot create directory `/home/informix/data/logs': Permission denied\n","stream":"stderr","time":"2016-04-12T12:10:14.067132539Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"mkdir: cannot create directory `/home/informix/data/backup': Permission denied\n","stream":"stderr","time":"2016-04-12T12:10:14.868459268Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"mkdir: cannot create directory `/home/informix/data/spaces': Permission denied\n","stream":"stderr","time":"2016-04-12T12:10:15.260654926Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"mkdir: cannot create directory `/home/informix/data/backup': Permission denied\n","stream":"stderr","time":"2016-04-12T12:10:14.466472244Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"chown: cannot access `/home/informix/data/logs': No such file or directory\n","stream":"stderr","time":"2016-04-12T12:10:15.263960142Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"chown: cannot access `/home/informix/data/backup': No such file or directory\n","stream":"stderr","time":"2016-04-12T12:10:15.263980522Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"touch: cannot touch `/home/informix/data/spaces/dbs_root/dbs_root.000': No such file or directory\n","stream":"stderr","time":"2016-04-12T12:10:15.262790812Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"chown: cannot access `/home/informix/data/spaces': No such file or directory\n","stream":"stderr","time":"2016-04-12T12:10:15.263987068Z"}
4/12/2016 14:10 prod-dal09-kraken1-host-08  {"log":"\u003e\u003e\u003e Create data directory structure in /home/informix/data (ifx initialization)\n","stream":"stdout","time":"2016-04-12T12:10:13.464423864Z"}
0x1fff commented 8 years ago

Hello,

I didn't use this container on IBM Bluemix, but I was my initial plan to make Informix work on Bluemix :). I can see that Bluemix log is messed up in terms of time (the oldest events are on the bottom and not in order it should be).

I will try to help you.

First of all I will fix the log (in SublimeText I've used this regexp as replace): Find what: .*?"log":"([^"]+)".*time":"([^"]+)".*: Replace With: $2 $1

Then I've sorted the output, and here is log with correct timestamped order:

2016-04-12T12:10:13.464423864Z \u003e\u003e\u003e Create data directory structure in /home/informix/data (ifx initialization)\n
2016-04-12T12:10:14.067132539Z mkdir: cannot create directory `/home/informix/data/logs': Permission denied\n
2016-04-12T12:10:14.466472244Z mkdir: cannot create directory `/home/informix/data/backup': Permission denied\n
2016-04-12T12:10:14.868459268Z mkdir: cannot create directory `/home/informix/data/backup': Permission denied\n
2016-04-12T12:10:15.260654926Z mkdir: cannot create directory `/home/informix/data/spaces': Permission denied\n
2016-04-12T12:10:15.262790812Z touch: cannot touch `/home/informix/data/spaces/dbs_root/dbs_root.000': No such file or directory\n
2016-04-12T12:10:15.263960142Z chown: cannot access `/home/informix/data/logs': No such file or directory\n
2016-04-12T12:10:15.263980522Z chown: cannot access `/home/informix/data/backup': No such file or directory\n
2016-04-12T12:10:15.263987068Z chown: cannot access `/home/informix/data/spaces': No such file or directory\n
2016-04-12T12:10:15.264833526Z chmod: cannot access `/home/informix/data/spaces/dbs_root/dbs_root.000': No such file or directory\n
2016-04-12T12:10:15.265468504Z chmod: cannot access `/home/informix/data/backup': No such file or directory\n
2016-04-12T12:10:15.394011505Z Your evaluation license will expire on 2016-07-11 00:00:00\n
2016-04-12T12:10:15.432898265Z 12:10:15 IBM Informix Dynamic Server Started.\n
2016-04-12T12:10:15.433339215Z 12:10:15 Requested shared memory segment size rounded from 4308KB to 4796KB\n
2016-04-12T12:10:16.445432388Z 12:10:16 Could not disable priority aging: errno = 13\n
2016-04-12T12:10:16.861581463Z \n
2016-04-12T12:10:16.861618963Z Tue Apr 12 12:10:16 2016\n
2016-04-12T12:10:16.861625275Z \n
2016-04-12T12:10:16.861632354Z 12:10:16 Requested shared memory segment size rounded from 110629KB to 110632KB\n
2016-04-12T12:10:16.933474166Z 12:10:16 Successfully added a bufferpool of page size 2K.\n
2016-04-12T12:10:16.933509839Z \n
2016-04-12T12:10:16.974200831Z 12:10:16 Event alarms enabled. ALARMPROG = '/opt/IBM/informix/etc/alarmprogram.sh'\n
2016-04-12T12:10:17.006320262Z 12:10:17 Booting Language \u003cc\u003e from module \u003c\u003e\n
2016-04-12T12:10:17.006342294Z 12:10:17 Loading Module \u003cCNULL\u003e\n
2016-04-12T12:10:17.008136266Z 12:10:17 Booting Language \u003cbuiltin\u003e from module \u003c\u003e\n
2016-04-12T12:10:17.008145595Z 12:10:17 Loading Module \u003cBUILTINNULL\u003e\n
2016-04-12T12:10:17.010536405Z 12:10:17 Warning: CONSOLE = /home/informix/data/logs/console.log open failed. Redirecting output to '/dev/null'.\n
2016-04-12T12:10:22.313033072Z \n
2016-04-12T12:10:22.313065586Z WARNING: server initialization failed or timed out.\n
2016-04-12T12:10:22.313072857Z Check the message log, online.log, for errors.\n

In this log there is output from script informix_start.sh which checks if Informix database directory structure is created and it tries to create it. After that script will try to start Informix Database Server in initialization mode.

As I can see you've mount data valume as: /home/informix/data/ - exactly like is in my example on project page. The problem you have encountered is permission related, the script which is run as user "informix" can't create directory structure on disk. I will try to reproduce it on my local environment but it will take some more time.

Could you provide me information about docker which you are using using: sudo docker --version ? Could you inspect docker image exactly run: ls -al /home/informix/ on Bluemix?

You can also read something about docker volumes:

0x1fff commented 8 years ago

hi before I've reproduced an error I thought that we can run creating database structure in informix_start.sh as root and later drop privileges from directories.

Could you try to rebuild container with new version of docker-informix and redeploy it on Bluemix? I'm still downloading new Informix installation depot ...so probably I won't be able to try to reproduce an error today.

debu66er commented 8 years ago

Thanks a lot for your help. I will try to rebuild the image today and come back to you. In parallel, I was searching on the web and I found what I think is a similar workaround as your proposal: http://stackoverflow.com/questions/31750970/how-can-i-fix-the-permissions-using-docker-on-a-bluemix-volume

debu66er commented 8 years ago

Cloned again your Git Repo, recreated the image, pushed to Bluemix but same result...

4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:12 Loading Module \u003cCNULL\u003e\n","stream":"stderr","time":"2016-04-14T20:17:12.949428746Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:13 Booting Language \u003cbuiltin\u003e from module \u003c\u003e\n","stream":"stderr","time":"2016-04-14T20:17:13.15070587Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"Thu Apr 14 20:17:12 2016\n","stream":"stderr","time":"2016-04-14T20:17:12.611568796Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:12 Event alarms enabled. ALARMPROG = '/opt/IBM/informix/etc/alarmprogram.sh'\n","stream":"stderr","time":"2016-04-14T20:17:12.730429338Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:12 Requested shared memory segment size rounded from 110629KB to 110632KB\n","stream":"stderr","time":"2016-04-14T20:17:12.611581204Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"\n","stream":"stderr","time":"2016-04-14T20:17:12.611575442Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:12 Successfully added a bufferpool of page size 2K.\n","stream":"stderr","time":"2016-04-14T20:17:12.683152573Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"\n","stream":"stderr","time":"2016-04-14T20:17:12.683183629Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:12 Booting Language \u003cc\u003e from module \u003c\u003e\n","stream":"stderr","time":"2016-04-14T20:17:12.769711808Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"\n","stream":"stderr","time":"2016-04-14T20:17:12.611542075Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:11 Requested shared memory segment size rounded from 4308KB to 4796KB\n","stream":"stderr","time":"2016-04-14T20:17:11.116636927Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:10 IBM Informix Dynamic Server Started.\n","stream":"stderr","time":"2016-04-14T20:17:10.911472953Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"20:17:12 Could not disable priority aging: errno = 13\n","stream":"stderr","time":"2016-04-14T20:17:12.141610919Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/backup/logs': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:05.714189436Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/spaces/dbs_root': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:07.118100266Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/spaces': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:07.718739788Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/backup/datas': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:05.114154702Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/backup': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:05.914232204Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/spaces/dbs_root/dbs_root.000': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:06.916100976Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"Your evaluation license will expire on 2016-07-13 00:00:00\n","stream":"stderr","time":"2016-04-14T20:17:10.47646412Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/backup': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:01.515634918Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/spaces/dbs_root': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:03.109783773Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:03.519803891Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/spaces/dbs_root/dbs_root.000': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:02.918509818Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/spaces': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:03.309894042Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/logs': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:04.111692492Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/backup/datas': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:00.515583698Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/logs': Permission denied\n","stream":"stderr","time":"2016-04-14T20:16:59.111828213Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"\u003e\u003e\u003e Create data directory structure in /home/informix/data (ifx initialization)\n","stream":"stdout","time":"2016-04-14T20:16:52.338271383Z"}
4/14/2016 22:17 prod-dal09-kraken1-host-03  {"log":"chown: changing ownership of `/home/informix/data/backup/logs': Permission denied\n","stream":"stderr","time":"2016-04-14T20:17:01.315765913Z"}

I don't use Sublime. I will try to order the log with something else but meanwhile I leave it here...

I also have to investigate the URL from StackOverflow I added in the previous entry.

0x1fff commented 8 years ago

Hello fixed logs, your link looks very good but new version of informix_start.sh uses sudo to create directories and later change ownership.

2016-04-14T20:16:52.338271383Z \u003e\u003e\u003e Create data directory structure in /home/informix/data (ifx initialization)\n
2016-04-14T20:16:59.111828213Z chown: changing ownership of `/home/informix/data/logs': Permission denied\n
2016-04-14T20:17:00.515583698Z chown: changing ownership of `/home/informix/data/backup/datas': Permission denied\n
2016-04-14T20:17:01.315765913Z chown: changing ownership of `/home/informix/data/backup/logs': Permission denied\n
2016-04-14T20:17:01.515634918Z chown: changing ownership of `/home/informix/data/backup': Permission denied\n
2016-04-14T20:17:02.918509818Z chown: changing ownership of `/home/informix/data/spaces/dbs_root/dbs_root.000': Permission denied\n
2016-04-14T20:17:03.109783773Z chown: changing ownership of `/home/informix/data/spaces/dbs_root': Permission denied\n
2016-04-14T20:17:03.309894042Z chown: changing ownership of `/home/informix/data/spaces': Permission denied\n
2016-04-14T20:17:03.519803891Z chown: changing ownership of `/home/informix/data': Permission denied\n
2016-04-14T20:17:04.111692492Z chown: changing ownership of `/home/informix/data/logs': Permission denied\n
2016-04-14T20:17:05.114154702Z chown: changing ownership of `/home/informix/data/backup/datas': Permission denied\n
2016-04-14T20:17:05.714189436Z chown: changing ownership of `/home/informix/data/backup/logs': Permission denied\n
2016-04-14T20:17:05.914232204Z chown: changing ownership of `/home/informix/data/backup': Permission denied\n
2016-04-14T20:17:06.916100976Z chown: changing ownership of `/home/informix/data/spaces/dbs_root/dbs_root.000': Permission denied\n
2016-04-14T20:17:07.118100266Z chown: changing ownership of `/home/informix/data/spaces/dbs_root': Permission denied\n
2016-04-14T20:17:07.718739788Z chown: changing ownership of `/home/informix/data/spaces': Permission denied\n
2016-04-14T20:17:10.47646412Z Your evaluation license will expire on 2016-07-13 00:00:00\n
2016-04-14T20:17:10.911472953Z 20:17:10 IBM Informix Dynamic Server Started.\n
2016-04-14T20:17:11.116636927Z 20:17:11 Requested shared memory segment size rounded from 4308KB to 4796KB\n
2016-04-14T20:17:12.141610919Z 20:17:12 Could not disable priority aging: errno = 13\n
2016-04-14T20:17:12.611542075Z \n
2016-04-14T20:17:12.611568796Z Thu Apr 14 20:17:12 2016\n
2016-04-14T20:17:12.611575442Z \n
2016-04-14T20:17:12.611581204Z 20:17:12 Requested shared memory segment size rounded from 110629KB to 110632KB\n
2016-04-14T20:17:12.683152573Z 20:17:12 Successfully added a bufferpool of page size 2K.\n
2016-04-14T20:17:12.683183629Z \n
2016-04-14T20:17:12.730429338Z 20:17:12 Event alarms enabled. ALARMPROG = '/opt/IBM/informix/etc/alarmprogram.sh'\n
2016-04-14T20:17:12.769711808Z 20:17:12 Booting Language \u003cc\u003e from module \u003c\u003e\n
2016-04-14T20:17:12.949428746Z 20:17:12 Loading Module \u003cCNULL\u003e\n
2016-04-14T20:17:13.15070587Z 20:17:13 Booting Language \u003cbuiltin\u003e from module \u003c\u003e\n

I will had to rebuild docker by myself and create Bluemix account to reproduce it ... I will do it next week (probably friday) ... currently I have a lot of other stuff to do ... But if you will have time to investigate please keep me informed :).