retrievercommunications / docker-jasperserver

Docker image for the community edition of JasperReports® Server.
https://hub.docker.com/r/retriever/jasperserver/
MIT License
46 stars 50 forks source link

Not able to login again in jasperserver UI "Invalid credentials supplied. Could not login to JasperReports Server". #38

Open bashirdeen opened 3 years ago

bashirdeen commented 3 years ago

Hi @grange74

I have used this to run a JasperReports server with version 7.8.0. all seems working fine but when i remove jasperverserver container using 'docker-compose down jasperserver' and create it back but i am not able to get login into jasperserver UI with default credentials jasperserveradmin/jasperserveradmin although my MySQL data is persistent and its not recreated. UI login screen showing "Invalid credentials supplied. Could not log in to JasperReports Server." error.

Can you please suggest if I am missing something?

grange74 commented 3 years ago

have you checked the "jiuser" table? is the "jasperadmin" user there?

were you using version 7.8.0 for both instances of the container?

bashirdeen commented 3 years ago

Hi @grange74

I have checked the JIUser table in jasperserver database, jasperadmin user is present there. which both instances you are talking about. I have been running a MySQL(5.7) container and a jasperserver-ce container with version 7.8.0.

Also what i have observed that when i use your dockerhub image retriever/jasperserver:7.2.0 then its working fine and i can get login back if i recreate jasper server container but when i build the image from Dockerfile available in this repository then it's not letting me logging again after recreating of the docker container.

Please let me know if I am missing something in configuration or anything else?

grange74 commented 3 years ago

which both instances you are talking about

I think you answered my question with the extra info. From what I understand you've changed the Dockerfile in this repo to build a new container with version 7.8.0 locally. You then ran that container for the first time and it created the jasperserver tables in your MySQL container. You then delete the Jasper container and recreated a new instance of the same version (7.8.0) pointing to the existing MySQL container and you can't login with the existing credentials.

bashirdeen commented 3 years ago

@grange74 correct.

grange74 commented 3 years ago

Ok, in reading the latest upgrade guide i suspect it is to do with changes to Jasper in version 7.5.0 related to encryption keys. To fix this we'd somehow have to mount the directory in the container that stores the central keystore so it can persist beyond the instance of the container.

See page 29. Here is an extract:

A.2.3 Encryption Keys JasperReports Server 7.5 streamlines how it manages the encryption keys it uses to protect sensitive data inside and outside of the server. There is no more any need to configure the encryption keys because all keys are generated automatically during the installation and stored in a central keystore. The keys are used transparently whenever the server stores passwords internally or exports sensitive data. And as long as the same user performs the upgrade, the upgrade scripts have access to the same keys in the keystore. The new keys are backward compatible with the default keys from previous servers. However, there are possible cases when you need to manage keys during an upgrade. For example, if you do not have access to the user who installed the 7.5 instance, you may not be able to access the keystore anymore.

https://sourceforge.net/projects/jasperserver/files/JasperServer/JasperReports%20Server%20Community%20edition%207.8.0/JasperReports-Server-CP-Upgrade-Guide.pdf/download

bashirdeen commented 3 years ago

@grange74 Thanks for your quick help.

Based on your above comment, I have managed to mount the encryption key as volume and now it seems working fine. Login is working fine after recreating the jasper server docker container.

grange74 commented 3 years ago

Ok, great. Happy to hear that it worked. I'd appreciate if you can share your Dockerfile and anything else you changed to get working as I'd like to add support for 7.8.0 in this repo. If you have time then a pull request would also be welcome.

Priteerathod27 commented 7 months ago

@grange74 I have pulled the bitnami/jasprreport latest docker image in the client machine and I am unable to login with the default credentials to the client machine as username:jasperadmin, password-bitnami ,same credentials are working to login in my local machine.How can I resolve this issue.

grange74 commented 7 months ago

@Priteerathod27, your issue sounds quite different to the issue. Also this repo is not associated with bitnami at all, you are better off raising your issue at https://github.com/bitnami/containers/tree/main/bitnami/jasperreports and i would suggest to provide more details like log files/error messages as otherwise it is very hard to guess what the problem might be.