docker-zulip icon indicating copy to clipboard operation
docker-zulip copied to clipboard

Errors configuring settings

Open krystalcode opened this issue 5 years ago • 6 comments

When I enter a proper email value for SETTING_ZULIP_ADMINISTRATOR in the docker compose file, I get the following error:

ZULIP_ADMINISTRATOR = '[email protected]'
                                        ^
SyntaxError: EOF while scanning triple-quoted string literal

I pass an empty string and the error goes away.

Then, even though I do set a value for SETTING_EXTERNAL_HOST in the docker compose file, I get the following error:

Error: You must set EXTERNAL_HOST in /etc/zulip/settings.py.

First time trying to set up Zulip, any help would be appreciated.

Btw, would it not be preferrable to copy the settings.py file into the container or create it as a volume instead of passing everything as env variables? Is there an example file I can find somewhere?

krystalcode avatar Jun 09 '19 04:06 krystalcode

UPDATE

I got this settings template, customized and copied it to /etc/zulip/settings.py when building the container. I still get the error for not setting EXTERNAL_HOST even though it is set in the settings.py file.

Executing Zulip configuration ...
Setting key "MEMCACHED_LOCATION", type "string" in file "/etc/zulip/settings.py".
Setting key "RABBITMQ_HOST", type "string" in file "/etc/zulip/settings.py".
Setting key "RABBITMQ_USER", type "string" in file "/etc/zulip/settings.py".
Setting key "RATE_LIMITING", type "bool" in file "/etc/zulip/settings.py".
Setting key "REDIS_HOST", type "string" in file "/etc/zulip/settings.py".
Setting key "REDIS_PORT", type "integer" in file "/etc/zulip/settings.py".
Error: You must set EXTERNAL_HOST in /etc/zulip/settings.py.
Error in the Zulip configuration. Exiting.

krystalcode avatar Jun 09 '19 04:06 krystalcode

Can you paste a redacted version of your docker-compose file? I have both zulip admin and external host settings defined in there and it's been working fine for me.

sirpengi avatar Jun 19 '19 18:06 sirpengi

@krystalcode in particular, did you set the SETTINGS_EXTERNAL_HOST variable in your docker-compose.yml as documented?

Unless you're using the MANUAL_CONFIGURATION option, Zulip will overwrite /etc/zulip/settings.py based on your configured settings.

timabbott avatar Jun 19 '19 22:06 timabbott

I'm looking into this after some time again. I removed and recreated the container, the error with the EXTERNAL_HOST setting seems to have gone away. I was then getting the error with the ZULIP_ADMINISTRATOR setting, I narrowed it down to passing an empty string in the EMAIL_HOST setting (was doing so temporarily until I troubleshoot other things first. I entered a proper SMTP host and it went away. I do get another error now django.db.utils.OperationalError: FATAL: password authentication failed for user "zulip", I'll troubleshoot a bit more before posting details.

krystalcode avatar Aug 05 '19 03:08 krystalcode

I was using a custom database user in the following env variables:

POSTGRES_USER DB_USER

As soon I changed it back to zulip it works. Would it be hardcoded somewhere? Seems like a bug.

krystalcode avatar Aug 05 '19 04:08 krystalcode

The problem is that the Postgres images only set the password on first boot. So if you change those settings, you need to destroy and recreate the postgres container (or change them in a psql shell).

timabbott avatar Aug 07 '19 23:08 timabbott