You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Chris Bradford <ch...@outlook.com> on 2016/10/12 08:02:40 UTC

Extension "guacamole-auth-jdbc-mysql-0.9.9.jar" could not be loaded

I have installed guacamole using latest code (git clone) as outlined here: http://www.cb-net.co.uk/linux/debian-8-6-jessie-installing-guacamole/

I have since tried to get MySQL configuration working using the steps below:

# Download guacamole-auth-jdbc-0.9.9.tar.gz and copy to /etc/guacamole/extensions/
wget http://netix.dl.sourceforge.net/project/guacamole/current/extensions/guacamole-auth-jdbc-0.9.9.tar.gz 
tar -zxvf guacamole-auth-jdbc-0.9.9.tar.gz
cd ~/guacamole-auth-jdbc-0.9.9/mysql
cp *.jar /etc/guacamole/extensions/
cd..

# Download mysql-connector-java-5.1.40-bin.jar and copy to /etc/guacamole/lib/
wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.40.tar.gz
tar -zxvf mysql-connector-java-5.1.40.tar.gz
cd mysql-connector-java-5.1.40
cp mysql-connector-java-5.1.40-bin.jar /etc/guacamole/lib/

# Configure MySQL via supplied scripts
mysql -u root -p<password>
    CREATE DATABASE guacamole;
    CREATE USER 'guacamole'@'localhost' IDENTIFIED BY '<password>';
    GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole.* TO 'guacamole'@'localhost';
    FLUSH PRIVILEGES;
    quit

cd ~/guacamole-auth-jdbc-0.9.9/mysql
cat schema/*.sql | mysql -u root -p guacamole

(I confirmed the guacadmin user was created)

# Guacamole.properties as below:
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole
mysql-username: guacamole
mysql-password: <password>
 I am however, unable to get the extension to load, and thus authentication fails. The error in catalina.out as below:

ERROR o.a.g.extension.ExtensionModule - Extension "guacamole-auth-jdbc-mysql-0.9.9.jar" could not be loaded: Authentication provider class cannot be loaded (wrong version of API?)

No errors anywhere else that I can see, including when running guacd as below - not sure what I am missing, or what the caus eof this error would be?
/usr/local/sbin/guacd -f -L debug


 		 	   		  

RE: Extension "guacamole-auth-jdbc-mysql-0.9.9.jar" could not be loaded

Posted by Chris Bradford <ch...@outlook.com>.
Thanks Mike, I'll update the post I used to build the environment accordingly.

From: mike.jumper@guac-dev.org
Date: Mon, 17 Oct 2016 15:42:10 -0700
Subject: Re: Extension "guacamole-auth-jdbc-mysql-0.9.9.jar" could not be loaded
To: user@guacamole.incubator.apache.org

On Wed, Oct 12, 2016 at 1:08 PM, Chris Bradford <ch...@outlook.com> wrote:



Nevermind - I fixed this, my solution was to stop tomcat8, remove the guacamole.war file, 
guacamole tomcat8 directory and then re-dploy the guacamole client, 
using the commands below. Perhaps an issue caused by building the guacamole-clientvia git clone, rather than downloading .war file?
Building guacamole-client from git should result in exactly the same sort of .war file (it's how the .war is built each release, after all).
The error you were seeing (regarding API version) occurs when an extension cannot be loaded because it was built against a different version of Guacamole. While the version number of Guacamole within the git repository at the time was 0.9.9, it's likely that there were changes on git which made it incompatible with the extensions built against the 0.9.9 release. There are version number sanity checks performed against extensions when Guacamole starts up, but those will only fail if the version number of the application has been bumped, and that only happens when we're preparing for a new release.
The database authentication is part of the guacamole-client source, within the "extensions/guacamole-auth-jdbc" directory, so if you built guacamole-client from git you may have actually had a proper version of the extension on hand - just deeper in the directory tree. In any case, if you want to build Guacamole from git, you can definitely do so. Just make sure to use extensions built against the same version (ie: from git).
Please also keep in mind that the repositories referenced in the link you provided are from prior to the move to Apache Incubator, and thus will not have the latest source. The new repositories are:
https://github.com/apache/incubator-guacamole-client
https://github.com/apache/incubator-guacamole-server

- Mike
 		 	   		  

Re: Extension "guacamole-auth-jdbc-mysql-0.9.9.jar" could not be loaded

Posted by Mike Jumper <mi...@guac-dev.org>.
On Wed, Oct 12, 2016 at 1:08 PM, Chris Bradford <ch...@outlook.com>
wrote:

> Nevermind - I fixed this, my solution was to stop tomcat8, remove the
> guacamole.war file, guacamole tomcat8 directory and then re-dploy the
> guacamole client, using the commands below. Perhaps an issue caused by
> building the guacamole-clientvia git clone, rather than downloading .war
> file?
>

Building guacamole-client from git should result in exactly the same sort
of .war file (it's how the .war is built each release, after all).

The error you were seeing (regarding API version) occurs when an extension
cannot be loaded because it was built against a different version of
Guacamole. While the version number of Guacamole within the git repository
at the time was 0.9.9, it's likely that there were changes on git which
made it incompatible with the extensions built against the 0.9.9 release.
There are version number sanity checks performed against extensions when
Guacamole starts up, but those will only fail if the version number of the
application has been bumped, and that only happens when we're preparing for
a new release.

The database authentication is part of the guacamole-client source, within
the "extensions/guacamole-auth-jdbc" directory, so if you built
guacamole-client from git you may have actually had a proper version of the
extension on hand - just deeper in the directory tree. In any case, if you
want to build Guacamole from git, you can definitely do so. Just make sure
to use extensions built against the same version (ie: from git).

Please also keep in mind that the repositories referenced in the link you
provided are from prior to the move to Apache Incubator, and thus will not
have the latest source. The new repositories are:

https://github.com/apache/incubator-guacamole-client
https://github.com/apache/incubator-guacamole-server

- Mike

RE: Extension "guacamole-auth-jdbc-mysql-0.9.9.jar" could not be loaded

Posted by Chris Bradford <ch...@outlook.com>.
Nevermind - I fixed this, my solution was to stop tomcat8, remove the guacamole.war file, 
guacamole tomcat8 directory and then re-dploy the guacamole client, 
using the commands below. Perhaps an issue caused by building the guacamole-clientvia git clone, rather than downloading .war file?
# stop tomcat8
systemctl stop tomcat8

# remove guacamole files/ directoryrm /var/lib/tomcat8/webapps/guacamole.war
rm -r /var/lib/tomcat8/webapps/guacamole/

# download the pre-built guacamole-client
wget -O guacamole.war http://downloads.sourceforge.net/project/guacamole/current/binary/guacamole-0.9.9.war

# deploy and create symlink under tomcat8
cp /guacamole/target/guacamole.war /etc/guacamole/
ln -s /etc/guacamole/guacamole.war /var/lib/tomcat8/webapps/

# start tomcat8
systemctl start tomcat8

From: chrismbradford@outlook.com
To: user@guacamole.incubator.apache.org
Subject: Extension "guacamole-auth-jdbc-mysql-0.9.9.jar" could not be loaded
Date: Wed, 12 Oct 2016 09:02:40 +0100




I have installed guacamole using latest code (git clone) as outlined here: http://www.cb-net.co.uk/linux/debian-8-6-jessie-installing-guacamole/

I have since tried to get MySQL configuration working using the steps below:

# Download guacamole-auth-jdbc-0.9.9.tar.gz and copy to /etc/guacamole/extensions/
wget http://netix.dl.sourceforge.net/project/guacamole/current/extensions/guacamole-auth-jdbc-0.9.9.tar.gz 
tar -zxvf guacamole-auth-jdbc-0.9.9.tar.gz
cd ~/guacamole-auth-jdbc-0.9.9/mysql
cp *.jar /etc/guacamole/extensions/
cd..

# Download mysql-connector-java-5.1.40-bin.jar and copy to /etc/guacamole/lib/
wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.40.tar.gz
tar -zxvf mysql-connector-java-5.1.40.tar.gz
cd mysql-connector-java-5.1.40
cp mysql-connector-java-5.1.40-bin.jar /etc/guacamole/lib/

# Configure MySQL via supplied scripts
mysql -u root -p<password>
    CREATE DATABASE guacamole;
    CREATE USER 'guacamole'@'localhost' IDENTIFIED BY '<password>';
    GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole.* TO 'guacamole'@'localhost';
    FLUSH PRIVILEGES;
    quit

cd ~/guacamole-auth-jdbc-0.9.9/mysql
cat schema/*.sql | mysql -u root -p guacamole

(I confirmed the guacadmin user was created)

# Guacamole.properties as below:
mysql-hostname: localhost
mysql-port: 3306
mysql-database: guacamole
mysql-username: guacamole
mysql-password: <password>
 I am however, unable to get the extension to load, and thus authentication fails. The error in catalina.out as below:

ERROR o.a.g.extension.ExtensionModule - Extension "guacamole-auth-jdbc-mysql-0.9.9.jar" could not be loaded: Authentication provider class cannot be loaded (wrong version of API?)

No errors anywhere else that I can see, including when running guacd as below - not sure what I am missing, or what the caus eof this error would be?
/usr/local/sbin/guacd -f -L debug