View Issue Details

IDProjectCategoryView StatusLast Update
0008352Kali LinuxKali Package Bugpublic2023-06-09 12:15
ReporterX0RW3LL Assigned Todaniruiz  
PrioritynormalSeverityblockReproducibilityN/A
Status closedResolutionno change required 
Product Version2023.2 
Summary0008352: msfdb will not initialize a postgresql database on non-en_US.UTF-8 locales
Description

Disclaimer: this is proxy-reported in retrospect

It seems like msfdb reinit does not accept non-en_US.UTF-8 locales specified in /etc/postgresql/15/main/postgresql.conf
The user who reported this issue has their system in French, but postgresql was configured with the following params:

lc_messages = 'en_GB.UTF-8'         # locale for system error message
lc_monetary = 'en_GB.UTF-8'         # locale for monetary formatting
lc_numeric = 'en_GB.UTF-8'          # locale for number formatting
lc_time = 'en_GB.UTF-8'             # locale for time formatting

Looking at sudo systemctl status postgresql@15-main after issuing sudo msfdb reinit throws an (invalid value for parameter "lc_messages": "en_GB.UTF-8" ...)—screenshots are included

This issue, however, is fixable by setting the postgresql locales to en_US.UTF-8
Unfortunately, I do not have setup specifics—all I know is this was done on an ARM64 device/virtualized environment
I pinged the OP for further clarification, so hopefully they will be adding some more details if needed

Steps To Reproduce
  • Non-English (US) Kali install on ARM64
  • `grep -E 'en[A-Z]{2}' /etc/postgresql/15/main/postgresql.conf (verify lc* != en_US.UTF-8)
  • sudo msfdb reinit
  • sudo systemctl status postgresql@15-main
Additional Information

Thread starts here on Discord: https://discord.com/channels/838895421291102289/1076270963622170646/1115937884466323477

Attached Files
image.png (857,997 bytes)
image2.png (1,050,160 bytes)

Activities

X0RW3LL

X0RW3LL

2023-06-09 10:18

reporter   ~0018173

Also relevant

FATAL: database locale is incompatible with operating system
DETAILS: The database was initialized with LC_COLLATE "en_GB.UTF-8", which is not recognized by setlocate().

image3.png (999,418 bytes)
daniruiz

daniruiz

2023-06-09 12:15

manager   ~0018174

I'm closing the issue as it's caused by user modified settings, and not really a bug. It's probably caused by changing the locale without generating it. As I've only been able to generate the error if I set the locale in /etc/postgresql/15/main/postgresql.conf to a language I haven't generated
If I switch back to a language from the list generated by locale -a or I generate the new language then it works again

Issue History

Date Modified Username Field Change
2023-06-09 10:06 X0RW3LL New Issue
2023-06-09 10:06 X0RW3LL File Added: image.png
2023-06-09 10:06 X0RW3LL File Added: image2.png
2023-06-09 10:18 X0RW3LL File Added: image3.png
2023-06-09 10:18 X0RW3LL Note Added: 0018173
2023-06-09 12:15 daniruiz Note Added: 0018174
2023-06-09 12:15 daniruiz Assigned To => daniruiz
2023-06-09 12:15 daniruiz Status new => closed
2023-06-09 12:15 daniruiz Resolution open => no change required