Chatwoot: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)

Created on 29 Oct 2020  路  3Comments  路  Source: chatwoot/chatwoot

Describe the bug

I follow your documentation https://www.chatwoot.com/docs/deployment/deploy-chatwoot-in-linux-vm and the script fails when create the database.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://www.chatwoot.com/docs/deployment/deploy-chatwoot-in-linux-vm and follow the procedure.
  2. Execute the 18.04 script in the VM linux console and,
  3. See error
    PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
    The chatwoot_production database not created.

Server logs

Couldn't create 'chatwoot_production' database.
PG::InvalidParameterValue: 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.

Environment

Linux VM installation self hosted installation of Chatwoot. Ubuntu 18.04.5 LTS

Bug Investigation

Most helpful comment

I fix this issue defining the locales before execute the _setup.sh_ script.
I repeat the whole process from scratch:

 dpkg-reconfigure locales
 wget https://raw.githubusercontent.com/chatwoot/chatwoot/develop/deployment/setup_18.04.sh -O setup.sh
 chmod 755 setup.sh
 ./setup.sh

I hope this helps someone.

All 3 comments

I fix this issue defining the locales before execute the _setup.sh_ script.
I repeat the whole process from scratch:

 dpkg-reconfigure locales
 wget https://raw.githubusercontent.com/chatwoot/chatwoot/develop/deployment/setup_18.04.sh -O setup.sh
 chmod 755 setup.sh
 ./setup.sh

I hope this helps someone.

@fv3rdugo Do you think it happens in all cases? I tested this script on DigitalOcean and Aws, it worked fine. Am I missing something?

I tried to installing from ubuntu_18.04 LXC image on a Proxmox server. I think the postgresql's template1 had SQL_ASCII by default instead of UTF8. That was the problem.
In other systems surely the default encoding is unicode and there is no such problem. There may be a way to set unicode by default. Sorry, I don't know how to do it for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pranavrajs picture pranavrajs  路  3Comments

pranavrajs picture pranavrajs  路  3Comments

stschindler picture stschindler  路  4Comments

tramal228228 picture tramal228228  路  4Comments

pranavrajs picture pranavrajs  路  5Comments