Bootstrap failure due to lack of locales in container


#1

Hi,

I’m trying to install Discourse on a VPS using es_ES.UTF-8 as locale but I’m getting the following errors: bootstrap_failure · GitHub

My app.yml and the locale output

I already installed Discourse once with the default en_US.UTF-8 locale and it was (almost) easy, but this time I’m having an hard time.

What am I missing?

Any help will be appreciated.

Thanks!

Enrico


#2

Maybe related to this issue Database files are incompatible with server


#3

So it seems that the linked issue is not related to my issue after all. That issue is related to Postgresql 9.3 > 9.5 upgrade. My issue instead is related to the container locales… sorry for the noise…

The problem is still there, though.


#4

I tried to add `-e LANG=“es_ES.UTF-8” -e LC_ALL=“es_ES.UTF-8” to docker run line

https://github.com/discourse/discourse_docker/blob/master/launcher#499

in run_bootstrap(). This is the only change I’m seeing in the output:

before:

cat: /shared/postgres_data/PG_VERSION: No such file or directory
initdb: invalid locale settings; check LANG and LC_* environment variables

after:

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (es_ES.UTF-8)
cat: /shared/postgres_data/PG_VERSION: No such file or directory
initdb: invalid locale settings; check LANG and LC_* environment variables

(Simon Cossar) #5

I don’t thing ‘es_ES’ is a valid locale for Discourse. What happens if you set it to ‘es’?


#6

Hi @Simon_Cossar which locale do you refer exactly? Inside the app.yml?
I think that we need to specify UTF8 though.


#7

BTW, in docker IRC channel was pointed out that the failure of the script is probably more related to the following line than locales:

FATAL:  data directory "/shared/postgres_data" has group or world access

https://gist.github.com/enricostano/6bc2042c69d8a5a9ae8174df19a6a6dd#file-bootstrap_failure-L65

Actually those locales issues are just warning. In any case, the locale issue is still there since I will need them to properly set the DB.


(Simon Cossar) #8

Yes, I meant inside of the app.yml, but I was mixing up the LANG setting with the DISCOURSE_DEFAULT_LOCALE setting.


#9

I found this issue in the repo https://github.com/discourse/discourse_docker/issues/194 that seems related.

BTW, I’m still stuck without any luck installing Discourse :sadpanda: