Closed AnicetR closed 6 years ago
@AnicetR The database schema doesn't exist, see zulip_1 | django.db.utils.ProgrammingError: schema "zulip" does not exist
.
Are you using an external database or the database that comes with the docker-compose.yaml
? Because you have specified 127.0.0.1
for the DB_HOST
where database
should be used as of the latest docker-compose.yaml
.
I use the one shipped within the postgres container, I didnt saw this in the conf. My mistake, I will try to specify database and come back to you for feedback.
Thanks a lot for your support on dummy mistakes ! Haha
Hi @galexrt and @AnicetR,
I'm also facing this issue with the latest Zulip 2.1.1.0(Docker version). Kindly update me on what needs to be done to solve this issue?
Here is my stacktrace:
root@dilli:/home/dilli/Documents/dilli/poc/zulip/docker-zulip# docker-compose up
Recreating dockerzulip_zulip_1 ...
Starting dockerzulip_redis_1 ...
Starting dockerzulip_redis_1
Recreating dockerzulip_zulip_1
Starting dockerzulip_memcached_1 ...
Starting dockerzulip_database_1 ...
Starting dockerzulip_rabbitmq_1 ...
Starting dockerzulip_rabbitmq_1
Starting dockerzulip_database_1
Recreating dockerzulip_zulip_1 ... done
Attaching to dockerzulip_memcached_1, dockerzulip_redis_1, dockerzulip_rabbitmq_1, dockerzulip_database_1, dockerzulip_zulip_1
redis_1 | Starting redis-server...
redis_1 | 1:C 09 Jan 18:21:54.365 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1 | 1:C 09 Jan 18:21:54.365 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1 | 1:C 09 Jan 18:21:54.365 # Configuration loaded
rabbitmq_1 | 2020-01-09 18:22:01.304 [info] <0.33.0> Application lager started on node 'rabbit@zulip-rabbit'
database_1 |
database_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
database_1 |
redis1 | ._
database_1 | 2020-01-09 18:21:57.421 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
redis1 | .-__ ''-._ zulip_1 | === Begin Initial Configuration Phase === redis_1 | _.-
.
. ''-. Redis 4.0.9 (00000000/0) 64 bit
database_1 | 2020-01-09 18:21:57.421 UTC [1] LOG: listening on IPv6 address "::", port 5432
redis1 | .-`` .-.
\/ ., ''-.
redis_1 | ( ' , .-|
, ) Running in standalone mode
redis1 | |`-.-...-
...-.`-._|'
_.-'| Port: 6379
zulip_1 | Preparing and linking the uploads folder ...
redis1 | | `-. ._ / _.-' | PID: 1 database_1 | 2020-01-09 18:21:58.414 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" redis_1 |
-. `-. -./ _.-' _.-' redis_1 | |
-.`-. `-..-' .-'.-'|
redis1 | | `-.-._ _.-'_.-' | http://redis.io zulip_1 | Prepared and linked the uploads directory. redis_1 |
-. `-.-.__.-'_.-' _.-' zulip_1 | Executing nginx configuration ... redis_1 | |
-.`-. -.__.-' _.-'_.-'| database_1 | 2020-01-09 18:21:59.479 UTC [20] LOG: database system was shut down at 2020-01-09 18:17:06 UTC redis_1 | |
-.`-. .-'.-' |
zulip_1 | Nginx configuration succeeded.
redis1 | `-. -._
-..-'.-' .-'
database_1 | 2020-01-09 18:22:00.774 UTC [1] LOG: database system is ready to accept connections
zulip_1 | Certificates configuration succeeded.
redis1 | `-. `-..-' _.-'
zulip_1 | Setting database configuration ...
redis1 | `-. _.-'
redis_1 | `-..-'
redis_1 |
redis_1 | 1:M 09 Jan 18:21:54.367 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 09 Jan 18:21:54.367 # Server initialized
redis_1 | 1:M 09 Jan 18:21:54.367 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1 | 1:M 09 Jan 18:21:54.367 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1 | 1:M 09 Jan 18:21:54.367 DB loaded from disk: 0.000 seconds
redis_1 | 1:M 09 Jan 18:21:54.367 Ready to accept connections
redis_1 | 1:M 09 Jan 18:21:54.367 * The server is now ready to accept connections at /var/run/redis/redis-server.sock
zulip_1 | Setting key "REMOTE_POSTGRES_HOST", type "string" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "REMOTE_POSTGRES_SSLMODE", type "string" in file "/etc/zulip/settings.py".
zulip_1 | Database configuration succeeded.
zulip_1 | Setting Zulip secrets ...
zulip_1 | Generating Zulip secrets ...
zulip_1 | Generated Camo config file /etc/default/camo
zulip_1 | generate_secrets: No new secrets to generate.
zulip_1 | Secrets generation succeeded.
zulip_1 | Zulip secrets configuration succeeded.
zulip_1 | Activating authentication backends ...
zulip_1 | Setting key "AUTHENTICATION_BACKENDS", type "array" in file "/etc/zulip/settings.py".
zulip_1 | Adding authentication backend "EmailAuthBackend".
zulip_1 | Authentication backend activation succeeded.
zulip_1 | Executing Zulip configuration ...
zulip_1 | Empty var for key "EMAIL_HOST".
zulip_1 | Setting key "EMAIL_HOST_USER", type "string" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "EMAIL_PORT", type "integer" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "EMAIL_USE_SSL", type "bool" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "EMAIL_USE_TLS", type "bool" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "EXTERNAL_HOST", type "string" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "MEMCACHED_LOCATION", type "string" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "RABBITMQ_HOST", type "string" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "RABBITMQ_USER", type "string" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "RATE_LIMITING", type "bool" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "REDIS_HOST", type "string" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "REDIS_PORT", type "integer" in file "/etc/zulip/settings.py".
zulip_1 | Setting key "ZULIP_ADMINISTRATOR", type "string" in file "/etc/zulip/settings.py".
rabbitmq_1 | 2020-01-09 18:22:04.759 [info] <0.33.0> Application mnesia started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.759 [info] <0.33.0> Application crypto started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.759 [info] <0.33.0> Application recon started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.759 [info] <0.33.0> Application jsx started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.760 [info] <0.33.0> Application os_mon started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.760 [info] <0.33.0> Application xmerl started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.760 [info] <0.33.0> Application inets started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.760 [info] <0.33.0> Application asn1 started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.760 [info] <0.33.0> Application public_key started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.761 [info] <0.33.0> Application ssl started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.761 [info] <0.33.0> Application ranch started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.761 [info] <0.33.0> Application ranch_proxy_protocol started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.761 [info] <0.33.0> Application rabbit_common started on node 'rabbit@zulip-rabbit'
rabbitmq_1 | 2020-01-09 18:22:04.761 [info] <0.226.0>
rabbitmq_1 | Starting RabbitMQ 3.7.7 on Erlang 20.3.8.5
rabbitmq_1 | Copyright (C) 2007-2018 Pivotal Software, Inc.
rabbitmq_1 | Licensed under the MPL. See http://www.rabbitmq.com/
rabbitmq_1 |
rabbitmq_1 | ## ##
rabbitmq_1 | ## ## RabbitMQ 3.7.7. Copyright (C) 2007-2018 Pivotal Software, Inc.
rabbitmq_1 | ########## Licensed under the MPL. See http://www.rabbitmq.com/
rabbitmq_1 | ###### ##
rabbitmq_1 | ########## Logs:
database_1 | CREATE TEXT SEARCH DICTIONARY english_us_hunspell
database_1 | (template = ispell, DictFile = en_us, AffFile = en_us, StopWords = zulip_english);
database_1 | CREATE TEXT SEARCH CONFIGURATION zulip.english_us_search (COPY=pg_catalog.english);
database_1 | ALTER TEXT SEARCH CONFIGURATION zulip.english_us_search
database_1 | ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword, hword_part
database_1 | WITH english_us_hunspell, english_stem;
database_1 |
database_1 |
database_1 | CREATE FUNCTION escape_html(text) RETURNS text IMMUTABLE LANGUAGE 'sql' AS $$
database_1 | SELECT replace(replace(replace(replace(replace($1, '&', '&'), '<', '<'),
database_1 | '>', '>'), '"', '"'), '''', ''');
database_1 | $$ ;
database_1 |
database_1 | ALTER TABLE zerver_message ADD COLUMN search_tsvector tsvector;
database_1 | CREATE INDEX zerver_message_search_tsvector ON zerver_message USING gin(search_tsvector);
database_1 | ALTER INDEX zerver_message_search_tsvector SET (fastupdate = OFF);
database_1 |
database_1 | CREATE TABLE fts_update_log (id SERIAL PRIMARY KEY, message_id INTEGER NOT NULL);
database_1 | CREATE FUNCTION do_notify_fts_update_log() RETURNS trigger LANGUAGE plpgsql AS
database_1 | $$ BEGIN NOTIFY fts_update_log; RETURN NEW; END $$;
database_1 | CREATE TRIGGER fts_update_log_notify AFTER INSERT ON fts_update_log
database_1 | FOR EACH STATEMENT EXECUTE PROCEDURE do_notify_fts_update_log();
database_1 | CREATE FUNCTION append_to_fts_update_log() RETURNS trigger LANGUAGE plpgsql AS
database_1 | $$ BEGIN INSERT INTO fts_update_log (message_id) VALUES (NEW.id); RETURN NEW; END $$;
database_1 | CREATE TRIGGER zerver_message_update_search_tsvector_async
database_1 | BEFORE INSERT OR UPDATE OF subject, rendered_content ON zerver_message
database_1 | FOR EACH ROW EXECUTE PROCEDURE append_to_fts_update_log();
database_1 |
zulip_1 | Applying zerver.0001_initial...Traceback (most recent call last):
zulip_1 | File "/home/zulip/deployments/2019-12-14-03-04-44/zulip-py3-venv/lib/python3.6/site-packages/django/db/backends/utils.py", line 62, in execute
zulip_1 | return self.cursor.execute(sql)
zulip_1 | File "/home/zulip/deployments/2019-12-14-03-04-44/zerver/lib/db.py", line 31, in execute
zulip_1 | return wrapper_execute(self, super().execute, query, vars)
zulip_1 | File "/home/zulip/deployments/2019-12-14-03-04-44/zerver/lib/db.py", line 18, in wrapper_execute
zulip_1 | return action(sql, params)
zulip_1 | psycopg2.errors.InvalidSchemaName: schema "zulip" does not exist
zulip_1 |
zulip_1 |
zulip_1 | The above exception was the direct cause of the following exception:
zulip_1 |
zulip_1 | Traceback (most recent call last):
zulip_1 | File "./manage.py", line 46, in
Hello !
I've some trouble to run the container. Pgsql seems to not configure itself.
Here is the stacktrace :
Here is my docker_compose.yml :
Here is the entrypoint.sh conf :
Any idea of what's appening ?
Thanks