You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by cram <ch...@sjsu.edu> on 2019/07/05 18:17:59 UTC

Load balancing group throws - Cannot connect connection already in use by this user

Hi,
I am trying to configure a load balancing group for rdp connections.
I have created the group and added 2 connections and have set the max user
and max user per connection to 50.
But when I try to connect to the group, it throws a Connection error: The
Guacamole server is denying access to this connection because you have
exhausted the limit for simultaneous connection use by an individual user.
Please close one or more connections and try again.
There are no active connections when I checked the Active users tab.
When I click on the connections directly instead of the group it works fine.
The log show the following:
/Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.665
[http-nio-8080-exec-9] DEBUG o.a.i.t.jdbc.JdbcTransaction - Closing JDBC
Connection [com.mysql.jdbc.JDBC4Connection@51c6b7f>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.665
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Testing
connection 1371977713 ...
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.666
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Connection
1371977713 is GOOD!
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.666
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Returned
connection 1371977713 to pool.
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.666
[http-nio-8080-exec-9] DEBUG o.m.g.t.TransactionalMethodInterceptor -
[Intercepted method: public org.apache.guacamole.net.>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.666
[http-nio-8080-exec-9] DEBUG o.a.i.t.jdbc.JdbcTransaction - Opening JDBC
Connection
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.666
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Checked out
connection 1371977713 from pool.
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.666
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Testing
connection 1371977713 ...
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.667
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Connection
1371977713 is GOOD!
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.667
[http-nio-8080-exec-9] DEBUG o.a.i.t.jdbc.JdbcTransaction - Setting
autocommit to false on JDBC Connection [com.mysql.jdbc.>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.668
[http-nio-8080-exec-9] DEBUG o.a.g.a.j.c.C.selectIdentifiersWithin - ==> 
Preparing: SELECT connection_id FROM guacamole_co>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.668
[http-nio-8080-exec-9] DEBUG o.a.g.a.j.c.C.selectIdentifiersWithin - ==>
Parameters: 1(String)
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.669
[http-nio-8080-exec-9] DEBUG o.a.g.a.j.c.C.selectIdentifiersWithin - <==     
Total: 2
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.669
[http-nio-8080-exec-9] DEBUG o.a.g.a.j.c.ConnectionMapper.select - ==> 
Preparing: SELECT guacamole_connection.connection_i>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.669
[http-nio-8080-exec-9] DEBUG o.a.g.a.j.c.ConnectionMapper.select - ==>
Parameters: 1(String), 4(String), 1(String), 4(Strin>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.671
[http-nio-8080-exec-9] DEBUG o.a.g.a.j.c.ConnectionMapper.select - <==     
Total: 2
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.671
[http-nio-8080-exec-9] DEBUG o.a.g.a.j.c.ConnectionMapper.select - <==     
Total: 0
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.672
[http-nio-8080-exec-9] DEBUG o.m.g.t.TransactionalMethodInterceptor -
[Intercepted method: public org.apache.guacamole.net.>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.672
[http-nio-8080-exec-9] DEBUG o.a.i.t.jdbc.JdbcTransaction - Rolling back
JDBC Connection [com.mysql.jdbc.JDBC4Connection@51>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.673
[http-nio-8080-exec-9] DEBUG o.m.g.t.TransactionalMethodInterceptor -
[Intercepted method: public org.apache.guacamole.net.>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.673
[http-nio-8080-exec-9] DEBUG o.a.i.t.jdbc.JdbcTransaction - Resetting
autocommit to true on JDBC Connection [com.mysql.jdbc>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.673
[http-nio-8080-exec-9] DEBUG o.a.i.t.jdbc.JdbcTransaction - Closing JDBC
Connection [com.mysql.jdbc.JDBC4Connection@51c6b7f>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.673
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Testing
connection 1371977713 ...
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.674
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Connection
1371977713 is GOOD!
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.675
[http-nio-8080-exec-9] DEBUG o.a.i.d.pooled.PooledDataSource - Returned
connection 1371977713 to pool.
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.675
[http-nio-8080-exec-9] ERROR o.a.g.w.GuacamoleWebSocketTunnelEndpoint -
Creation of WebSocket tunnel to guacd failed: Canno>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.680
[http-nio-8080-exec-9] DEBUG o.a.g.w.GuacamoleWebSocketTunnelEndpoint -
Error connecting WebSocket tunnel.
Jul 05 10:31:57 localhost.localdomain server[23551]:
org.apache.guacamole.GuacamoleClientTooManyException: Cannot connect.
Connection already in use by this user.
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.guacamole.auth.jdbc.tunnel.RestrictedGuacamoleTunnelService.acquire(RestrictedGuacamoleTunnelService.java:256)
~[n>
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.guacamole.auth.jdbc.tunnel.AbstractGuacamoleTunnelService.getGuacamoleTunnel(AbstractGuacamoleTunnelService.java:6>
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.mybatis.guice.transactional.TransactionalMethodInterceptor.invoke(TransactionalMethodInterceptor.java:101)
~[na:na]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.guacamole.auth.jdbc.connectiongroup.ConnectionGroupService.connect(ConnectionGroupService.java:257)
~[na:na]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.guacamole.auth.jdbc.connectiongroup.ModeledConnectionGroup.connect(ModeledConnectionGroup.java:129)
~[na:na]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.guacamole.tunnel.TunnelRequestService.createConnectedTunnel(TunnelRequestService.java:238)
~[classes/:na]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.guacamole.tunnel.TunnelRequestService.createTunnel(TunnelRequestService.java:393)
~[classes/:na]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.guacamole.tunnel.websocket.RestrictedGuacamoleWebSocketTunnelEndpoint.createTunnel(RestrictedGuacamoleWebSocketTun>
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.onOpen(GuacamoleWebSocketTunnelEndpoint.java:110)
~[guacamole>
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.init(WsHttpUpgradeHandler.java:133)
[tomcat-websocket.jar:9.0.13]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:837)
[tomcat-coyote.jar:9.0.13]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
[tomcat-coyote.jar:9.0.13]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
[tomcat-coyote.jar:9.0.13]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[na:1.8.0_201]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[na:1.8.0_201]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-util.jar:9.0.13]
Jul 05 10:31:57 localhost.localdomain server[23551]:         at
java.lang.Thread.run(Thread.java:748) [na:1.8.0_201]
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.721
[http-nio-8080-exec-2] DEBUG o.a.i.t.jdbc.JdbcTransaction - Opening JDBC
Connection
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.721
[http-nio-8080-exec-2] DEBUG o.a.i.d.pooled.PooledDataSource - Checked out
connection 1371977713 from pool.
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.721
[http-nio-8080-exec-2] DEBUG o.a.i.d.pooled.PooledDataSource - Testing
connection 1371977713 ...
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.722
[http-nio-8080-exec-2] DEBUG o.a.i.d.pooled.PooledDataSource - Connection
1371977713 is GOOD!
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.722
[http-nio-8080-exec-2] DEBUG o.a.i.t.jdbc.JdbcTransaction - Setting
autocommit to false on JDBC Connection [com.mysql.jdbc.>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.723
[http-nio-8080-exec-2] DEBUG o.a.g.a.j.p.S.selectOne - ==>  Preparing:
SELECT guacamole_system_permission.user_id, username>
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.723
[http-nio-8080-exec-2] DEBUG o.a.g.a.j.p.S.selectOne - ==> Parameters:
1(Integer), ADMINISTER(String)
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.725
[http-nio-8080-exec-2] DEBUG o.a.g.a.j.p.S.selectOne - <==      Total: 1
Jul 05 10:31:57 localhost.localdomain server[23551]: 10:31:57.725
[http-nio-8080-exec-2] DEBUG o.a.i.t.jdbc.JdbcTransaction - Resetting
autocommit to true on JDBC Connection [com.mysql.jdbc>


Is there anything that I could have configured incorrectly causing this
issue?
Thanks in advance
<http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/file/t958/guacamole_error.png> 



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Load balancing group throws - Cannot connect connection already in use by this user

Posted by cram <ch...@sjsu.edu>.
> If you want to allow any individual user to establish multiple,
simultaneous connections to the group,
> you will need to set the "Maximum number of connections per user" setting
> on the connection group.
> By default, the database authentication extensions will limit the number
> of connections on a per-user 
> basis so that a single user will not be able to exhaust the pool of
> connections within the group on 
> their own.
>

I have set the limits to 100 users for the group and 100 connections for
each user and still facing the connection limit exhausted error

> Are you connecting to Guacamole through a proxy or reverse proxy
> that may not be correctly configured for WebSocket?
>

Checked with other websocket connections, they work without any issues.

Could there be any other issue causing this or anything I am missing?

-Thanks
</file/t958/group_configuration.png> 



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Load balancing group throws - Cannot connect connection already in use by this user

Posted by Mike Jumper <mj...@apache.org>.
On Fri, Jul 5, 2019 at 11:18 AM cram <
chithambaram.singaravelupoonkodi@sjsu.edu> wrote:

> Hi,
> I am trying to configure a load balancing group for rdp connections.
> I have created the group and added 2 connections and have set the max user
> and max user per connection to 50.
> But when I try to connect to the group, it throws a Connection error: The
> Guacamole server is denying access to this connection because you have
> exhausted the limit for simultaneous connection use by an individual user.
> Please close one or more connections and try again.
>

If you want to allow any individual user to establish multiple,
simultaneous connections to the group, you will need to set the "Maximum
number of connections per user" setting on the connection group. By
default, the database authentication extensions will limit the number of
connections on a per-user basis so that a single user will not be able to
exhaust the pool of connections within the group on their own.


> There are no active connections when I checked the Active users tab.
>

Are you connecting to Guacamole through a proxy or reverse proxy that may
not be correctly configured for WebSocket?

Misconfigured support for WebSocket within a proxy can result in just
enough of WebSocket functioning that the initial connection attempt
succeeds and Guacamole notes that the connection is in use. Meanwhile,
unknown to Guacamole, the connection fails on the client side due to the
mishandled WebSocket connection. The client side, assuming WebSocket has
failed entirely, then tries to fallback to HTTP, which Guacamole refuses to
allow since it still believes the connection established via WebSocket is
open.

If default concurrency restrictions for connection groups are overridden,
the symptoms of the above would disappear while the underlying problem
remains. As no such default restrictions apply to connections, this may be
why you are able to use the connections within the group directly.

When I click on the connections directly instead of the group it works fine.


If you set "Maximum number of connections per user" on the connections
themselves rather than the group containing them, that combined with
misconfigured WebSocket (see above) may be why.

- Mike