Project

General

Profile

Actions

Bug #23388

closed

Server install fails with postgresql encoding error

Added by Marc Evans about 1 year ago. Updated about 1 year ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

Greetings -

Three different installs... all failed.

Attempt 1 - Debian Bullseye

Attempt 2 - Debian Bookworm

Attempt 3 - Ubuntu Jammy

What other information may I provide?

Here's a snippet of the end result (the same on each of the attempts above)...

ERROR:  new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT:  Use the same encoding as in the template database, or use template0 as template.
**************************************************************************************
ERROR: rudder-webapp postinstall script failed !

Trying to recover the problem, you should check that your instance is properly working

You may need to execute: apt-get install -f
You should also try to manually execute: /opt/rudder/bin/rudder-upgrade

   Such errors should not happen, please open an issue for this problem on 
            https://issues.rudder.io/projects/rudder/issues/new
**************************************************************************************
chmod: cannot access '/var/rudder/configuration-repository/.git': No such file or directory
chmod: cannot access '/var/rudder/configuration-repository/techniques': No such file or directory
find: '/var/rudder/configuration-repository/.git': No such file or directory
find: '/var/rudder/configuration-repository/techniques': No such file or directory

Subtasks 1 (0 open1 closed)

Bug #23395: Error in create database syntaxe: template AFTER ownerReleasedAlexis MoussetActions

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #20937: Postgresql is not created with the UTF8 encodingReleasedAlexis MoussetActions
Actions #1

Updated by François ARMAND about 1 year ago

  • Related to Bug #20937: Postgresql is not created with the UTF8 encoding added
Actions #2

Updated by Alexis Mousset about 1 year ago

  • Category set to Packaging
  • Target version set to 7.3.6

Were you trying to install a Rudder 7.3? This is definitely unexpected, and could be linked to https://issues.rudder.io/issues/20937.

Actions #3

Updated by Alexis Mousset about 1 year ago

  • Description updated (diff)
Actions #4

Updated by Alexis Mousset about 1 year ago

According to https://stackoverflow.com/a/28131347 it seems to be linked to the system locale:

If you use Debian, when you install the postgresql package it will use your default locale to create the template1 database. If you have not configured your OS to use UTF-8 as a default locale, you will encounter this error.

What does the locale command return on one of your systems? Did you configure a specific non-UTF8 encoding?

Actions #5

Updated by Alexis Mousset about 1 year ago

  • Target version changed from 7.3.6 to 7.2.11
Actions #6

Updated by Alexis Mousset about 1 year ago

  • Subject changed from new install failed to Server install fails with postgresql encoding error
Actions #7

Updated by Nicolas CHARLES about 1 year ago

According to https://www.postgresql.org/docs/current/manage-ag-templatedbs.html, if the database is created using template0 rather than default template1 template, then we can use the universal UTF8 encoding

Actions #8

Updated by François ARMAND about 1 year ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #9

Updated by François ARMAND about 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/2807
Actions #10

Updated by François ARMAND about 1 year ago

PR done and validated, it should be testable in following nigthlies

Actions #11

Updated by Anonymous about 1 year ago

  • Status changed from Pending technical review to Pending release
Actions #12

Updated by François ARMAND about 1 year ago

  • Subtask #23395 added
Actions #13

Updated by Marc Evans about 1 year ago

Can confirm it was this noob user's mistake - no locale's were set in each install iteration. Having set the locales, install runs quite well.

Actions #14

Updated by Alexis Mousset about 1 year ago

  • Fix check changed from To do to Checked
Actions #15

Updated by Vincent MEMBRÉ about 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.2.11 and 7.3.7 which were released today.

Actions

Also available in: Atom PDF