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

MySQL Client Error #18

Closed gnobre closed 6 years ago

gnobre commented 6 years ago

I'm simply trying to run jasperserver:

docker-compose up

but then the build fails and I get the following error:

Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client

I've tried to run with the command line as well and got the same error.

EDIT: I've just tried to run with postgres as the database, following these instructions in another issue and it worked fine

grange74 commented 6 years ago

Sorry it seems like the problem is caused by the new release of MySQL 8 and the fact that the docker-compose file in this report doesn't specify a version tag for the mysql image, so it gets whatever has the 'latest' tag. It really should have a specific version to avoid these problems. To fix this temporarily, add a version tag for a 5.X version of MySQL, E.g. :5.7 to image: mysql line. The same should work from the command line.

grange74 commented 6 years ago

So for the command line try:

docker run -d --name jasperserver_mysql -e MYSQL_ROOT_PASSWORD=mysql mysql:5.7
grange74 commented 6 years ago

And for the docker-compose.yml:

version: '3'

services:

  mysql:
    image: mysql:5.7
    container_name: mysql
gnobre commented 6 years ago

Thanks @grange74, I actually haven't tried that, for now I'm using postgres and it's working fine :)

grange74 commented 6 years ago

Fixed in https://github.com/retrievercommunications/docker-jasperserver/pull/19. I will create a separate issue for supporting mysql 8.

Please note that if you get this error, you will need to atleast: