docker-zulip: Initial installation fails with: "schema "zulip" does not exist"
Installing a fresh install, first time on a new Debian Buster VPS with 32GB RAM.
Everything goes well until the end of the installation. But for some reason, the zulip container keeps shutting down. Would someone lend me some hints on what I need to do differently, or what info I need to share with you to solve it?
Here is my docker-compose (yes I am intentionally switching https off):
version: '2'
services:
zulipmyorg_postgresql:
image: 'zulip/zulip-postgresql:10'
container_name: zulipmyorg_postgresql
environment:
POSTGRES_DB: 'zulip'
POSTGRES_USER: 'zulip'
# Note that you need to do a manual `ALTER ROLE` query if you
# change this on a system after booting the postgres container
# the first time on a host. Instructions are available in README.md.
POSTGRES_PASSWORD: 'removed0001'
volumes:
- '/var/lib/docker/volumes/zulipmyorg/_data_postgresql/data:/var/lib/postgresql/data:rw'
zulipmyorg_memcached:
image: 'quay.io/sameersbn/memcached:latest'
container_name: zulipmyorg_memcached
restart: always
zulipmyorg_rabbitmq:
image: 'rabbitmq:3.7.7'
container_name: zulipmyorg_rabbitmq
hostname: zulipmyorg_rabbitmq
restart: always
environment:
RABBITMQ_DEFAULT_USER: 'zulip'
RABBITMQ_DEFAULT_PASS: 'removed0002'
volumes:
- '/var/lib/docker/volumes/zulipmyorg/_data_rabbitmq:/var/lib/rabbitmq:rw'
zulipmyorg_redis:
image: 'quay.io/sameersbn/redis:latest'
container_name: zulipmyorg_redis
volumes:
- '/var/lib/docker/volumes/zulipmyorg/_data_redis:/var/lib/redis:rw'
zulipmyorg_zulip:
image: 'zulip/docker-zulip:2.1.1-0'
container_name: zulipmyorg_zulip
build:
context: .
args:
# Change these if you want to build zulip from a different repo/branch
ZULIP_GIT_URL: https://github.com/zulip/zulip.git
ZULIP_GIT_REF: 2.1.1
# Set this up if you plan to use your own CA certificate bundle for building
# CUSTOM_CA_CERTIFICATES:
# zmalmark enable the ports lines only if not behind reverse proxy
#ports:
#- '80:80'
#- '443:443'
environment:
FORCE_FIRST_START_INIT: 'True'
DB_HOST: 'zulipmyorg_postgresql'
DB_HOST_PORT: '5432'
DB_USER: 'zulip'
DISABLE_HTTPS: 'True' # zmalmark from here: https://github.com/zulip/docker-zulip/issues/137
SSL_CERTIFICATE_GENERATION: 'self-signed'
SETTING_MEMCACHED_LOCATION: 'zulipmyorg_memcached:11211'
SETTING_RABBITMQ_HOST: 'zulipmyorg_rabbitmq'
SETTING_REDIS_HOST: 'zulipmyorg_redis'
SECRETS_email_password: 'avdwlxxmxfilbfns'
# These should match POSTGRES_PASSWORD and RABBITMQ_DEFAULT_PASS.
SECRETS_rabbitmq_password: 'removed0002'
SECRETS_postgres_password: 'removed0001'
SECRETS_secret_key: 'removed0003'
SETTING_EXTERNAL_HOST: 'z.example.com'
SETTING_ZULIP_ADMINISTRATOR: 'myemail@gmail.com'
SETTING_EMAIL_HOST: 'smtp.gmail.com' # e.g. smtp.example.com
SETTING_EMAIL_HOST_USER: 'myemail@gmail.com'
SETTING_EMAIL_PORT: '587'
# It seems that the email server needs to use ssl or tls and can't be used without it
SETTING_EMAIL_USE_SSL: 'False'
SETTING_EMAIL_USE_TLS: 'True'
ZULIP_AUTH_BACKENDS: 'EmailAuthBackend'
# Uncomment this when configuring the mobile push notifications service
SETTING_PUSH_NOTIFICATION_BOUNCER_URL: 'https://push.zulipchat.com'
# zmalmark - I could not get these to work to turn on manual settings as per here "Manual Config" so trying to do ALL with env https://github.com/zulip/docker-zulip#running-a-zulip-server-with-docker-compose
#MANUAL_CONFIGURATION: 'True'
#LINK_SETTINGS_TO_DATA: 'True'
# zmalmark for nginx reverse proxy
volumes:
- '/var/lib/docker/volumes/zulipmyorg/_data_zulip:/data:rw'
ulimits:
nofile:
soft: 40000
hard: 50000
# zmalmark - add this for reverse proxy network
networks:
default:
external:
name: webproxy
Below is the output of docker logs for the affected container, no errors until here:
Zulip configuration succeeded.
Auto backup enabled.
=== End Initial Configuration Phase ===
=== Begin Bootstrap Phase ===
Waiting for database server to allow connections ...
Executing Zulip first start init ...
+++ readlink -f /home/zulip/deployments/current/scripts/setup/initialize-database
++ dirname /home/zulip/deployments/2020-01-04-01-13-16/scripts/setup/initialize-database
+ THIS_DIR=/home/zulip/deployments/2020-01-04-01-13-16/scripts/setup
+ cd /home/zulip/deployments/2020-01-04-01-13-16/scripts/setup/../..
+ ./manage.py checkconfig
+ ./manage.py migrate --noinput
Operations to perform:
Apply all migrations: analytics, auth, confirmation, contenttypes, otp_static, otp_totp, sessions, social_django, two_factor, zerver
Running migrations:
Traceback (most recent call last):
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
File "/home/zulip/deployments/2020-01-04-01-13-16/zerver/lib/db.py", line 31, in execute
return wrapper_execute(self, super().execute, query, vars)
File "/home/zulip/deployments/2020-01-04-01-13-16/zerver/lib/db.py", line 18, in wrapper_execute
return action(sql, params)
psycopg2.errors.InvalidSchemaName: schema "zulip" does not exist
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 46, in <module>
execute_from_command_line(sys.argv)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/migrations/migration.py", line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/migrations/operations/special.py", line 108, in database_forwards
self._run_sql(schema_editor, self.sql)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/migrations/operations/special.py", line 133, in _run_sql
schema_editor.execute(statement, params=None)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 136, in execute
cursor.execute(sql, params)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/zulip/deployments/2020-01-04-01-13-16/zulip-py3-venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
File "/home/zulip/deployments/2020-01-04-01-13-16/zerver/lib/db.py", line 31, in execute
return wrapper_execute(self, super().execute, query, vars)
File "/home/zulip/deployments/2020-01-04-01-13-16/zerver/lib/db.py", line 18, in wrapper_execute
return action(sql, params)
django.db.utils.ProgrammingError: schema "zulip" does not exist
Applying zerver.0001_initial...Zulip first start database initi failed in "initialize-database" exit code 1. Exiting.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (11 by maintainers)
That’s merged; I think we’re ready to release 2.1.2 from the 2.1.x branch either tonight or early tomorrow (And then a Docker release with the fix).