flcontainers / guacamole

A Docker Container for Apache Guacamole, a client-less remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH over HTML5. For x64, arm64 and ppc64le.
https://hub.docker.com/r/flcontainers/guacamole
GNU General Public License v3.0
322 stars 60 forks source link

Postgres authentication failed because guacomole_user don't exist, even tho name changed #97

Closed FuckingToasters closed 11 months ago

FuckingToasters commented 11 months ago

compose.yml:

version: '3'
services:
  guacamole:
    container_name: guacamole
    hostname: guacamole
    depends_on:
      - guacd
      - postgres
    environment:
      GUACD_HOSTNAME: guacd
      POSTGRES_DATABASE: guacamole_db
      POSTGRES_HOSTNAME: postgres
      POSTGRES_PASSWORD: 9QHbhgPWJJcOjCUERRki7A0UpPBTJgprGLkDSeIZsR2E4zr8CB
      POSTGRES_USER: InfinityMonster
    image: guacamole/guacamole
    restart: always
    volumes:
      - data:/config
    networks:
      - webproxy
  guacd:
    image: guacamole/guacd
    container_name: guacd
    hostname: guacd
    restart: always
    networks:
      - webproxy
  postgres:
    image: postgres
    container_name: postgres
    hostname: postgres
    environment:
      POSTGRES_PASSWORD: 9QHbhgPWJJcOjCUERRki7A0UpPBTJgprGLkDSeIZsR2E4zr8CB
      POSTGRES_USER: InfinityMonster
      POSTGRES_DATABASE: guacamole_db
    restart: always
    networks:
      - webproxy
networks:
  webproxy:
    external: true
  default:

volumes:
  data:

logs:

WARNING: POSTGRES_HOSTNAME detected, please use POSTGRESQL_HOSTNAME for further deployments.
WARNING: POSTGRES_DATABASE detected, please use POSTGRESQL_DATABASE for further deployments.
WARNING: POSTGRES_USER detected, please use POSTGRESQL_USER for further deployments.
WARNING: POSTGRES_PASSWORD detected, please use POSTGRESQL_PASSWORD for further deployments.
26-Sep-2023 21:29:31.023 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.93
26-Sep-2023 21:29:31.027 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Aug 23 2023 22:43:14 UTC
26-Sep-2023 21:29:31.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.93.0
26-Sep-2023 21:29:31.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
26-Sep-2023 21:29:31.028 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            5.4.114-1-pve
26-Sep-2023 21:29:31.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
26-Sep-2023 21:29:31.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /opt/java/openjdk/jre
26-Sep-2023 21:29:31.029 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_382-b05
26-Sep-2023 21:29:31.030 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Temurin
26-Sep-2023 21:29:31.030 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /home/guacamole/tomcat
26-Sep-2023 21:29:31.030 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
26-Sep-2023 21:29:31.031 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/guacamole/tomcat/conf/logging.properties
26-Sep-2023 21:29:31.031 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
26-Sep-2023 21:29:31.032 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
26-Sep-2023 21:29:31.032 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
26-Sep-2023 21:29:31.032 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
26-Sep-2023 21:29:31.032 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
26-Sep-2023 21:29:31.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/guacamole/tomcat
26-Sep-2023 21:29:31.033 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
26-Sep-2023 21:29:31.034 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/guacamole/tomcat/temp
26-Sep-2023 21:29:31.034 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.38] using APR version [1.7.0].
26-Sep-2023 21:29:31.034 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [{4}].
26-Sep-2023 21:29:31.035 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
26-Sep-2023 21:29:31.040 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 3.0.2 15 Mar 2022]
26-Sep-2023 21:29:31.222 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
26-Sep-2023 21:29:31.295 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1232 ms
26-Sep-2023 21:29:31.368 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
26-Sep-2023 21:29:31.369 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.93]
26-Sep-2023 21:29:31.407 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/home/guacamole/tomcat/webapps/guacamole.war]
26-Sep-2023 21:29:34.178 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.
21:29:35.269 [localhost-startStop-1] INFO  o.a.g.environment.LocalEnvironment - GUACAMOLE_HOME is "/home/guacamole/.guacamole".
21:29:35.588 [localhost-startStop-1] INFO  o.a.g.GuacamoleServletContextListener - Read configuration parameters from "/home/guacamole/.guacamole/guacamole.properties".
21:29:35.591 [localhost-startStop-1] INFO  o.a.g.rest.auth.HashTokenSessionMap - Sessions will expire after 60 minutes of inactivity.
21:29:38.162 [localhost-startStop-1] INFO  o.a.g.extension.ExtensionModule - Extension "PostgreSQL Authentication" (postgresql) loaded.
21:29:38.403 [localhost-startStop-1] INFO  o.a.g.t.w.WebSocketTunnelModule - Loading JSR-356 WebSocket support...
26-Sep-2023 21:29:39.944 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/guacamole/tomcat/webapps/guacamole.war] has finished in [8,536] ms
26-Sep-2023 21:29:39.948 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
26-Sep-2023 21:29:40.044 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 8748 ms
21:30:17.980 [http-nio-8080-exec-5] 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.
21:30:17.987 [http-nio-8080-exec-5] ERROR o.a.g.rest.RESTExceptionMapper - Unexpected internal error: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: relation "guacamole_user" does not exist
  Position: 543
### 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_user" does not exist
  Position: 543
MaxWaldorf commented 11 months ago

Don't use external DB or posgres env.

The container does it by itself...

FuckingToasters commented 11 months ago

without postgres related things, it is constantly crying about missing env values so i added them back but without postgres setup or the dependson section. this then gave me a connection issue to the database so i assume, setting up an db is indeed required

MaxWaldorf commented 11 months ago

strange... What are you using as host?