jjethwa / rundeck

GNU General Public License v3.0
123 stars 136 forks source link

Connection to an external Postgres Instance #206

Closed zerr0s closed 2 weeks ago

zerr0s commented 2 years ago

Hi. I'm trying to run rundeck with a docker istance of postgres.

When rundeck starts it says: psql: SCRAM authentication requires libpq version 10 or above

I'm running the latest postgres version: 14

version: '3.8'

services:
  rundeck:
    image: jordan/rundeck:3.4.9
    depends_on:
      - postgres
    links:
      - postgres
    environment:
      SERVER_URL: http://0.0.0.0:4443
      # EXTERNAL_SERVER_URL: ""
      # RDECK_JVM_SETTINGS: ""
      NO_LOCAL_MYSQL: "true"
      DATABASE_DRIVER: org.postgresql.Driver
      DATABASE_URL: jdbc:postgresql://postgres/rundeck?autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true
      RUNDECK_UID: 1000
      RUNDECK_GID: 1000
      RUNDECK_WITH_SSL: "true"
      RUNDECK_PASSWORD: rundeck
      RUNDECK_ADMIN_PASSWORD: "xxxxxxx"
      # Options file (default) or db.  See: http://rundeck.org/docs/plugins-user-guide/configuring.html#storage-plugins
      # RUNDECK_STORAGE_PROVIDER: ""
      # Options file (default) or db.  See: http://rundeck.org/docs/administration/setting-up-an-rdb-datasource.html
      # RUNDECK_PROJECT_STORAGE_TYPE: "db"
      # Number of threads that are available for concurrent execution of jobs.
      # see: http://www.quartz-scheduler.org/documentation/quartz-2.x/configuration/ConfigThreadPool.html
      RUNDECK_THREAD_COUNT: ""
      # HTML to show as title in app header. See: http://rundeck.org/docs/administration/gui-customization.html.
      # Useful to show Rundeck environment where multiple Rundeck instances are deployed, e.g. GUI_BRAND_HTML='<span class="title">QA Environment</span>'
      # GUI_BRAND_HTML: ""
      # RDpropertyfilelogin(default) or ldap. See: http://rundeck.org/docs/administration/authenticating-users.html
      # LOGIN_MODULE: ldap
      # ldap configuration file name if ldap. You will need to mount the same file at /etc/rundeck/<filename of ldap>.
      # See: http://rundeck.org/docs/administration/authenticating-users.html
      # JAAS_CONF_FILE: ""
      # SMTP_HOST: ""
      # SMTP_PORT: ""
      # SMTP_USERNAME: ""
      # SMTP_PASSWORD: ""
      # SMTP_DEFAULT_FROM: ""
      # Set to true if database is already setup and/or database admin password is not known
      # SKIP_DATABASE_SETUP: ""
    # volumes:
    #   -
    ports:
      - 4443:4443
    networks:
      - rundeck

  postgres:
    image: postgres
    environment:
      - POSTGRES_DB=rundeck
      - POSTGRES_USER=rundeck
      - POSTGRES_PASSWORD=rundeck
    volumes:
      - /home/xxxxx/works/containers/rundeck/data/db:/var/lib/postgresql/data
    networks:
      - rundeck

networks:
  rundeck:
    driver: overlay

Any idea what i am doing wrong ?

jjethwa commented 2 years ago

Hi @zerr0s

Thanks for the report. I don't know much about SCRAM authentication, but found this: https://stackoverflow.com/questions/62807717/how-can-i-solve-postgresql-scram-authentifcation-problem

Maybe try the changes in the recommended solution?

If you don't need scram-sha-256 authentication, you can revert to md5:

set password_encryption = md5 in postgresql.conf
change the authentication method to md5 in pg_hba_conf
reload PostgreSQL
change the password of the user to get an MD5 encrypted password
jjethwa commented 2 weeks ago

Closing as no more updates