0 votes
1 view

Hello,

I have started knowage in docker. Everything started and working. But after I login as biadmin, there are almost none menu items (picture below). Maybe I missed some environment variables? 

I took info from here:

https://github.com/KnowageLabs/Knowage-Server-Docker/blob/master/Knowage-Server-Docker/README.md

https://github.com/KnowageLabs/Knowage-Server-Docker/blob/master/Knowage-Server-Docker/docker-compose.yml

The docker-compose file:

knowage:
    image: knowagelabs/knowage-server-docker:8.0
    container_name: knowage-gui_ss
    depends_on:
      - knowagedb
      - knowagecache
      - hazelcast
    ports:
      - "18082:8080"
    expose:
      - 8080
    environment:
      - DB_HOST=knowagedb
      - DB_PORT=3306
      - DB_DB=info
      - DB_USER=info
      - DB_PASS=info

      - CACHE_DB_HOST=knowagecache
      - CACHE_DB_PORT=3306
      - CACHE_DB_DB=info
      - CACHE_DB_USER=info
      - CACHE_DB_PASS=info

      - HMAC_KEY=info
      - PASSWORD_ENCRYPTION_SECRET=''
      - PUBLIC_ADDRESS=localhost

      - HAZELCAST_HOSTS=hazelcast
      - HAZELCAST_PORT=5701
    mem_limit: 4096mb
    volumes:
      - ./resources:/home/knowage/apache-tomcat/resources

  hazelcast:
    image: hazelcast/hazelcast:3.6.5
    environment:
      - JAVA_OPTS=-Dhazelcast.local.publicAddress=hazelcast -Dhazelcast.config=/opt/hazelcast/hazelcast.xml
    volumes:
      - ./hazelcast-server.xml:/opt/hazelcast/hazelcast.xml

  knowagepython:
    image: knowagelabs/knowage-python-docker:8.0
    environment:
      - HMAC_KEY=info
      - KNOWAGE_PUBLIC_ADDRESS=knowage
      - PUBLIC_ADDRESS=localhost

  knowager:
    image: knowagelabs/knowage-r-docker:8.0
    environment:
      - HMAC_KEY=info

  knowagedb:
    container_name: knowage-db_ss
    image: mariadb:10.3
    ports:
      - 13306:3306
    environment:
      - MYSQL_USER=info
      - MYSQL_PASSWORD=info
      - MYSQL_DATABASE=info
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    volumes:
      - "db:/var/lib/mysql"

  knowagecache:
    container_name: knowage-cache_ss
    image: mariadb:10.3
    ports:
      - 13307:3306
    environment:
      - MYSQL_USER=info
      - MYSQL_PASSWORD=info
      - MYSQL_DATABASE=info
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    volumes:
      - "cache:/var/lib/mysql"

volumes:
  db:
  cache:

menu without items
Environment Knowage 8.0; CentOS; Firefox/Chrome
asked Oct 18, 2021 in General Configuration by daynewss (250 points) | 1 view
Hi,

please watch out that PASSWORD_ENCRYPTION_SECRET must be set in a value. We suggest you to set a random Base64 string or a word with random character.

If I set that environment variable, with biadmin I see document explorer and workspace, the only menu present by default. Same situation with biuser.

Did you find the documentation about PASSWORD_ENCRYPTION_SECRET unclear? Because we could improve it.

Thank you very much for your feedback.

1 Answer

0 votes

Hello,

thanks for the answer. I have changed path to volumes in all containers adding ./knowage/.... in front of all of them, to keep all my files associated with knowage in one folder. After restarting containers everything seems OK. Of course, I have created volume with knowage :)

I have added Base64 String to PASSWORD_ENCRYPTION_SECRET and after that I can't login neither with biadmin, biuser, or bidev.

Also, there is info about secret: "if not provided will be randomly generated." and I see from logs, that it is generated. After removing secret I can login with biadmin, biuser and bidev. Maybe there are some limitations or special must have key in secret? Or length maybe? The best way is to add good working example to git or docker hub.

answered Oct 19, 2021 by daynewss (250 points)
Hi,

I see the problem: with the first run, Knowage set the defaults users with a password using the empty seed (PASSWORD_ENCRYPTION_SECRET=''). After my comment, you set  the PASSWORD_ENCRYPTION_SECRET and the login starts failing because the seed changed and the password hashes don't matches anymore: you've set a persistent volume for both the DBs.

Ok, the fastest way to fix the problem is resetting the volume of the metadata db (db volume of knowagedb). Starting Knowage with a correct PASSWORD_ENCRYPTION_SECRET would do the trick.

Hi,

no, thats not solving problem. I have stopped and removed containers, removed volume. Then add key without quotes - I can't login. I see in logs that key created automatically. Then again stopped and removed containers, removed volume. Added key with double quotes - same. I can't login. I see in logs that key created automatically.

Please paste working docker-compose example WITH PREDEFINED KEY. Maybe I need specific key? Length, pattern, maybe quotes?

After removing containers and starting without pre-defined key everything is working just fine.

docker-compose

- PASSWORD_ENCRYPTION_SECRET=JT5V15U871jpEPkOVMdMCoV4cCjxYjOv/H99WCrHFAo=

docker logs
wait-for-it.sh: waiting 15 seconds for knowagedb:3306
wait-for-it.sh: knowagedb:3306 is available after 8 seconds
MySql is up!
###################################################################
#
# Random generated AJP secret:
#   jMyWrq3wbzGNR20yFwOx07DqmZy/2p7IfFzVMJRvtxM=
#

1,554 questions
1,017 answers
2,037 comments
2,568 users