Problems with connection sharing

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with connection sharing

Dashamir Hoxha
Hi,

In the latest version of guacamole (1.2.0) I am having problems with connection sharing (https://guacamole.apache.org/doc/gug/administration.html#idm45241640220720)

I create a new sharing profile but it does not appear on the list.
Then the share menu does not appear at all to the users (https://guacamole.apache.org/doc/gug/using-guacamole.html#client-share-menu)

Am I missing something? It used to work well with 1.1.0.

Thanks,
Dashamir
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

vnick
On Thu, Jul 2, 2020 at 5:13 PM Dashamir Hoxha <[hidden email]> wrote:
Hi,

In the latest version of guacamole (1.2.0) I am having problems with connection sharing (https://guacamole.apache.org/doc/gug/administration.html#idm45241640220720)

I create a new sharing profile but it does not appear on the list.
Then the share menu does not appear at all to the users (https://guacamole.apache.org/doc/gug/using-guacamole.html#client-share-menu)


Did you give the user who is sharing the connection access to the Sharing Profile?
 
Am I missing something? It used to work well with 1.1.0.

Is the 1.2.0 deployment an upgrade of this environment, or a new deployment?

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

Dashamir Hoxha
On Fri, Jul 3, 2020 at 5:19 PM Nick Couchman <[hidden email]> wrote:
On Thu, Jul 2, 2020 at 5:13 PM Dashamir Hoxha <[hidden email]> wrote:
Hi,

In the latest version of guacamole (1.2.0) I am having problems with connection sharing (https://guacamole.apache.org/doc/gug/administration.html#idm45241640220720)

I create a new sharing profile but it does not appear on the list.
Then the share menu does not appear at all to the users (https://guacamole.apache.org/doc/gug/using-guacamole.html#client-share-menu)


Did you give the user who is sharing the connection access to the Sharing Profile?

Even the admin user has this problem.
When I say "it does not appear on the list" I mean it does not appear even in the list of sharing profiles on the settings interface (you just clicked on "New Sharing Profile" and saved it, but it does not appear on the list).
 
 
Am I missing something? It used to work well with 1.1.0.

Is the 1.2.0 deployment an upgrade of this environment, or a new deployment?

It is a new deployment. The most easy way to reproduce it is on:

Even more easy is by opening https://lab.fs.al/ and login as user `admin`, pass `ooD9oChi`.

The installation/configuration scripts are on:

The database is MariaDB
 

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

mjumper
Administrator
On Fri, Jul 3, 2020, 10:25 Dashamir Hoxha <[hidden email]> wrote:
...

Even more easy is by opening https://lab.fs.al/ and login as user `admin`, pass `ooD9oChi`.

Beware that this is a public and publicly-archived mailing list.

- Mike

Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

vnick
In reply to this post by Dashamir Hoxha
On Fri, Jul 3, 2020 at 1:25 PM Dashamir Hoxha <[hidden email]> wrote:
On Fri, Jul 3, 2020 at 5:19 PM Nick Couchman <[hidden email]> wrote:
On Thu, Jul 2, 2020 at 5:13 PM Dashamir Hoxha <[hidden email]> wrote:
Hi,

In the latest version of guacamole (1.2.0) I am having problems with connection sharing (https://guacamole.apache.org/doc/gug/administration.html#idm45241640220720)

I create a new sharing profile but it does not appear on the list.
Then the share menu does not appear at all to the users (https://guacamole.apache.org/doc/gug/using-guacamole.html#client-share-menu)


Did you give the user who is sharing the connection access to the Sharing Profile?

Even the admin user has this problem.
When I say "it does not appear on the list" I mean it does not appear even in the list of sharing profiles on the settings interface (you just clicked on "New Sharing Profile" and saved it, but it does not appear on the list).
 

Interesting - is there anything printed to the Tomcat log files when you try to add the sharing profile?  I suspect something is a little messed up in the database - either the schema is wrong (lacking tables that support connection sharing) or the permissions for the user accessing the database are incorrect (no ability to write to the table).  Usually this would generate warnings or errors on the web UI, but I'm curious to know what is printed in the log files.

-Nick 
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

Dashamir Hoxha
In reply to this post by mjumper


On Fri, Jul 3, 2020 at 7:38 PM Mike Jumper <[hidden email]> wrote:
On Fri, Jul 3, 2020, 10:25 Dashamir Hoxha <[hidden email]> wrote:
...

Even more easy is by opening https://lab.fs.al/ and login as user `admin`, pass `ooD9oChi`.

Beware that this is a public and publicly-archived mailing list.

I know, but it is an ephemeral, testing installation.
 

- Mike

Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

Dashamir Hoxha
In reply to this post by vnick
On Fri, Jul 3, 2020 at 8:55 PM Nick Couchman <[hidden email]> wrote:
On Fri, Jul 3, 2020 at 1:25 PM Dashamir Hoxha <[hidden email]> wrote:
On Fri, Jul 3, 2020 at 5:19 PM Nick Couchman <[hidden email]> wrote:
On Thu, Jul 2, 2020 at 5:13 PM Dashamir Hoxha <[hidden email]> wrote:
Hi,

In the latest version of guacamole (1.2.0) I am having problems with connection sharing (https://guacamole.apache.org/doc/gug/administration.html#idm45241640220720)

I create a new sharing profile but it does not appear on the list.
Then the share menu does not appear at all to the users (https://guacamole.apache.org/doc/gug/using-guacamole.html#client-share-menu)


Did you give the user who is sharing the connection access to the Sharing Profile?

Even the admin user has this problem.
When I say "it does not appear on the list" I mean it does not appear even in the list of sharing profiles on the settings interface (you just clicked on "New Sharing Profile" and saved it, but it does not appear on the list).
 

Interesting - is there anything printed to the Tomcat log files when you try to add the sharing profile?  I suspect something is a little messed up in the database - either the schema is wrong (lacking tables that support connection sharing) or the permissions for the user accessing the database are incorrect (no ability to write to the table).  Usually this would generate warnings or errors on the web UI, but I'm curious to know what is printed in the log files.

I don't see anything on the logs (/var/log/tomcat9). Also the database seems to be correct:


MariaDB [guacamole_db]> select * from guacamole_sharing_profile;
+--------------------+----------------------+-----------------------+
| sharing_profile_id | sharing_profile_name | primary_connection_id |
+--------------------+----------------------+-----------------------+
|                  1 | Watch                |                     1 |
+--------------------+----------------------+-----------------------+

MariaDB [guacamole_db]> select * from guacamole_sharing_profile_parameter;
+--------------------+----------------+-----------------+
| sharing_profile_id | parameter_name | parameter_value |
+--------------------+----------------+-----------------+
|                  1 | read-only      | true            |
+--------------------+----------------+-----------------+

MariaDB [guacamole_db]> select * from guacamole_sharing_profile_permission;
+-----------+--------------------+------------+
| entity_id | sharing_profile_id | permission |
+-----------+--------------------+------------+
|         1 |                  1 | READ       |
|         1 |                  1 | UPDATE     |
|         1 |                  1 | DELETE     |
|         1 |                  1 | ADMINISTER |
+-----------+--------------------+------------+




-Nick 
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

vnick

I don't see anything on the logs (/var/log/tomcat9). Also the database seems to be correct:

Which logs are you looking at?  Do you see other messages related to Guacamole in those files?  You may need to bump up the log level of the web application and see if that turns up anything useful:





MariaDB [guacamole_db]> select * from guacamole_sharing_profile;
+--------------------+----------------------+-----------------------+
| sharing_profile_id | sharing_profile_name | primary_connection_id |
+--------------------+----------------------+-----------------------+
|                  1 | Watch                |                     1 |
+--------------------+----------------------+-----------------------+

MariaDB [guacamole_db]> select * from guacamole_sharing_profile_parameter;
+--------------------+----------------+-----------------+
| sharing_profile_id | parameter_name | parameter_value |
+--------------------+----------------+-----------------+
|                  1 | read-only      | true            |
+--------------------+----------------+-----------------+

MariaDB [guacamole_db]> select * from guacamole_sharing_profile_permission;
+-----------+--------------------+------------+
| entity_id | sharing_profile_id | permission |
+-----------+--------------------+------------+
|         1 |                  1 | READ       |
|         1 |                  1 | UPDATE     |
|         1 |                  1 | DELETE     |
|         1 |                  1 | ADMINISTER |
+-----------+--------------------+------------+


What about permissions of the JDBC user to the MariaDB tables?

I haven’t tried with MariaDB - I’m running Postgres - but I’m able to correctly add a sharing profile to my instance.  The other reason I ask about the DB is because when I logged on to the Guacamole instance you provided earlier there were two different connections with the same name, which should not be allowed.  Guacamole enforces unique connection names within the instance.  This makes me think that something is a little messed up in the DB itself, or that the database has been modified somehow outside the user interface in a way that it’s causing unexpected behavior.

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

Dashamir Hoxha
On Fri, Jul 3, 2020 at 11:13 PM Nick Couchman <[hidden email]> wrote:

I don't see anything on the logs (/var/log/tomcat9). Also the database seems to be correct:

Which logs are you looking at?  Do you see other messages related to Guacamole in those files?  You may need to bump up the log level of the web application and see if that turns up anything useful:





MariaDB [guacamole_db]> select * from guacamole_sharing_profile;
+--------------------+----------------------+-----------------------+
| sharing_profile_id | sharing_profile_name | primary_connection_id |
+--------------------+----------------------+-----------------------+
|                  1 | Watch                |                     1 |
+--------------------+----------------------+-----------------------+

MariaDB [guacamole_db]> select * from guacamole_sharing_profile_parameter;
+--------------------+----------------+-----------------+
| sharing_profile_id | parameter_name | parameter_value |
+--------------------+----------------+-----------------+
|                  1 | read-only      | true            |
+--------------------+----------------+-----------------+

MariaDB [guacamole_db]> select * from guacamole_sharing_profile_permission;
+-----------+--------------------+------------+
| entity_id | sharing_profile_id | permission |
+-----------+--------------------+------------+
|         1 |                  1 | READ       |
|         1 |                  1 | UPDATE     |
|         1 |                  1 | DELETE     |
|         1 |                  1 | ADMINISTER |
+-----------+--------------------+------------+


What about permissions of the JDBC user to the MariaDB tables?

I haven’t tried with MariaDB - I’m running Postgres - but I’m able to correctly add a sharing profile to my instance.  The other reason I ask about the DB is because when I logged on to the Guacamole instance you provided earlier there were two different connections with the same name, which should not be allowed.  Guacamole enforces unique connection names within the instance.  This makes me think that something is a little messed up in the DB itself, or that the database has been modified somehow outside the user interface in a way that it’s causing unexpected behavior.

I tried something else:
- installed `mysql-connector-java`
- commented out the line `mysql-driver:   mariadb` on `/etc/guacamole/guacamole.properties`
- restarted Tomcat: `systemctl restart tomcat9`
and voila, everything works correctly.

Then uncomment  `mysql-driver:   mariadb` and restart tomcat, and the problem is still there.

So, definitely this looks like a bug related to the MariaDB driver.
But it has an easy workaround: use `mysql-connector-java` instead.
 

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

vnick
I tried something else:
- installed `mysql-connector-java`
- commented out the line `mysql-driver:   mariadb` on `/etc/guacamole/guacamole.properties`
- restarted Tomcat: `systemctl restart tomcat9`
and voila, everything works correctly.

Then uncomment  `mysql-driver:   mariadb` and restart tomcat, and the problem is still there.

So, definitely this looks like a bug related to the MariaDB driver.
But it has an easy workaround: use `mysql-connector-java` instead.
 

I'll try to do some tests and see what happens.  Thanks for the additional information.

-Nick 
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

vnick
On Sat, Jul 4, 2020 at 3:09 PM Nick Couchman <[hidden email]> wrote:
I tried something else:
- installed `mysql-connector-java`
- commented out the line `mysql-driver:   mariadb` on `/etc/guacamole/guacamole.properties`
- restarted Tomcat: `systemctl restart tomcat9`
and voila, everything works correctly.

Then uncomment  `mysql-driver:   mariadb` and restart tomcat, and the problem is still there.

So, definitely this looks like a bug related to the MariaDB driver.
But it has an easy workaround: use `mysql-connector-java` instead.
 

I'll try to do some tests and see what happens.  Thanks for the additional information.


I have tested using the following environment:
- OpenJDK 1.8.0_232
- Tomcat 8
- MariaDB 5.5.64
- MariaDB J/Connection 2.6.1
- Guacamole Client 1.2.0
- Have "mysql-driver: mariadb" set in guacamole.properties

I can successfully create sharing profiles in this environment - I am not seeing the behavior that is present in your environment.

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

Dashamir Hoxha
On Sat, Jul 4, 2020 at 9:42 PM Nick Couchman <[hidden email]> wrote:

I have tested using the following environment:
- OpenJDK 1.8.0_232
- Tomcat 8
- MariaDB 5.5.64
- MariaDB J/Connection 2.6.1
- Guacamole Client 1.2.0
- Have "mysql-driver: mariadb" set in guacamole.properties

I can successfully create sharing profiles in this environment - I am not seeing the behavior that is present in your environment.

In my case (the case that is not working), I am using the stock packages or ubuntu-20.04: mariadb-server-10.3.22, libmariadb-java-2.5.3 (and tomcat9).
Maybe it is the MariaDB version or the version of J/Connection that is causing the problem. If it is so, and if nobody cares about this, you can ignore it (they can use the workaround anyway, as I do). Eventually the default MariaDB version on Ubuntu will reach the working version and everything will be fine.
 

-Nick
Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

mjumper
Administrator
On Sat, Jul 4, 2020 at 2:44 PM Dashamir Hoxha <[hidden email]> wrote:
On Sat, Jul 4, 2020 at 9:42 PM Nick Couchman <[hidden email]> wrote:

I have tested using the following environment:
- OpenJDK 1.8.0_232
- Tomcat 8
- MariaDB 5.5.64
- MariaDB J/Connection 2.6.1
- Guacamole Client 1.2.0
- Have "mysql-driver: mariadb" set in guacamole.properties

I can successfully create sharing profiles in this environment - I am not seeing the behavior that is present in your environment.

In my case (the case that is not working), I am using the stock packages or ubuntu-20.04: mariadb-server-10.3.22, libmariadb-java-2.5.3 (and tomcat9).
Maybe it is the MariaDB version or the version of J/Connection that is causing the problem. If it is so, and if nobody cares about this, you can ignore it (they can use the workaround anyway, as I do). Eventually the default MariaDB version on Ubuntu will reach the working version and everything will be fine.

Even if this does prove to be a bug in a specific version of MariaDB or Connector/J, I think it is worth determining what exactly is failing and how. It does not make sense that a bug within the database would cause such specific trouble. I would expect a bug in the database itself to wreak much more generic havoc.

- Mike

Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

Dashamir Hoxha
On Wed, Jul 8, 2020 at 12:08 AM Mike Jumper <[hidden email]> wrote:

Even if this does prove to be a bug in a specific version of MariaDB or Connector/J, I think it is worth determining what exactly is failing and how. It does not make sense that a bug within the database would cause such specific trouble. I would expect a bug in the database itself to wreak much more generic havoc.

It does not seem like a bug in the database. Most probably it is a bug in the UI (tomcat application). The docs say that sharing connections is supported only if there is a database. Given that MariaDB support was added recently, maybe some condition is still wrong for some reason.

Reply | Threaded
Open this post in threaded view
|

Re: Problems with connection sharing

vnick
On Tue, Jul 7, 2020 at 11:22 PM Dashamir Hoxha <[hidden email]> wrote:
On Wed, Jul 8, 2020 at 12:08 AM Mike Jumper <[hidden email]> wrote:

Even if this does prove to be a bug in a specific version of MariaDB or Connector/J, I think it is worth determining what exactly is failing and how. It does not make sense that a bug within the database would cause such specific trouble. I would expect a bug in the database itself to wreak much more generic havoc.

It does not seem like a bug in the database. Most probably it is a bug in the UI (tomcat application). The docs say that sharing connections is supported only if there is a database. Given that MariaDB support was added recently, maybe some condition is still wrong for some reason.


It could be; however, as I already mentioned I have configured my environment using a similar configuration to yours (MariaDB server, though an older version, MariaDB Connector/J), and connection sharing works perfectly fine for me.

MariaDB Connector/J support was added in 1.2.0, but it was a very simple change to support the Java class that the MariaDB Connector/J driver runs under - otherwise, support for MySQL and MariaDB remains largely the same.  It is possible that some changes in more recent versions of the MariaDB server are causing incompatibilities.  It's definitely worth some more testing.

-Nick