You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by "Fischer, Manuel" <ma...@iosb.fraunhofer.de> on 2023/03/01 16:56:25 UTC
Guacamole 1.5.0 not working in docker
Hi all,
we are trying to get latest docker image running with docker, but we cant login. We can access the webserver of guacamole, but we can only see the following message:
! Error
An error has occurred and this action cannot be completed. If the problem persists, please notify your system administrator or check your system logs.
Our Host is Ubuntu 22.04 in a VMware based VM on vSphere with latest docker. Portainer and other containers are running fine. You will find the steps we followed according to the official guacamole and docker documentations and the logfile from the the guacamole container.
All containers (postgres, guacd, guacamole) are running in green state. We can also access the guacamole_db with pgAdmin and see the newly created schemes, types and created user.
Can you please assist us solving this problem?
Kind regards
Manuel
Installation steps:
A
docker pull postgres
docker run --name Guacamole_postgres -e POSTGRES_PASSWORD=pgpass -d postgres
B
docker pull dpage/pgadmin4:snapshot
docker run --name pgAdmin -p 8090:80 -e 'PGADMIN_DEFAULT_EMAIL=admin@ema.il' -e 'PGADMIN_DEFAULT_PASSWORD=pgadminpass' -d dpage/pgadmin4:snapshot
C
https://hub.docker.com/r/guacamole/guacd
docker run --name Guacamole_guacd -d guacamole/guacd
D
Configure in pgAdmin:
1. create guacamole_db
2. create user:
CREATE USER guacamole_user WITH PASSWORD 'gcuserpass';
GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO guacamole_user;
GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public TO guacamole_user;
3. DB-Schema und User anlegen:
https://github.com/apache/guacamole-client/tree/0.9.10-incubating/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema
E
docker run --name Guacamole_app --link Guacamole_guacd:guacd --link Guacamole_postgres:postgres -e POSTGRES_DATABASE=guacamole_db -e POSTGRES_USER=guacamole_user -e POSTGRES_PASSWORD=gcuserpass -d -p 8100:8080 guacamole/guacamole
Logfile from guacamole container
16:12:38.507 [localhost-startStop-1] INFO o.a.g.rest.auth.HashTokenSessionMap - Sessions will expire after 60 minutes of inactivity.
16:12:39.386 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - Extension "PostgreSQL Authentication" (postgresql) loaded.
16:12:39.466 [localhost-startStop-1] INFO o.a.g.t.w.WebSocketTunnelModule - Loading JSR-356 WebSocket support...
01-Mar-2023 16:12:40.158 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/guacamole/tomcat/webapps/guacamole.war] has finished in [3,081] ms
01-Mar-2023 16:12:40.160 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
01-Mar-2023 16:12:40.170 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3129 ms
16:12:45.582 [http-nio-8080-exec-6] WARN o.a.g.e.AuthenticationProviderFacade - The "postgresql" authentication provider has encountered an internal error which will halt the authentication process. If this is unexpected or you are the developer of this authentication provider, you may wish to enable debug-level logging. If this is expected and you wish to ignore such failures in the future, please set "skip-if-unavailable: postgresql" within your guacamole.properties.
16:12:45.585 [http-nio-8080-exec-6] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error:
### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation "guacamole_entity" does not exist
Position: 571
### The error may exist in org/apache/guacamole/auth/jdbc/user/UserMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: 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'::guacamole_entity_type 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'::guacamole_entity_type
### Cause: org.postgresql.util.PSQLException: ERROR: relation "guacamole_entity" does not exist
Position: 571
Re: Guacamole 1.5.0 not working in docker
Posted by Nick Couchman <vn...@apache.org>.
On Fri, Mar 3, 2023 at 3:37 AM Fischer, Manuel
<ma...@iosb.fraunhofer.de> wrote:
>
> Thanks for reply.
>
> > This is already covered in the manual - the section you mentioned in the JDBC chapter of the manual contains instructions for each of the databases (MySQL, Postgres, and SQL Server) for creating a user and granting that user access to the database.
>
> In my opinion, the documentation is a bit unclear in this point. For people which don’t have to do with DBs often, the documentation should be clarified that some queries should be done on the postgres system db and some on the newly created guacamole_db. Now, that I know that it should be done this way, it totally makes sense, but like I said, this is not easy to identify for some people.
To me the examples in the documentation are clear - the database
creation process uses the "createdb" command, which abstracts much of
the SQL syntax for creation away, giving it a OS-type command, and
then the example for granting access and importing files specifies the
guacamole database on the command line.
That said, the documentation is certainly not perfect, and we always
welcome contributions to it to help clarify and make things easier for
people to understand. If there are changes you think could be made to
help improve it - even just adding simple language like "connect to
the Guacamole database", etc., please feel free to open a Jira issue
and pull request for those items and we'll work through them together.
Your feedback and participation in making it better would be great,
and would be a help to the community.
>
> >There is nothing wrong with the code in the git repository - you are using a link to a specific tag for the 0.9.10-incubating version of Guacamole, which is, indeed, very old. You should either use the SQL Scripts included in the JDBC download for the version of Guacamole you're running, or use the SQL file produced by running the initdb script. Please note, running the initdb script does not actually initialize the database, it just produces a .sql file that you can then use as the input for either mysql or psql commands to initialize the database yourself.
>
> Yes, I found the link on the official guacamole docker pager under postgres and mysql. One of the maintainers should update both links please. Maybe to a point, where you can always find the latest version, not a specific one. See: https://hub.docker.com/u/guacamole
Ah, okay, I see what you're saying - the "How to Use This Image"
section documents much of that with very outdated links. We'll see
what needs to be done to update that. I would suggest that you use the
official documentation - the user guide - but we should certainly
either update the Docker pages or clean them up and point people back
to the manual
-Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
Re: Guacamole 1.5.0 not working in docker
Posted by Dedy Martadinata Supriyadi <ma...@gmail.com>.
when the process of creating the database and granting user access is
pretty much detailed in the guide, I assume this is more like non-docker
guide.
```
docker run --name Guacamole_postgres -e POSTGRES_USER=guacamole_user -e
POSTGRES_DB=guacamole_db -e POSTGRES_PASSWORD=pgpass -d postgres
```
With that command the database will be defined and granted access to the
defined user, then the rest is just generating schema and importing the
schema.
```
psql -U postgres-user postgres-db-name < /postgres-schema.sql
```
Pada tanggal Jum, 3 Mar 2023 pukul 15.37 Fischer, Manuel <
manuel.fischer@iosb.fraunhofer.de> menulis:
> Thanks for reply.
>
> > This is already covered in the manual - the section you mentioned in the
> JDBC chapter of the manual contains instructions for each of the databases
> (MySQL, Postgres, and SQL Server) for creating a user and granting that
> user access to the database.
>
> In my opinion, the documentation is a bit unclear in this point. For
> people which don’t have to do with DBs often, the documentation should be
> clarified that some queries should be done on the postgres system db and
> some on the newly created guacamole_db. Now, that I know that it should be
> done this way, it totally makes sense, but like I said, this is not easy to
> identify for some people.
>
> >There is nothing wrong with the code in the git repository - you are
> using a link to a specific tag for the 0.9.10-incubating version of
> Guacamole, which is, indeed, very old. You should either use the SQL
> Scripts included in the JDBC download for the version of Guacamole you're
> running, or use the SQL file produced by running the initdb script. Please
> note, running the initdb script does not actually initialize the database,
> it just produces a .sql file that you can then use as the input for either
> mysql or psql commands to initialize the database yourself.
>
> Yes, I found the link on the official guacamole docker pager under
> postgres and mysql. One of the maintainers should update both links please.
> Maybe to a point, where you can always find the latest version, not a
> specific one. See: https://hub.docker.com/u/guacamole
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Nick Couchman <vn...@apache.org>
> Gesendet: Donnerstag, 2. März 2023 14:26
> An: user@guacamole.apache.org
> Betreff: Re: Guacamole 1.5.0 not working in docker
>
> On Thu, Mar 2, 2023 at 7:01 AM Fischer, Manuel <
> manuel.fischer@iosb.fraunhofer.de> wrote:
> >
> > Its working now. I found the reason. In postgres, you have to do the
> >
> > CREATE USER guacamole_user WITH PASSWORD 'some_password';
> >
> > on the postgres DB (all users and permissions are located in this DB)
> > and
> >
> > GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO
> > guacamole_user; GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public
> > TO guacamole_user;
> >
> > on the guacamole_db DB.
> >
> >
> > This is not properly described in the guacamole documentation:
> > http://guacamole.incubator.apache.org/doc/gug/jdbc-auth.html#jdbc-auth
> > -mysql
>
> Yes, it is - from the page you mentioned (though you're using an old
> link), if you click on the PostgreSQL tab, you'll see the following:
>
> psql -d guacamole_db
> psql (9.3.6)
> Type "help" for help.
>
> guacamole=# CREATE USER guacamole_user WITH PASSWORD 'some_password';
> CREATE ROLE guacamole=# GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN
> SCHEMA public TO guacamole_user; GRANT guacamole=# GRANT SELECT,USAGE ON
> ALL SEQUENCES IN SCHEMA public TO guacamole_user; GRANT guacamole=# \q
>
> >
> >
> > Are here some guacamole devs who can:
> >
> > 1. update the sql scripts on the github link (see belowe)?
>
> There is nothing wrong with the code in the git repository - you are using
> a link to a specific tag for the 0.9.10-incubating version of Guacamole,
> which is, indeed, very old. You should either use the SQL Scripts included
> in the JDBC download for the version of Guacamole you're running, or use
> the SQL file produced by running the initdb script. Please note, running
> the initdb script does not actually initialize the database, it just
> produces a .sql file that you can then use as the input for either mysql or
> psql commands to initialize the database yourself.
>
> >
> > 2. update the "Granting Gutacamole access to the database" part so that
> you have to create the user on the postgres db and the access rights on the
> guacamole_db?
> >
>
> This is already covered in the manual - the section you mentioned in the
> JDBC chapter of the manual contains instructions for each of the databases
> (MySQL, Postgres, and SQL Server) for creating a user and granting that
> user access to the database.
>
> -Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
> For additional commands, e-mail: user-help@guacamole.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
> For additional commands, e-mail: user-help@guacamole.apache.org
>
--
Dedy Martadinata
AW: Guacamole 1.5.0 not working in docker
Posted by "Fischer, Manuel" <ma...@iosb.fraunhofer.de>.
Thanks for reply.
> This is already covered in the manual - the section you mentioned in the JDBC chapter of the manual contains instructions for each of the databases (MySQL, Postgres, and SQL Server) for creating a user and granting that user access to the database.
In my opinion, the documentation is a bit unclear in this point. For people which don’t have to do with DBs often, the documentation should be clarified that some queries should be done on the postgres system db and some on the newly created guacamole_db. Now, that I know that it should be done this way, it totally makes sense, but like I said, this is not easy to identify for some people.
>There is nothing wrong with the code in the git repository - you are using a link to a specific tag for the 0.9.10-incubating version of Guacamole, which is, indeed, very old. You should either use the SQL Scripts included in the JDBC download for the version of Guacamole you're running, or use the SQL file produced by running the initdb script. Please note, running the initdb script does not actually initialize the database, it just produces a .sql file that you can then use as the input for either mysql or psql commands to initialize the database yourself.
Yes, I found the link on the official guacamole docker pager under postgres and mysql. One of the maintainers should update both links please. Maybe to a point, where you can always find the latest version, not a specific one. See: https://hub.docker.com/u/guacamole
-----Ursprüngliche Nachricht-----
Von: Nick Couchman <vn...@apache.org>
Gesendet: Donnerstag, 2. März 2023 14:26
An: user@guacamole.apache.org
Betreff: Re: Guacamole 1.5.0 not working in docker
On Thu, Mar 2, 2023 at 7:01 AM Fischer, Manuel <ma...@iosb.fraunhofer.de> wrote:
>
> Its working now. I found the reason. In postgres, you have to do the
>
> CREATE USER guacamole_user WITH PASSWORD 'some_password';
>
> on the postgres DB (all users and permissions are located in this DB)
> and
>
> GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO
> guacamole_user; GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public
> TO guacamole_user;
>
> on the guacamole_db DB.
>
>
> This is not properly described in the guacamole documentation:
> http://guacamole.incubator.apache.org/doc/gug/jdbc-auth.html#jdbc-auth
> -mysql
Yes, it is - from the page you mentioned (though you're using an old link), if you click on the PostgreSQL tab, you'll see the following:
psql -d guacamole_db
psql (9.3.6)
Type "help" for help.
guacamole=# CREATE USER guacamole_user WITH PASSWORD 'some_password'; CREATE ROLE guacamole=# GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO guacamole_user; GRANT guacamole=# GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public TO guacamole_user; GRANT guacamole=# \q
>
>
> Are here some guacamole devs who can:
>
> 1. update the sql scripts on the github link (see belowe)?
There is nothing wrong with the code in the git repository - you are using a link to a specific tag for the 0.9.10-incubating version of Guacamole, which is, indeed, very old. You should either use the SQL Scripts included in the JDBC download for the version of Guacamole you're running, or use the SQL file produced by running the initdb script. Please note, running the initdb script does not actually initialize the database, it just produces a .sql file that you can then use as the input for either mysql or psql commands to initialize the database yourself.
>
> 2. update the "Granting Gutacamole access to the database" part so that you have to create the user on the postgres db and the access rights on the guacamole_db?
>
This is already covered in the manual - the section you mentioned in the JDBC chapter of the manual contains instructions for each of the databases (MySQL, Postgres, and SQL Server) for creating a user and granting that user access to the database.
-Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
Re: Guacamole 1.5.0 not working in docker
Posted by Nick Couchman <vn...@apache.org>.
On Thu, Mar 2, 2023 at 7:01 AM Fischer, Manuel
<ma...@iosb.fraunhofer.de> wrote:
>
> Its working now. I found the reason. In postgres, you have to do the
>
> CREATE USER guacamole_user WITH PASSWORD 'some_password';
>
> on the postgres DB (all users and permissions are located in this DB) and
>
> GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO guacamole_user;
> GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public TO guacamole_user;
>
> on the guacamole_db DB.
>
>
> This is not properly described in the guacamole documentation:
> http://guacamole.incubator.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-mysql
Yes, it is - from the page you mentioned (though you're using an old
link), if you click on the PostgreSQL tab, you'll see the following:
psql -d guacamole_db
psql (9.3.6)
Type "help" for help.
guacamole=# CREATE USER guacamole_user WITH PASSWORD 'some_password';
CREATE ROLE
guacamole=# GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA
public TO guacamole_user;
GRANT
guacamole=# GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public TO
guacamole_user;
GRANT
guacamole=# \q
>
>
> Are here some guacamole devs who can:
>
> 1. update the sql scripts on the github link (see belowe)?
There is nothing wrong with the code in the git repository - you are
using a link to a specific tag for the 0.9.10-incubating version of
Guacamole, which is, indeed, very old. You should either use the SQL
Scripts included in the JDBC download for the version of Guacamole
you're running, or use the SQL file produced by running the initdb
script. Please note, running the initdb script does not actually
initialize the database, it just produces a .sql file that you can
then use as the input for either mysql or psql commands to initialize
the database yourself.
>
> 2. update the "Granting Gutacamole access to the database" part so that you have to create the user on the postgres db and the access rights on the guacamole_db?
>
This is already covered in the manual - the section you mentioned in
the JDBC chapter of the manual contains instructions for each of the
databases (MySQL, Postgres, and SQL Server) for creating a user and
granting that user access to the database.
-Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
AW: Guacamole 1.5.0 not working in docker
Posted by "Fischer, Manuel" <ma...@iosb.fraunhofer.de>.
Its working now. I found the reason. In postgres, you have to do the
CREATE USER guacamole_user WITH PASSWORD 'some_password';
on the postgres DB (all users and permissions are located in this DB) and
GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO guacamole_user;
GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public TO guacamole_user;
on the guacamole_db DB.
This is not properly described in the guacamole documentation:
http://guacamole.incubator.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-mysql
Are here some guacamole devs who can:
1. update the sql scripts on the github link (see belowe)?
2. update the "Granting Gutacamole access to the database" part so that you have to create the user on the postgres db and the access rights on the guacamole_db?
-----Ursprüngliche Nachricht-----
Von: Fischer, Manuel <ma...@iosb.fraunhofer.de>
Gesendet: Donnerstag, 2. März 2023 11:03
An: user@guacamole.apache.org
Betreff: AW: Guacamole 1.5.0 not working in docker
> On Wed, Mar 1, 2023 at 12:11 PM Rolf Zurbrügg <ro...@redguard.ch> wrote:
>>
>> Hi Manuel,
>>
>> It seems, like your are not running the init script for the DB. Have you tried running this:
>>
>> ```
>> docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh
>> --mysql > guac_db.sql ``` From the error it seems as if your DB is
>> not initialised.
>>
>
>Just make sure to use the --postgres option, instead.
>
>-Nick
Hi Rolf and Nick ,
1. My colleague tried to set it up with the initdb.sh script for mysql using the mysql option. But the only thing what happened was, that it created a initdb.sql file in the /home/ directory of the guacamole container. He was not able to init the mysqldb with this script. We verified this with mysql workbench. He then tried to initialize the mysql db manually.
2. I also tried to set it up with postgres. I never used the initdb.sh command. I always used the scripts available on the following link and initialized the db manually, like its described in the documentation on docker hub ("Alternatively, you can use the SQL scripts included with guacamole-auth-jdbc."):
https://github.com/apache/guacamole-client/tree/0.9.10-incubating/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema
I verified the initialization with pgAdmin. We can see all schemes and types and also the guacadmin user.
3. Further informations and questions:
a) We checked /home/guacamole/.guacamole/guacamole.propertiers . All necessary informations for the database are included:
guacd-hostname: 172.17.0.5
guacd-port: 4822
postgresql-username: guacamole_user
postgresql-password: ourpassword
postgresql-database: guacamole_db
postgresql-hostname: 172.17.0.3
postgresql-port: 5432
We can connect to the postgres db using the above credentials with pgAdmin or over cli.
b) We installed ip utilities inside the guacamole container and we can ping the postgres/mysql and guacd from inside. IP-connectivity seems not to be the problem.
c) We also noticed, that the script on github (see link above) are for version 0.9.10. Is this correct? Because we also noticed, that these are 7 years old.
We compared the scripts from the link above with the scrits from inside the guacamole container ( /opt/guacamole/postgresql/schema -> 001-create-schema.sql 002-create-admin-user.sql ).
We found out, that these files do have much more sql code inside, so those on git are outdated.
Because of this, we deleted all containers and started again with the newer SQL files. But its still not working. Attached you will find the current Log. Its still the authentication provider error.
Manuel
02-Mar-2023 09:46:43.069 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/guacamole/tomcat
02-Mar-2023 09:46:43.069 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
02-Mar-2023 09:46:43.069 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/guacamole/tomcat/temp
02-Mar-2023 09:46:43.070 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.36] using APR version [1.7.0].
02-Mar-2023 09:46:43.070 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [{4}].
02-Mar-2023 09:46:43.070 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
02-Mar-2023 09:46:43.083 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.2 15 Mar 2022]
02-Mar-2023 09:46:43.200 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
02-Mar-2023 09:46:43.217 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 514 ms
02-Mar-2023 09:46:43.239 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
02-Mar-2023 09:46:43.239 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.86]
02-Mar-2023 09:46:43.258 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/home/guacamole/tomcat/webapps/guacamole.war]
02-Mar-2023 09:46:44.344 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
09:46:44.680 [localhost-startStop-1] INFO o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/home/guacamole/.guacamole".
09:46:44.749 [localhost-startStop-1] INFO o.a.g.GuacamoleServletContextListener - Read configuration parameters from "/home/guacamole/.guacamole/guacamole.properties".
09:46:44.750 [localhost-startStop-1] INFO o.a.g.rest.auth.HashTokenSessionMap - Sessions will expire after 60 minutes of inactivity.
09:46:45.635 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - Extension "PostgreSQL Authentication" (postgresql) loaded.
09:46:45.757 [localhost-startStop-1] INFO o.a.g.t.w.WebSocketTunnelModule - Loading JSR-356 WebSocket support...
02-Mar-2023 09:46:46.545 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/guacamole/tomcat/webapps/guacamole.war] has finished in [3,287] ms
02-Mar-2023 09:46:46.555 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
02-Mar-2023 09:46:46.565 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3347 ms
09:47:25.774 [http-nio-8080-exec-2] WARN o.a.g.e.AuthenticationProviderFacade - The "postgresql" authentication provider has encountered an internal error which will halt the authentication process. If this is unexpected or you are the developer of this authentication provider, you may wish to enable debug-level logging. If this is expected and you wish to ignore such failures in the future, please set "skip-if-unavailable: postgresql" within your guacamole.properties.
09:47:25.776 [http-nio-8080-exec-2] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error:
### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table guacamole_user
### The error may exist in org/apache/guacamole/auth/jdbc/user/UserMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: 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'::guacamole_entity_type 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'::guacamole_entity_type
### Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table guacamole_user
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
AW: Guacamole 1.5.0 not working in docker
Posted by "Fischer, Manuel" <ma...@iosb.fraunhofer.de>.
> On Wed, Mar 1, 2023 at 12:11 PM Rolf Zurbrügg <ro...@redguard.ch> wrote:
>>
>> Hi Manuel,
>>
>> It seems, like your are not running the init script for the DB. Have you tried running this:
>>
>> ```
>> docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh
>> --mysql > guac_db.sql ``` From the error it seems as if your DB is not
>> initialised.
>>
>
>Just make sure to use the --postgres option, instead.
>
>-Nick
Hi Rolf and Nick ,
1. My colleague tried to set it up with the initdb.sh script for mysql using the mysql option. But the only thing what happened was, that it created a initdb.sql file in the /home/ directory of the guacamole container. He was not able to init the mysqldb with this script. We verified this with mysql workbench. He then tried to initialize the mysql db manually.
2. I also tried to set it up with postgres. I never used the initdb.sh command. I always used the scripts available on the following link and initialized the db manually, like its described in the documentation on docker hub ("Alternatively, you can use the SQL scripts included with guacamole-auth-jdbc."):
https://github.com/apache/guacamole-client/tree/0.9.10-incubating/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema
I verified the initialization with pgAdmin. We can see all schemes and types and also the guacadmin user.
3. Further informations and questions:
a) We checked /home/guacamole/.guacamole/guacamole.propertiers . All necessary informations for the database are included:
guacd-hostname: 172.17.0.5
guacd-port: 4822
postgresql-username: guacamole_user
postgresql-password: ourpassword
postgresql-database: guacamole_db
postgresql-hostname: 172.17.0.3
postgresql-port: 5432
We can connect to the postgres db using the above credentials with pgAdmin or over cli.
b) We installed ip utilities inside the guacamole container and we can ping the postgres/mysql and guacd from inside. IP-connectivity seems not to be the problem.
c) We also noticed, that the script on github (see link above) are for version 0.9.10. Is this correct? Because we also noticed, that these are 7 years old.
We compared the scripts from the link above with the scrits from inside the guacamole container ( /opt/guacamole/postgresql/schema -> 001-create-schema.sql 002-create-admin-user.sql ).
We found out, that these files do have much more sql code inside, so those on git are outdated.
Because of this, we deleted all containers and started again with the newer SQL files. But its still not working. Attached you will find the current Log. Its still the authentication provider error.
Manuel
02-Mar-2023 09:46:43.069 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/guacamole/tomcat
02-Mar-2023 09:46:43.069 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
02-Mar-2023 09:46:43.069 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/guacamole/tomcat/temp
02-Mar-2023 09:46:43.070 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.36] using APR version [1.7.0].
02-Mar-2023 09:46:43.070 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [{4}].
02-Mar-2023 09:46:43.070 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
02-Mar-2023 09:46:43.083 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.2 15 Mar 2022]
02-Mar-2023 09:46:43.200 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
02-Mar-2023 09:46:43.217 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 514 ms
02-Mar-2023 09:46:43.239 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
02-Mar-2023 09:46:43.239 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.86]
02-Mar-2023 09:46:43.258 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/home/guacamole/tomcat/webapps/guacamole.war]
02-Mar-2023 09:46:44.344 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
09:46:44.680 [localhost-startStop-1] INFO o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/home/guacamole/.guacamole".
09:46:44.749 [localhost-startStop-1] INFO o.a.g.GuacamoleServletContextListener - Read configuration parameters from "/home/guacamole/.guacamole/guacamole.properties".
09:46:44.750 [localhost-startStop-1] INFO o.a.g.rest.auth.HashTokenSessionMap - Sessions will expire after 60 minutes of inactivity.
09:46:45.635 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - Extension "PostgreSQL Authentication" (postgresql) loaded.
09:46:45.757 [localhost-startStop-1] INFO o.a.g.t.w.WebSocketTunnelModule - Loading JSR-356 WebSocket support...
02-Mar-2023 09:46:46.545 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/guacamole/tomcat/webapps/guacamole.war] has finished in [3,287] ms
02-Mar-2023 09:46:46.555 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
02-Mar-2023 09:46:46.565 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3347 ms
09:47:25.774 [http-nio-8080-exec-2] WARN o.a.g.e.AuthenticationProviderFacade - The "postgresql" authentication provider has encountered an internal error which will halt the authentication process. If this is unexpected or you are the developer of this authentication provider, you may wish to enable debug-level logging. If this is expected and you wish to ignore such failures in the future, please set "skip-if-unavailable: postgresql" within your guacamole.properties.
09:47:25.776 [http-nio-8080-exec-2] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error:
### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table guacamole_user
### The error may exist in org/apache/guacamole/auth/jdbc/user/UserMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: 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'::guacamole_entity_type 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'::guacamole_entity_type
### Cause: org.postgresql.util.PSQLException: ERROR: permission denied for table guacamole_user
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
Re: Guacamole 1.5.0 not working in docker
Posted by Nick Couchman <vn...@apache.org>.
On Wed, Mar 1, 2023 at 12:11 PM Rolf Zurbrügg
<ro...@redguard.ch> wrote:
>
> Hi Manuel,
>
> It seems, like your are not running the init script for the DB. Have you tried running this:
>
> ```
> docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > guac_db.sql
> ```
> From the error it seems as if your DB is not initialised.
>
Just make sure to use the --postgres option, instead.
-Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org
Re: Guacamole 1.5.0 not working in docker
Posted by Rolf Zurbrügg <ro...@redguard.ch>.
Hi Manuel,
It seems, like your are not running the init script for the DB. Have you tried running this:
```
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql > guac_db.sql
```
From the error it seems as if your DB is not initialised.
I missed it the first couple of times as well. But this would be the point in the documentation: https://guacamole.apache.org/doc/gug/guacamole-docker.html#initializing-the-mysql-database
Kind regards
Rolf
> On 1 Mar 2023, at 17:56, Fischer, Manuel <ma...@iosb.fraunhofer.de> wrote:
>
> Hi all,
>
> we are trying to get latest docker image running with docker, but we cant login. We can access the webserver of guacamole, but we can only see the following message:
>
> ! Error
> An error has occurred and this action cannot be completed. If the problem persists, please notify your system administrator or check your system logs.
>
> Our Host is Ubuntu 22.04 in a VMware based VM on vSphere with latest docker. Portainer and other containers are running fine. You will find the steps we followed according to the official guacamole and docker documentations and the logfile from the the guacamole container.
>
> All containers (postgres, guacd, guacamole) are running in green state. We can also access the guacamole_db with pgAdmin and see the newly created schemes, types and created user.
>
> Can you please assist us solving this problem?
>
> Kind regards
> Manuel
>
>
>
> Installation steps:
> A
> docker pull postgres
> docker run --name Guacamole_postgres -e POSTGRES_PASSWORD=pgpass -d postgres
>
> B
> docker pull dpage/pgadmin4:snapshot
> docker run --name pgAdmin -p 8090:80 -e 'PGADMIN_DEFAULT_EMAIL=admin@ema.il <ma...@ema.il>' -e 'PGADMIN_DEFAULT_PASSWORD=pgadminpass' -d dpage/pgadmin4:snapshot
>
> C
> https://hub.docker.com/r/guacamole/guacd
> docker run --name Guacamole_guacd -d guacamole/guacd
>
> D
> Configure in pgAdmin:
> 1. create guacamole_db
> 2. create user:
> CREATE USER guacamole_user WITH PASSWORD 'gcuserpass';
> GRANT SELECT,INSERT,UPDATE,DELETE ON ALL TABLES IN SCHEMA public TO guacamole_user;
> GRANT SELECT,USAGE ON ALL SEQUENCES IN SCHEMA public TO guacamole_user;
> 3. DB-Schema und User anlegen:
> https://github.com/apache/guacamole-client/tree/0.9.10-incubating/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-postgresql/schema
>
> E
> docker run --name Guacamole_app --link Guacamole_guacd:guacd --link Guacamole_postgres:postgres -e POSTGRES_DATABASE=guacamole_db -e POSTGRES_USER=guacamole_user -e POSTGRES_PASSWORD=gcuserpass -d -p 8100:8080 guacamole/guacamole
>
>
> Logfile from guacamole container
>
> 16:12:38.507 [localhost-startStop-1] INFO o.a.g.rest.auth.HashTokenSessionMap - Sessions will expire after 60 minutes of inactivity.
> 16:12:39.386 [localhost-startStop-1] INFO o.a.g.extension.ExtensionModule - Extension "PostgreSQL Authentication" (postgresql) loaded.
> 16:12:39.466 [localhost-startStop-1] INFO o.a.g.t.w.WebSocketTunnelModule - Loading JSR-356 WebSocket support...
> 01-Mar-2023 16:12:40.158 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/guacamole/tomcat/webapps/guacamole.war] has finished in [3,081] ms
> 01-Mar-2023 16:12:40.160 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
> 01-Mar-2023 16:12:40.170 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 3129 ms
> 16:12:45.582 [http-nio-8080-exec-6] WARN o.a.g.e.AuthenticationProviderFacade - The "postgresql" authentication provider has encountered an internal error which will halt the authentication process. If this is unexpected or you are the developer of this authentication provider, you may wish to enable debug-level logging. If this is expected and you wish to ignore such failures in the future, please set "skip-if-unavailable: postgresql" within your guacamole.properties.
> 16:12:45.585 [http-nio-8080-exec-6] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error:
> ### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation "guacamole_entity" does not exist
> Position: 571
> ### The error may exist in org/apache/guacamole/auth/jdbc/user/UserMapper.xml
> ### The error may involve defaultParameterMap
> ### The error occurred while setting parameters
> ### SQL: 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'::guacamole_entity_type 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'::guacamole_entity_type
> ### Cause: org.postgresql.util.PSQLException: ERROR: relation "guacamole_entity" does not exist
> Position: 571