Closed rstoermer closed 4 years ago
The thing that stands out to me here is the segmentation fault. That implies your container doesn't have enough memory. Perhaps the mysql command can't start because there's not enough memory, and that's what's causing the entrypoint.sh
database test to fail?
I don't know whether it's related or not, but I did see that the "mysql-client" package is no longer available on the Debian-based images. I switched it to default-mysql-client so I could rebuild the images, and pushed the 3.8.1 images again to Docker Hub. However it shouldn't affect the Zulu/AdoptOpenJDK images which use Alpine instead. So it doesn't sound like that change will fix your problem here. @jensenak's comment sounds plausible and certainly something to look into.
Could this be due to the default authentication plugin used by MySQL 8.0 (caching_sha2_password)? Try starting MySQL with the --default-authentication-plugin=mysql_native_password
. See the MySQL example: https://github.com/nextgenhealthcare/connect-docker/blob/master/examples/mysql-with-volume.yml
The newest Debian based images now support MySQL 8 auth natively and won't need the --default-authentication-plugin=mysql_native_password
, but all other images will as they don't yet have clients that support MySQL 8 auth natively.
I can't get Connect to run with MySQL (Ran great before without mysql). For some reason the connect container can't connect to mysql, although other containers (like Adminer/ phpmyadmin) can, with the hostname connectdb. With the image 3.8.1 I am getting:
connect_1 | trying to connect to mysql connect_1 | MySQL is unavailable. Aborting.
With the image 3.8.1-zulu-alpine-jdk I am getting:
connect_1 | /entrypoint.sh: line 192: 215 Done echo $dbpassword connect_1 | 216 Segmentation fault | mysql -h "$dbhost" -p -P "$dbport" -u "$dbusername" -e 'SHOW DATABASES' > /dev/null 2>&1 connect_1 | /entrypoint.sh: line 192: 218 Done echo $dbpassword connect_1 | 219 Segmentation fault | mysql -h "$dbhost" -p -P "$dbport" -u "$dbusername" -e 'SHOW DATABASES' > /dev/null 2>&1 connect_1 | MySQL is unavailable. Aborting. smart-or-data-broker_connect_1 exited with code 1
Seems like the information from my env file is not passed into connect? With all other containers in the same docker-compose.yml it works well
However even without the env file, running e.g. "docker run --name connect -p 8443:8443 -e DATABASE='mysql' -e DATABASE_URL='jdbc:mysql://connectdb:3306/mirthdb' nextgenhealthcare/connect:3.8.1-zulu-alpine" produces the same error. I know the password and so on are missing, however the host and port are not found either:
219 Segmentation fault | mysql -h "$dbhost" -p -P "$dbport" -u "$dbusername" -e 'SHOW DATABASES' > /dev/null 2>&1
My docker-compose looks like this: