0

I am new to guacamole as well as docker. I am using mysql for the authentication.

The commands that i am trying are mentioned below

docker run --name some-guacd -d guacamole/guacd
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=root -d mysql:latest
docker run --name some-guacamole --link some-guacd:guacd --link some-mysql:mysql -e MYSQL_DATABASE=guacamole -e MYSQL_USER=guacamole -e MYSQL_PASSWORD=some_password -e MYSQL_ROOT_PASSWORD=root -v /local/path:/etc/guacamole -e GUACAMOLE_HOME=/etc/guacamole -d -p 8080:8080 guacamole/guacamole

but I am getting below provided exception.

Fri Mar 22 07:59:36 UTC 2019 WARN: Establishing SSL connection without 
server's identity verification is not recommended. According to MySQL 
5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established 
by default if explicit option isn't set. For compliance with existing 
applications not using SSL the verifyServerCertificate property is set to 
'false'. You need either to explicitly disable SSL by setting useSSL=false, 
or set useSSL=true and provide truststore for server certificate 
verification.
Fri Mar 22 07:59:36 UTC 2019 WARN: Establishing SSL connection without 
server's identity verification is not recommended. According to MySQL 
5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established 
by default if explicit option isn't set. For compliance with existing 
applications not using SSL the verifyServerCertificate property is set to 
'false'. You need either to explicitly disable SSL by setting useSSL=false, 
or set useSSL=true and provide truststore for server certificate 
verification.
07:59:36.126 [http-nio-8080-exec-7] ERROR o.a.g.rest.RESTExceptionMapper - 
Unexpected internal error:
### Error querying database.  Cause: java.sql.SQLException: Access denied 
for user 'guacamole'@'172.17.0.4' (using password: YES)
### The error may exist in 
org/apache/guacamole/auth/jdbc/user/UserMapper.xml
### The error may involve 
org.apache.guacamole.auth.jdbc.user.UserMapper.selectOne
### The error occurred while executing a query
### Cause: java.sql.SQLException: Access denied for user 
'guacamole'@'172.17.0.4' (using password: YES)

And my guacamole.properties

guacd-hostname:localhost
guacd-port:4822
lib-directory:/var/lib/guacamole/classpath

#basic-user-mapping:/etc/guacamole/user-mapping.xml
#auth-provider: 
net.sourceforge.guacamole.net.basic.BasicFileAuthenticationProvide
auth-   
provider:net.sourceforge.guacamole.net.auth.mysql
.MySQLAuthenticationProvider
mysql-hostname:127.0.0.1
mysql-port:3306
mysql-database:guacamole
mysql-username:guacamole
mysql-password:some_password

I am not sure where am I doing wrong ?

Sritam Jagadev
  • 955
  • 4
  • 18
  • 46

1 Answers1

0

Guacamole does not have a MYSQL_ROOT_PASSWORD environment variable like the MySQL container does. Instead, you specify a username and password to connect with. The simplest way to get the containers working with each other would be as follows:

docker run --name some-guacd -d guacamole/guacd
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=guacamole -d mysql:latest
docker run --name some-guacamole --link some-guacd:guacd --link some-mysql:mysql -e MYSQL_DATABASE=guacamole -e MYSQL_USER=root -e MYSQL_PASSWORD=root -v /local/path:/etc/guacamole -e GUACAMOLE_HOME=/etc/guacamole -d -p 8080:8080 guacamole/guacamole

I removed the MYSQL_ROOT_PASSWORD variable and updated the other environment variables to reflect your MySQL config. I also updated the MySQL container environment variables to create the database you want the Guacamole data to go in.

One important thing to note: It is not secure to run Guacamole with the root MySQL user. I would recommend creating a new database user for Guacamole to run as and giving it proper permissions to the database.

nh_99
  • 58
  • 7