2
votes

I'm trying to run an instance of IBM DB2 in a Docker container but for some reason It doesn't start properly.

This is the error code I can see in the Terminal running on Mac OS Mojave.

12/09/2019 09:13:40     0   0   SQL1032N  No start database manager command was issued.
db_1   | SQL1032N  No start database manager command was issued.  SQLSTATE=57019
db_1   | (*) Cataloging existing databases
db_1   | ls: cannot access /database/data/db2inst1/NODE0000: No such file or directory

This is my docker-compose.yml

version: '3'
services: 
  app:    
    build: .
    ports:
      - "8080:8080"
      - "8000:8000" 
  db:
    image: ibmcom/db2
    privileged: true
    restart: always
    ports:
      - 50000:50000
    environment: 
      - LICENSE=accept
      - DB2INSTANCE=db2inst1
      - DB2INST1_PASSWORD=admin
      - DBNAME=salesrep           
      - SAMPLEDB=true        
    volumes: 
      - /my/path/db:/database     

I've found other threads talking about these error codes but none of them was useful for me and unfortunately and I don't have any knowledge of DB2.

Thank you in advance.

UPDATE Ok, now it starts. At the beginning the privileged: true param in my docker-compose.yml was absent. I added it during my test few minutes ago and It works.

Thanks to this thread: SQL1032N No start database manager command was issued. SQLSTATE=57019

The only thing that, now, I don't understand is why I can find the testdb that I tell to create during the startup. If I check the schemas in my DB2 connection (I use DBeaver) I can only see:

SYSCAT,
SYSFUN,
SYSIBM
...
1
EDIT your question to show your dockerfile and compose file if using.mao
Is this the IBM-offered dockerized Db2 or your own composition?data_henrik
@data_henrik is the ibmcom/db2 image pulled from docker hubHK15
ok, now add how you started the container.data_henrik
@data_henrik I updated my question. Now It starts even if I can't see my testdb in the schema listHK15

1 Answers

1
votes

You are looking for "testdb" under schemas. But what you tell Db2 to create is the database "testdb". So you would need to connect to that database. I am not sure to which database you are connecting. It could be "salesrep" which is given in your configuration file.