title: Guacamole closing socket to guacd when I connect
body: <p>I have installed Guacamole on Ubuntu 16.04 following these steps:  <a href="https://www.vultr.com/docs/create-an-html-5-rdp-ssh-frontend-using-guacamole-on-ubuntu-16-04-lts" rel="nofollow noreferrer">https://www.vultr.com/docs/create-an-html-5-rdp-ssh-frontend-using-guacamole-on-ubuntu-16-04-lts</a></p>
  
  <p>I have used the latest version of Guacamole etc.</p>
  
  <p>When I access the Guacamole login screen I get the following error:</p>
  
  <p><a href="https://i.stack.imgur.com/yRzKk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yRzKk.png" alt="enter image description here"></a></p>
  
  <p>When i look at the logs </p>
  
  <p><strong>tail -f /var/log/tomcat8/catalina.out</strong></p>
  
  <p>I see the following:</p>
  
  <pre><code>19:56:29.048 [http-nio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction - Opening JDBC Connection
  19:56:29.048 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Checked out connection 572680346 from pool.
  19:56:29.048 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Testing connection 572680346 ...
  19:56:29.050 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Connection 572680346 is GOOD!
  19:56:29.050 [http-nio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@2222689a]
  19:56:29.051 [http-nio-8080-exec-4] DEBUG o.a.g.a.j.user.UserMapper.selectOne - ==&gt;  Preparing: SELECT guacamole_user.user_id, guacamole_entity.entity_id, guacamole_entity.name, password_hash, password_salt, password_date, disabled, expired, access_window_start, access_window_end, valid_from, valid_until, timezone, full_name, email_address, organization, organizational_role, MAX(start_date) AS last_active FROM guacamole_user JOIN guacamole_entity ON guacamole_user.entity_id = guacamole_entity.entity_id LEFT JOIN guacamole_user_history ON guacamole_user_history.user_id = guacamole_user.user_id WHERE guacamole_entity.name = ? AND guacamole_entity.type = 'USER' GROUP BY guacamole_user.user_id, guacamole_entity.entity_id; SELECT guacamole_user_attribute.user_id, guacamole_user_attribute.attribute_name, guacamole_user_attribute.attribute_value FROM guacamole_user_attribute JOIN guacamole_user ON guacamole_user.user_id = guacamole_user_attribute.user_id JOIN guacamole_entity ON guacamole_user.entity_id = guacamole_entity.entity_id WHERE guacamole_entity.name = ? AND guacamole_entity.type = 'USER'
  19:56:29.051 [http-nio-8080-exec-4] DEBUG o.a.g.a.j.user.UserMapper.selectOne - ==&gt; Parameters: service(String), service(String)
  19:56:29.052 [http-nio-8080-exec-4] DEBUG o.a.g.a.j.user.UserMapper.selectOne - &lt;==      Total: 0
  19:56:29.052 [http-nio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@2222689a]
  19:56:29.052 [http-nio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction - Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@2222689a]
  19:56:29.052 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Testing connection 572680346 ...
  19:56:29.052 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Connection 572680346 is GOOD!
  19:56:29.052 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Returned connection 572680346 to pool.
  19:56:29.054 [http-nio-8080-exec-4] INFO  o.a.g.r.auth.AuthenticationService - User "service" successfully authenticated from 10.160.108.44.
  19:56:29.055 [http-nio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction - Opening JDBC Connection
  19:56:29.055 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Checked out connection 572680346 from pool.
  19:56:29.055 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Testing connection 572680346 ...
  19:56:29.055 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Connection 572680346 is GOOD!
  19:56:29.055 [http-nio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction - Setting autocommit to false on JDBC Connection [com.mysql.jdbc.JDBC4Connection@2222689a]
  19:56:29.055 [http-nio-8080-exec-4] DEBUG o.a.g.a.j.user.UserMapper.selectOne - ==&gt;  Preparing: SELECT guacamole_user.user_id, guacamole_entity.entity_id, guacamole_entity.name, password_hash, password_salt, password_date, disabled, expired, access_window_start, access_window_end, valid_from, valid_until, timezone, full_name, email_address, organization, organizational_role, MAX(start_date) AS last_active FROM guacamole_user JOIN guacamole_entity ON guacamole_user.entity_id = guacamole_entity.entity_id LEFT JOIN guacamole_user_history ON guacamole_user_history.user_id = guacamole_user.user_id WHERE guacamole_entity.name = ? AND guacamole_entity.type = 'USER' GROUP BY guacamole_user.user_id, guacamole_entity.entity_id; SELECT guacamole_user_attribute.user_id, guacamole_user_attribute.attribute_name, guacamole_user_attribute.attribute_value FROM guacamole_user_attribute JOIN guacamole_user ON guacamole_user.user_id = guacamole_user_attribute.user_id JOIN guacamole_entity ON guacamole_user.entity_id = guacamole_entity.entity_id WHERE guacamole_entity.name = ? AND guacamole_entity.type = 'USER'
  19:56:29.055 [http-nio-8080-exec-4] DEBUG o.a.g.a.j.user.UserMapper.selectOne - ==&gt; Parameters: service(String), service(String)
  19:56:29.056 [http-nio-8080-exec-4] DEBUG o.a.g.a.j.user.UserMapper.selectOne - &lt;==      Total: 0
  19:56:29.056 [http-nio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction - Resetting autocommit to true on JDBC Connection [com.mysql.jdbc.JDBC4Connection@2222689a]
  19:56:29.056 [http-nio-8080-exec-4] DEBUG o.a.i.t.jdbc.JdbcTransaction - Closing JDBC Connection [com.mysql.jdbc.JDBC4Connection@2222689a]
  19:56:29.056 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Testing connection 572680346 ...
  19:56:29.056 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Connection 572680346 is GOOD!
  19:56:29.056 [http-nio-8080-exec-4] DEBUG o.a.i.d.pooled.PooledDataSource - Returned connection 572680346 to pool.
  19:56:29.058 [http-nio-8080-exec-4] DEBUG o.a.g.r.auth.AuthenticationService - Login was successful for user "service".
  19:56:29.092 [http-nio-8080-exec-2] INFO  o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/etc/guacamole".
  19:56:29.096 [http-nio-8080-exec-2] DEBUG o.a.g.net.InetGuacamoleSocket - Connecting to guacd at localhost:4822.
  19:56:29.155 [http-nio-8080-exec-2] INFO  o.a.g.tunnel.TunnelRequestService - User "service" connected to connection "DEFAULT".
  Exception in thread "Thread-5" java.lang.IllegalStateException: Message will not be sent because the WebSocket session has been closed
      at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:384)
      at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.startMessage(WsRemoteEndpointImplBase.java:340)
      at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$TextMessageSendHandler.write(WsRemoteEndpointImplBase.java:755)
      at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendPartialString(WsRemoteEndpointImplBase.java:252)
      at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:195)
      at org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37)
      at org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.sendInstruction(GuacamoleWebSocketTunnelEndpoint.java:152)
      at org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.access$200(GuacamoleWebSocketTunnelEndpoint.java:53)19:56:29.202 [http-nio-8080-exec-5] INFO  o.a.g.tunnel.TunnelRequestService - User "service" disconnected from connection "DEFAULT". Duration: 45 milliseconds
  
      at org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint$2.run(GuacamoleWebSocketTunnelEndpoint.java:253)
  
  19:56:29.202 [http-nio-8080-exec-5] DEBUG o.a.g.net.InetGuacamoleSocket - Closing socket to guacd.
  </code></pre>
  
  <p>I read here: <a href="https://sourceforge.net/p/guacamole/discussion/1110834/thread/1b380caa/?limit=25" rel="nofollow noreferrer">https://sourceforge.net/p/guacamole/discussion/1110834/thread/1b380caa/?limit=25</a>  that I need to create softlinks such as:</p>
  
  <pre><code>Create symbolic links within [path to libfreerdp*.so]/freerdp/ to /usr/local/lib/freerdp/guac*.so
  </code></pre>
  
  <p>But I don't think that is a problem.  Here are my libfreerdp directories with existing links.</p>
  
  <p><strong>ls -l /usr/lib/x86_64-linux-gnu/freerdp</strong></p>
  
  <pre><code>-rw-r--r-- 1 root root 14720 Dec 11 11:53 audin-client-alsa.so
  -rw-r--r-- 1 root root 14784 Dec 11 11:53 audin-client-pulse.so
  -rw-r--r-- 1 root root 14848 Dec 11 11:53 audin-client.so
  -rw-r--r-- 1 root root 35240 Dec 11 11:53 drive-client.so
  -rw-r--r-- 1 root root 10256 Dec 11 11:53 echo-client.so
  lrwxrwxrwx 1 root root    39 Feb 18 19:45 guacai-client.la -&gt; /usr/local/lib/freerdp/guacai-client.la
  lrwxrwxrwx 1 root root    39 Feb 18 19:45 guacai-client.so -&gt; /usr/local/lib/freerdp/guacai-client.so
  lrwxrwxrwx 1 root root    39 Feb 18 19:45 guacdr-client.la -&gt; /usr/local/lib/freerdp/guacdr-client.la
  lrwxrwxrwx 1 root root    39 Feb 18 19:45 guacdr-client.so -&gt; /usr/local/lib/freerdp/guacdr-client.so
  lrwxrwxrwx 1 root root    40 Feb 18 19:45 guacsnd-client.la -&gt; /usr/local/lib/freerdp/guacsnd-client.la
  lrwxrwxrwx 1 root root    40 Feb 18 19:45 guacsnd-client.so -&gt; /usr/local/lib/freerdp/guacsnd-client.so
  lrwxrwxrwx 1 root root    40 Feb 18 19:45 guacsvc-client.la -&gt; /usr/local/lib/freerdp/guacsvc-client.la
  lrwxrwxrwx 1 root root    40 Feb 18 19:45 guacsvc-client.so -&gt; /usr/local/lib/freerdp/guacsvc-client.so
  -rw-r--r-- 1 root root 14552 Dec 11 11:53 parallel-client.so
  -rw-r--r-- 1 root root 14616 Dec 11 11:53 printer-client.so
  -rw-r--r-- 1 root root 18648 Dec 11 11:53 rdpei-client.so
  -rw-r--r-- 1 root root 18976 Dec 11 11:53 rdpsnd-client-alsa.so
  -rw-r--r-- 1 root root 18944 Dec 11 11:53 rdpsnd-client-pulse.so
  -rw-r--r-- 1 root root 27032 Dec 11 11:53 serial-client.so
  -rw-r--r-- 1 root root 31104 Dec 11 11:53 smartcard-client.so
  -rw-r--r-- 1 root root 10472 Dec 11 11:53 tsmf-client-alsa-audio.so
  -rw-r--r-- 1 root root 14624 Dec 11 11:53 tsmf-client-pulse-audio.so
  -rw-r--r-- 1 root root 39664 Dec 11 11:53 tsmf-client.so
  </code></pre>
  
  <p><strong>ls -l /usr/local/lib/freerdp/</strong></p>
  
  <pre><code>-rwxr-xr-x 1 root root   1205 Feb 18 11:25 guacai-client.la
  -rwxr-xr-x 1 root root 361072 Feb 18 19:44 guacai-client.so
  -rwxr-xr-x 1 root root   1205 Feb 18 11:25 guacdr-client.la
  -rwxr-xr-x 1 root root 618032 Feb 18 19:44 guacdr-client.so
  -rwxr-xr-x 1 root root   1211 Feb 18 11:25 guacsnd-client.la
  -rwxr-xr-x 1 root root 274408 Feb 18 19:44 guacsnd-client.so
  -rwxr-xr-x 1 root root   1211 Feb 18 11:25 guacsvc-client.la
  -rwxr-xr-x 1 root root 273824 Feb 18 19:44 guacsvc-client.so
  </code></pre>
  
  <p>How can I solve this problem?</p>