zulip / docker-zulip

Container configurations, images, and examples for Zulip.
https://zulip.com/
Apache License 2.0
581 stars 241 forks source link

Exited with code 1 during zulip launch #61

Closed reyman closed 8 years ago

reyman commented 8 years ago

Hi, I have some problem with settings of docker compose in dev version. I'm waiting release to retry.

But i have also some problem with 1.3.9 and postgres role :

zulip_1     | ..(Re)creating database structure ...
zulip_1     | Setting up the database, schema and user ...
database_1  | ERROR:  permission denied to create role
database_1  | STATEMENT:  CREATE USER zulip;
zulip_1     | ERROR:  permission denied to create role
zulip_1     | ALTER ROLE
database_1  | ERROR:  database "zulip" already exists
database_1  | STATEMENT:  CREATE DATABASE zulip OWNER=zulip;
zulip_1     | ERROR:  database "zulip" already exists
database_1  | ERROR:  schema "zulip" already exists
database_1  | STATEMENT:  CREATE SCHEMA zulip AUTHORIZATION zulip;
zulip_1     | ERROR:  schema "zulip" already exists
zulip_1     | Creating tsearch_extras extension ...
database_1  | FATAL:  password authentication failed for user "postgres"
database_1  | DETAIL:  User "postgres" has no password assigned.
database_1  |   Connection matched pg_hba.conf line 94: "host all all 0.0.0.0/0 md5"
zulip_1     | psql: FATAL:  password authentication failed for user "postgres"

And later

zulip_1     | Initializing Zulip Voyager database ...
database_1  | ERROR:  duplicate key value violates unique constraint "zerver_realm_domain_key"
database_1  | DETAIL:  Key (domain)=(zulip.com) already exists.
database_1  | STATEMENT:  INSERT INTO "zerver_realm" ("domain", "name", "restricted_to_domain", "invite_required", "invite_by_admins_only", "mandatory_topics", "show_digest_email", "nam
e_changes_disabled", "date_created", "notifications_stream_id", "deactivated") VALUES ('zulip.com', NULL, true, false, false, false, true, false, '2016-03-06T12:59:11.309132+00:00'::tim
estamptz, NULL, false) RETURNING "zerver_realm"."id"
zulip_1     | Traceback (most recent call last):
zulip_1     |   File "/home/zulip/deployments/current/manage.py", line 24, in <module>
zulip_1     |     execute_from_command_line(sys.argv)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line                                                [0/614]
zulip_1     |     utility.execute()
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 330, in execute
zulip_1     |     self.fetch_command(subcommand).run_from_argv(self.argv)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 393, in run_from_argv
zulip_1     |     self.execute(*args, **cmd_options)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 444, in execute
zulip_1     |     output = self.handle(*args, **options)
zulip_1     |   File "/home/zulip/deployments/2015-11-18-18-57-23/zerver/management/commands/initialize_voyager_db.py", line 39, in handle
zulip_1     |     Realm.objects.create(domain="zulip.com")
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method
zulip_1     |     return getattr(self.get_queryset(), name)(*args, **kwargs)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 348, in create
zulip_1     |     obj.save(force_insert=True, using=self.db)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 710, in save
zulip_1     |     force_update=force_update, update_fields=update_fields)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 738, in save_base
zulip_1     |     updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 822, in _save_table
zulip_1     |     result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 861, in _do_insert
zulip_1     |     using=using, raw=raw)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method
zulip_1     |     return getattr(self.get_queryset(), name)(*args, **kwargs)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 922, in _insert
zulip_1     |     return query.get_compiler(using=using).execute_sql(return_id)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 986, in execute_sql
zulip_1     |     cursor.execute(sql, params)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
zulip_1     |     return self.cursor.execute(sql, params)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 97, in __exit__
zulip_1     |     six.reraise(dj_exc_type, dj_exc_value, traceback)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
zulip_1     |     return self.cursor.execute(sql, params)
zulip_1     |   File "/home/zulip/deployments/2015-11-18-18-57-23/zerver/lib/db.py", line 23, in execute
zulip_1     |     return wrapper_execute(self, super(TimeTrackingCursor, self).execute, query, vars)
zulip_1     |   File "/home/zulip/deployments/2015-11-18-18-57-23/zerver/lib/db.py", line 11, in wrapper_execute
zulip_1     |     return action(sql, params)
zulip_1     | django.db.utils.IntegrityError: duplicate key value violates unique constraint "zerver_realm_domain_key"
zulip_1     | DETAIL:  Key (domain)=(zulip.com) already exists.
zulip_1     | 
zulip_1     | Zulip first start init failed in "initialize_voyager_db" with exit code 0.
zulip_zulip_1 exited with code 0

The gist : https://gist.github.com/reyman/4d5a8910a3c7c6217025

I need to remove old volume ? If zulip user and db exist, why not reuse it ?

reyman commented 8 years ago

Ok, i stop nginx-proxy, and rebuild image without VIRTUAL_* option

Using directly port 80:80, and 443:443 and ip of my vps, i see the login page : https://51.255.47.40/

Ok, the forbidden message don't appear, but Ldap login failed..

There is something i don't understand in option probably, i activate the ZULIP_AUTH_BACKENDS: "ZulipLDAPAuthBackend" and i use SETTING_AUTH_LDAP_USER_SEARCH: "LDAPSearch(\"ou=Users,dc=comnmodel,dc=org\",ldap.SCOPE_SUBTREE,\"(uid=%(user)s)\")" to find the correct user in LDAP. I don't use the email to login.

Login page ask only for email / password... so how can i log correctly ? It seems the actual login page don't correspond to Ldap login page, isn't it ?