Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view

Docker image does not start successfully,

Services appear to startup.

- Container knowage-knowagecache-1   Started                                         2.5s
 - Container knowage-knowager-1       Started                                        2.6s
 - Container knowage-knowagepython-1  Started                                        3.1s
 - Container knowage-knowagedb-1      Started                                        2.8s
 - Container knowage-hazelcast-1      Started                                        3.1s
 - Container knowage-knowage-1        Started                                        4.1s


However log errors occur and http://127.0.0.1:8080 does not load.

knowage-knowagedb-1      | 2022-06-24 11:16:22 9 [Warning] Access denied for user 'knowageuser'@'172.18.0.7' (using password: YES)
knowage-knowage-1        | ERROR 1045 (28000): Access denied for user 'knowageuser'@'172.18.0.7' (using password: YES)


I suspect the values for environment variables need to be included in a file ending with .env in the same directory as the YAML file. Unfortunately the instructions in the README only indicate that the information is mandatory and not what the information is, should be or whether we can arbirtrarily add it.

Based on the log messages, my entries in the .env file are wrong. "knowageuser" is not recognized as a valid user account.

This leads me to believe there is either no user in the docker image initially or that user is not "knowageuser" and it isn't well enough documented in the README to successfully use the README to deploy this software.

Environment Windows Docker image
in General Configuration by (120 points)

Hi,

in our official repo there is a sample .env file. We used that approach and we created a .env file because some of the env values are shared between the Knowage container and MariaDB container: for example, the database name, user and password.

We will write a better README for sure but this is only a feature suggested by docker-coppose documentation, it is non mandatory at all.

But anyway, please watch out to the database name, user and password, those 3 must be the same between knowage and the DB. Also the database hostname and port are very important.

About the last part of your question, please take a look at the official documentation of MariaDB image, specifically the environment variables section. MariaDB setups the database via env vars. If you take a look into our official docker-compose.yml you can see:

knowagedb:
image: mariadb:10.3
environment:
- MYSQL_USER=$DB_USER
- MYSQL_PASSWORD=$DB_PASS
- MYSQL_DATABASE=$DB_DB
- MYSQL_RANDOM_ROOT_PASSWORD=yes
networks:
- main
volumes:
- "db:/var/lib/mysql"

This is a fundamental section, please check it carefully.

Thanks that worked great! Using the standard preconfigured MariaDB username-password pair for both MariaDB and Knowage fixed the problem.

Please log in or register to answer this question.

...