0 votes
1 view
Dear,

I'm creating the image using the dockerfile, downloaded from https://github.com/KnowageLabs/Knowage-Server-Docker;
Then, I adjust the settings of the docker-compose.yml, and run the command to create the containers.
The containers are created perfectly, and I can log in normally with the biadmin user.
But, if I restart the containers, when I try to log in again, I give the message: Ooooooops! Invalid username or password, try again.
What could be happening?
Environment knowage 7.2, docker
asked Aug 7, 2020 in Docker by anderson.mattiola (1,120 points)
edited Aug 15, 2020 by anderson.mattiola | 1 view

2 Answers

0 votes
Dear,

Looking for a solution to the problem, I found that when the container is restarted, the server.xml settings are overwritten and the "passwordEncryptionSecret" file is recreated with a new key. That is, the settings made on "host_url" and the existing encryption key are changed. Hence the problem.
How to prevent this from happening? In previous versions, server.xml was not overwritten.
answered Aug 15, 2020 by anderson.mattiola (1,120 points)

Hi Anderson,

we have not released the 7.2 version yet (the latest version will be the 7.2) then i think you are talking about a custom image.

I confirm that passwordEncryptionSecret it's the seed for password hashing that is a random value when you don't specify one: not using the same seed at every start of Tomcat causes login problem.

For the "host_url" replacement I need to know what entrypoint are you using? If you are using the official entrypoint.sh as entrypoint the cause of the problem it's this line. You can use PUBLIC_ADDRESS env to overwrite the public address coherently.

In the next few days I will work on the release of the 7.2 image and I think the new image will be available very soon.

mlibanor,
Thanks for your response.

Actually, I'm using the dockerfile available on the docker-hub, to build my image, which has been successful.
https://github.com/KnowageLabs/Knowage-Server-Docker/tree/729dbed0f724248f055e92fa2d27a27bfd7d1d89

Then, I use "docker-compose up -d" to create the containers, which happens correctly, and I manage to login using biadmin perfectly.
The problem is that if I restart the container, it seems that it generates a new hash in the "passwordEncryptionSecret", which prevents me from logging in again.

How could I do so that the "passwordEncryptionSecret" is informed and is no longer generated with each restart?

About the host ... I'm changing the "host_url" directly in the /conf/server.xml file, inside the generated container.
You mentioned using "PUBLIC_ADDRESS env". Would that be placed in the ".env" file next to the folder where the Dockerfile is located?

Thanks for your help.
0 votes

Hi people...

Analyzing the KnowageLabs/Knowage-Server-Docker in docker-hub, I noticed that the contributor kerny3d (Marco Libanori) posted a Dockerfile an update to the existing build at:  https://github.com/KnowageLabs/Knowage-Server-Docker/tree/f8e60df5501966d2fd3b4b910e82290c0bee6208

The problem of losing access after restarting has been resolved.
Thank you.

answered Aug 19, 2020 by anderson.mattiola (1,120 points)
1,553 questions
1,017 answers
2,037 comments
2,567 users