Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-82154

Unable to install to postgres with pgbouncer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.4.1
    • Installation
    • None
    • MOODLE_404_STABLE

      Issue:

      When performing a fresh installation to postgres with pgbouncer, pgbouncer returns "unsupported options" error. From the documentation, there is a dbhandleoptions flag that could be used for this kind of database setup but there is no way to it before running the cli install script to create the config.php. Anything I have missed? Or it is suggested to manually create the config.php from config-dist.php?

       

      Steps to reproduce:

      1. create a postgres
      2. create a pgbouncer
      3. git clone the moodle code
      4. run admin/cli/install.php:

      php -d max_input_vars=10000 /var/www/html/admin/cli/install.php \
              --lang="$MOODLE_LANGUAGE" \
              --wwwroot="$SITE_URL" \
              --dataroot=/var/www/moodledata/ \
              --dbtype="$DB_TYPE" \
              --dbhost="$DB_HOST" \
              --dbname="$DB_NAME" \
              --dbuser="$DB_USER" \
              --dbpass="$DB_PASS" \
              --dbport="$DB_PORT" \
              --prefix="$DB_PREFIX" \
              --fullname="$MOODLE_SITENAME" \
              --shortname="$MOODLE_SHORTNAME" \
              --adminuser="$MOODLE_USERNAME" \
              --adminpass="$MOODLE_PASSWORD" \
              --adminemail="$MOODLE_EMAIL" \
              --non-interactive \
              --agree-license \
              --skip-database \
              --allow-unstable
      

       

      Expected:

      Able to install without error

       

      Actual:

      app-1        | Moodle 4.4.1 (Build: 20240610) command line installation program
      pgbouncer-1  | 2024-06-10 11:27:33.463 UTC [1] LOG C-0x5577f7184be0: (nodb)/(nouser)@172.18.0.5:39370 closing because: unsupported options startup parameter: only '-c config=val' is allowed (age=0s)
      pgbouncer-1  | 2024-06-10 11:27:33.463 UTC [1] WARNING C-0x5577f7184be0: (nodb)/(nouser)@172.18.0.5:39370 pooler error: unsupported options startup parameter: only '-c config=val' is allowed
      app-1        | PHP Warning:  pg_connect(): Unable to connect to PostgreSQL server: connection to server at "pgbouncer" (172.18.0.4), port 5432 failed: FATAL:  unsupported options startup parameter: only '-c config=val' is allowed in /var/www/html/lib/dml/pgsql_native_moodle_database.php on line 214
      app-1        | We could not connect to the database you specified. Please check your database settings.
      

            Unassigned Unassigned
            jimsihk Jim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.