Giter Site home page Giter Site logo

zulip / docker-zulip Goto Github PK

View Code? Open in Web Editor NEW
545.0 23.0 227.0 1.07 MB

Container configurations, images, and examples for Zulip.

Home Page: https://zulip.com/

License: Apache License 2.0

Shell 82.21% Dockerfile 8.77% Smarty 9.02%
docker kubernetes zulip helm

docker-zulip's Introduction

Welcome to docker-zulip!

docker-zulip stream

This is a container image for running Zulip (GitHub) in production. Image available from:

  • Docker Hub (docker pull zulip/docker-zulip:8.4-0)

Current Zulip version: 8.4 Current Docker image version: 8.4-0

Project status: Alpha. While this project works and is used by many sites in production, configuring is substantially more error-prone than the normal Zulip installer (which Just Works). We recommend this project if you want to host Zulip using Docker, but both setting up and maintaining a Zulip server is simpler and less error-prone with the normal installer than with Docker.

Overview

This project defines a Docker image for a Zulip server, as well as sample configuration to run that Zulip web/application server with each of the major services that Zulip uses in its own container: redis, postgres, rabbitmq, memcached.

We have configuration and documentation for Docker Compose and Kubernetes; contributions are welcome for documenting other container runtimes and flows.

If you aren't already a Docker expert, we recommend starting by reading our brief overview of how Docker and containers work in the next section.

The Docker data storage model

Docker and other container systems are built around shareable container images. An image is a read-only template with instructions for creating a container. Often, an image is based on another image, with a bit of additional customization. For example, Zulip's zulip-postgresql image extends the standard postgresql image (by installing a couple postgres extensions). And the zulip image is built on top of a standard ubuntu image, adding all the code for a Zulip application/web server.

Every time you boot a container based on a given image, it's like booting off a CD-ROM: you get the exact same image (and anything written to the image's filesystem is lost). To handle persistent state that needs to persist after the Docker equivalent of a reboot or upgrades (like uploaded files or the Zulip database), container systems let you configure certain directories inside the container from the host.

This project's docker-compose.yml configuration file uses Docker managed volumes to store persistent Zulip data. If you use the Docker Compose deployment, you should make sure that Zulip's volumes are backed up, to ensure that Zulip's data is backed up.

Prerequisites

To use docker-zulip, you need the following:

  • An installation of Docker and Docker Compose or a Kubernetes runtime engine.
  • We recommend at least 2GB of available RAM for running a production Zulip server; you'll want 4GB if you're building the container (rather than using the prebuilt images). If you're just testing and/or aren't expecting a lot of users/messages, you can get away with significantly less especially for the postgres, memcached, etc. containers, because Docker makes it easy to sharply limit the RAM allocated to the services Zulip depends on, like redis, memcached, and postgresql (at the cost of potential performance issues).
  • This project doesn't support docker-rootless; Zulip needs root access to set properties like the maximum number of open file descriptions via ulimit (which is important for it to handle thousands of connected clients).

Running a Zulip server with docker-compose

To use this project, we recommend starting by cloning the repo (since you'll want to edit the docker-compose.yml file in this project):

git clone https://github.com/zulip/docker-zulip.git
cd docker-zulip
# Edit `docker-compose.yml` to configure; see docs below

If you're in hurry to try Zulip, you can skip to start the Zulip server, but for production use, you'll need to do some configuration.

Configuration

With docker-compose, it is traditional to configure a service by setting environment variables declared in the zulip -> environment section of the docker-compose.yml file; this image follows that convention.

Mandatory settings. You must configure these settings (more discussion in the main Zulip installation docs):

  • SETTING_EXTERNAL_HOST: The hostname your users will use to connect to your Zulip server. If you're testing on your laptop, the default of localhost.localdomain is great.
  • SETTING_ZULIP_ADMINISTRATOR: The email address to receive error and support emails generated by the Zulip server and its users.

Mandatory settings for serious use. Before you allow production traffic, you need to also set these:

  • POSTGRES_PASSWORD and SECRETS_postgres_password should both be a password for the Zulip container to authenticate to the Postgres container. Since you won't use this directly, you just want a long, randomly generated string. While SECRETS_postgres_password is synced to the Zulip container on every boot, POSTGRES_PASSWORD is only accessed by the postgres container on first boot, so if you later want to change your postgres password after booting the container, you'll need to either do an ALTER ROLE query inside the postgres container or rebuild the postgres database (only if you don't need your data!).
  • RABBITMQ_DEFAULT_PASS and SECRETS_rabbitmq_password are similar, just for the RabbitMQ container.
  • MEMCACHED_PASSWORD and SECRETS_memcached_password are similar, just for the memcached container.
  • REDIS_PASSWORD and SECRETS_redis_password are similar, just for the Redis container.
  • SECRETS_secret_key should be a long (e.g. 50 characters), random string. This value is important to keep secret and constant over time, since it is used to (among other things) sign login cookies (so if you change this, all your users will be forcibly logged out).
  • SETTING_EMAIL_*: Where you configure Zulip's ability to send outgoing email.

Other settings. If an environment variable name doesn't start with SETTING or SECRETS in docker-compose.yml, it is specific to the Docker environment. Standard Zulip server settings are secrets are set using the following syntax:

  • SETTING_MY_SETTING will become MY_SETTING in /etc/zulip/settings.py
  • SECRETS_my_secret will become my_secret in /etc/zulip/zulip-secrets.conf.

Reading the comments in the sample Zulip's settings.py file is the best way to learn about the full set of Zulip's supported server-level settings.

Most settings in Zulip are just strings, but some are lists (etc.) which you need to encode in the YAML file. For example,

  • For AUTHENTICATION_BACKENDS, you enter ZULIP_AUTH_BACKENDS as a comma-separated list of the backend names (E.g. "EmailAuthBackend,GitHubAuthBackend").

Reducing RAM usage. By default, the Zulip server automatically detect whether the system has enough memory to run Zulip queue processors in the higher-throughput but more multiprocess mode (or to save 1.5GiB of RAM with the multithreaded mode). This algorithm might see the host's memory, not the docker container's memory. Set to QUEUE_WORKERS_MULTIPROCESS to true or false to override the automatic calculation.

SSL Certificates. By default, the image will generate a self-signed cert. You can set SSL_CERTIFICATE_GENERATION: "certbot" within docker-compose.yml to enable automatically-renewed Let's Encrypt certificates. By using certbot here, you are agreeing to the Let's Encrypt ToS.

You can also provide an SSL certificate for your Zulip server by putting it in /opt/docker/zulip/zulip/certs/ (by default, the zulip container startup script will generate a self-signed certificate and install it in that directory).

Load balancer. To tell Zulip that it is behind a load balancer, you must set LOADBALANCER_IPS to a comma-separated list of IPs or CIDR ranges. This will tell Zulip to pass the real IP of the client, instead of the IP of the load balancer itself, by setting the IPs under [loadbalancer] in zulip.conf.

Your proxy must provide both X-Forwarded-For and X-Forwarded-Proto headers. See the Zulip documentation for sample nginx, Apache2, and HAProxy configurations, as well as notes for other proxies.

Manual configuration

The way the environment variables configuration process described in the last section works is that the entrypoint.sh script that runs when the Docker image starts up will generate a Zulip settings.py file file based on your settings every time you boot the container. This is convenient, in that you only need to edit the docker-compose.yml file to configure your Zulip server's settings.

An alternative approach is to set MANUAL_CONFIGURATION: "True" and LINK_SETTINGS_TO_DATA: "True" in docker-compose.yml. If you do that, you can provide a settings.py file and a zulip-secrets.conf file in /opt/docker/zulip/zulip/settings/etc-zulip/, and the container will use those.

Starting the server

You can boot your Zulip installation with:

docker-compose pull
docker-compose up

This will boot the 5 containers declared in docker-compose.yml. The docker-compose command will print a bunch of output, and then eventually hang once everything is happily booted, usually ending with a bunch of lines like this:

rabbitmq_1   | =INFO REPORT==== 27-May-2018::23:26:58 ===
rabbitmq_1   | accepting AMQP connection <0.534.0> (172.18.0.3:49504
-> 172.18.0.5:5672)

You can inspect what containers are running in another shell with docker-compose ps (remember to cd into the docker-zulip directory first).

If you hit Ctrl-C, that will stop your Zulip server cluster. If you'd prefer to have the containers run in the background, you can use docker-compose up -d.

If you want to build the Zulip image yourself, you can do that by running docker-compose build; see also the documentation on building a custom Git version version.

Connecting to your Zulip server

You can now connect to your Zulip server. For example, if you set this up on a laptop with the default port mappings and SETTING_EXTERNAL_HOST, typing http://localhost/ will take you to your server. Note that in this default scenario, (1) you'll have to proceed past a self-signed SSL error, and (2) you won't be able to login until you create an organization, but visiting the URL is a good way to confirm that your networking configuration is working correctly.

You can now follow the normal instructions for how to create a Zulip organization and log in to your new Zulip server (though see the following section for how to run management commands).

Running management commands

From time to time, you'll need to attach a shell to the Zulip container so that you can run manage.py commands, check logs, etc. The following are helpful examples:

# Get a (root) shell in the container so you can access logs
docker-compose exec zulip bash
# Create the initial Zulip organization
docker-compose exec -u zulip zulip \
    /home/zulip/deployments/current/manage.py generate_realm_creation_link

Since that process for running management commands is a pain, we recommend using a wrapper script for running management commands.

Using a custom certificate bundle for outgoing HTTP connections

If you are sitting behind a custom CA and want to build the Zulip image yourself, special care is required.

The Zulip build process installs packages via yarn and pip, and these need packages to be configured to use your custom CA certificates. You will need to get your certificate bundle into the docker image, either by adding a COPY somewhere or by replacing the FROMs with a custom ubuntu image that includes your bundle. The recommended way is to have your own base image which has your bundle ready at the default /etc/ssl/certs/ca-certificates.crt.

The next and last step is to set up the CUSTOM_CA_CERTIFICATES argument in docker-compose.yml to point to your CA bundle, e.g. to /etc/ssl/certs/ca-certificates.crt.

At this point you are ready to build Zulip.

Upgrading

See the separate upgrading document for upgrading instructions.

Running a Zulip server with Kubernetes

A Kubernetes pod file is in the kubernetes/ folder; you can run it with kubectl create -f ./kubernetes/.

You should read the docker-compose section above to understand how this works, since it's a very similar setup. You'll want to clone this repository, edit the zulip-rc.yml to configure the image, etc.

Installing minikube for testing

The fastest way to get Kubernetes up and running for testing without signing up for a cloud service is to install Minikube on your system.

Helm charts

Read the Helm Chart README to learn more about installing Zulip on a Kubernetes cluster with Helm.

Feedback is welcome in the [helm-chart-thread]: https://chat.zulip.org/#narrow/stream/21-provision-help/subject/K8.20and.20Helm/near/589098

Scaling out and high availability

This image is not designed to make it easy to run multiple copies of the zulip application server container (and you need to know a lot about Zulip to do this sort of thing successfully). If you're interested in running a high-availablity Zulip installation, your best bet is to get in touch with the Zulip support team at [email protected].

Networking and reverse proxy configuration

When running your container in production, you may want to put your Zulip container behind an HTTP proxy. This wiki page documents how to do this correctly with nginx.

See also the Zulip documentation on reverse proxies

By default, Zulip will only interact with user traffic over HTTPS. However, if your networking environment is such that the Zulip server is behind a load balancer and you need the Zulip server to respond over HTTP, you can configure that via setting DISABLE_HTTPS: "True" in the Docker environment (docker-compose.yml).

Troubleshooting

Common issues include:

  • Invalid configuration resulting in the zulip container not starting; check docker-compose ps to see if it started, and then read the logs for the Zulip container to see why it failed.
  • A new Zulip setting not being passed through the Docker entrypoint.sh script properly. If you run into this sort of problem you can work around it by specifying a ZULIP_CUSTOM_SETTINGS with one setting per line below, but please report an issue so that we can fix this for everyone else.

Community support

You can get community support and tell the developers about your experiences using this project on #production-help on chat.zulip.org, the Zulip community server.

In late May 2018, we completed a complete rewrite of this project's documentation, so we'd love any and all feedback!

Contributing

We love community contributions, and respond quickly to issues and PRs. Some particularly useful ways to contribute right now are:

  • Contribute to this documentation by opening issues about what confused you or submitting pull requests!
  • Reporting bugs or rough edges!

Credits

Huge thanks to everyone who has contributed. Special thanks to Alexander Trost, who created docker-zulip and did a huge amount of the early work required to make a high-quality Docker image for Zulip possible.

docker-zulip's People

Contributors

alexmv avatar andersk avatar armooo avatar arpit551 avatar bryanlarsen avatar cmcneil avatar cognusion avatar galexrt avatar gravitas-drone avatar i-ky avatar jeaye avatar jmhwang7 avatar koelle25 avatar maltokyo avatar mateuszmandera avatar maxxer avatar mlocati avatar nil4 avatar nmursith avatar parndt avatar ppenguin avatar rht avatar rinkp avatar robertseidler avatar rohlik avatar sampritipanda avatar timabbott avatar tullyrankin avatar xentec avatar xificurc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-zulip's Issues

Create documentation

ToDo:

  • How to use the image with docker-compose
  • How to use the container without docker-compose (Create scripts for an easy start)
  • Add a list of all env vars
  • Add explanation for all env vars
  • Add new env vars to wiki

Release docker-zulip v1.3.7

  • Check Zulip changes
  • Change Zulip specific env vars (Dockerfile)
  • Cleanup
  • Build and test the new image
  • Fix errors related to the new version

"ERROR: no schema has been selected to create in" from Postgresql

I am using docker-compose to deploy it, here's the last log of docker-compose up:

zulip_1     | Executing Zulip first start init ...
database_1  | 2015-10-25 19:37:46 UTC [43-1] zulip@zulip ERROR:  no schema has been selected to create in
database_1  | 2015-10-25 19:37:46 UTC [43-2] zulip@zulip STATEMENT:  CREATE TABLE "django_migrations" ("id" serial NOT NULL PRIMARY KEY, "app" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "applied" timestamp with time zone NOT NULL)
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
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 "/usr/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 93, in handle
zulip_1     |     executor = MigrationExecutor(connection, self.migration_progress_callback)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 19, in __init__
zulip_1     |     self.loader = MigrationLoader(self.connection)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 47, in __init__
zulip_1     |     self.build_graph()
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 182, in build_graph
zulip_1     |     self.applied_migrations = recorder.applied_migrations()
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 59, in applied_migrations
zulip_1     |     self.ensure_schema()
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 53, in ensure_schema
zulip_1     |     editor.create_model(self.Migration)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/backends/base/schema.py", line 286, in create_model
zulip_1     |     self.execute(sql, params or None)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/backends/base/schema.py", line 111, in execute
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 62, in execute
zulip_1     |     return self.cursor.execute(sql)
zulip_1     |   File "/home/zulip/deployments/2015-10-25-16-12-27/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-10-25-16-12-27/zerver/lib/db.py", line 11, in wrapper_execute
zulip_1     |     return action(sql, params)
zulip_1     | django.db.utils.ProgrammingError: no schema has been selected to create in
zulip_1     | 
zulip_1     | Zulip first start init failed in "migrate --noinput". with exit code 0
zulip_zulip_1 exited with code 0

Zulip exited with code 1(stuck while waiting for DB connections)

Hi, I am not sure if the problem is with config but i am newbie to zulip and docker.

The docker-compose.yml is configured as below.

database:
  image: "galexrt/zulip-postgresql-tsearchextras:latest"
  environment:
    DB_NAME: zulip
    DB_USER: zulip
    DB_PASS: zulip
  volumes:
    - "/opt/docker/zulip/postgresql/data:/var/lib/postgresql:rw"
memcached:
  image: "sameersbn/memcached:latest"
  restart: always
rabbitmq:
  image: "rabbitmq:3.5.5"
  hostname: zulip-rabbit
  restart: always
  environment:
      RABBITMQ_DEFAULT_USER: "zulip"
      RABBITMQ_DEFAULT_PASS: "zulip"
redis:
  image: "sameersbn/redis:latest"
  volumes:
    - "/opt/docker/zulip/redis:/var/lib/redis:rw"
zulip:
  image: "galexrt/zulip:1.3.7-2"
  ports:
    - "8081:8080"
    - "8443:443"
  links:
    - database
    - memcached
    - rabbitmq
    - redis
  environment:
   ZULIP_SETTINGS_EXTERNAL_HOST: "domain.com"
   ZULIP_SETTINGS_ZULIP_ADMINISTRATOR: "[email protected]"
   ZULIP_SETTINGS_ADMIN_DOMAIN: "domain.com"
   ZULIP_SETTINGS_NOREPLY_EMAIL_ADDRESS: "[email protected]"
   ZULIP_SETTINGS_DEFAULT_FROM_EMAIL: "Zulip <[email protected]>"
   ZULIP_SETTINGS_EMAIL_HOST: "10.102.50.235"
   ZULIP_SETTINGS_EMAIL_HOST_USER: "testuser"
   ZULIP_SETTINGS_EMAIL_HOST_PASSWORD: "xxxx" 
   ZULIP_USER_EMAIL: "[email protected]"
   ZULIP_USER_PASS: "xxxx"
   ZULIP_USER_DOMAIN: "example.com"
  volumes:
    - "/opt/docker/zulip/zulip:/data:rw"

The part of the log file which highlights the problem is as follows.

zulip_1     | Setting database configuration ...
zulip_1     | Setting key "DATABASES", type "array".
zulip_1     | Database configuration succeeded.
zulip_1     | Setting caches configuration ...
zulip_1     | Setting key "CACHES", type "array".
zulip_1     | Caches configuration succeeded.
zulip_1     | Activating authentication backends ...
zulip_1     | Setting key "AUTHENTICATION_BACKENDS", type "array".
zulip_1     | Adding authentication backend "EmailAuthBackend".
zulip_1     | Authentication backend activation succeeded.
zulip_1     | Setting redis configuration ...
zulip_1     | Setting key "RATE_LIMITING", type "bool".
zulip_1     | Setting key "REDIS_HOST", type "string".
zulip_1     | Setting key "REDIS_HOST_PORT", type "int".
zulip_1     | Redis configuration succeeded.
zulip_1     | Setting rabbitmq configuration ...
zulip_1     | Setting key "RABBITMQ_HOST", type "string".
zulip_1     | Setting key "RABBITMQ_USERNAME", type "string".
zulip_1     | Rabbitmq configuration succeeded.
zulip_1     | Executing Zulip configuration ...
zulip_1     | Setting key "EMAIL_HOST_USER", type "string".
zulip_1     | Setting key "NOREPLY_EMAIL_ADDRESS", type "string".
zulip_1     | Setting key "EMAIL_HOST", type "string".
zulip_1     | Setting key "EXTERNAL_HOST", type "string".
zulip_1     | Setting key "EMAIL_HOST_PASSWORD", type "string".
zulip_1     | Setting key "ADMIN_DOMAIN", type "string".
zulip_1     | Setting key "DEFAULT_FROM_EMAIL", type "string".
zulip_1     | Setting key "ZULIP_ADMINISTRATOR", type "string".
zulip_1     | Zulip configuration succeeded.
zulip_1     | Auto backup enabled.
zulip_1     | === End Initial Configuration Phase ===
zulip_1     | === Begin Bootstrap Phase ===
zulip_1     | Waiting for database server to allow connections ...
zulip_1     | ...........................................................openstack_zulip_1 exited with code 1

Detailed log file is attached.

Kindly help in resolving the problem.

I am using the command sudo docker-compose up
docker-zulip.txt

User creation not working

But I meet another problem.
The 'forget password' email can't be sent.
I use the mailgun to send email, and it shows that zulip does not calling mailgun to send email.

Also, I can't login zulip by the ZULIP_USER_EMAIL and ZULIP_USER_PASSWORD, do I miss something?

This has to do with this script, that get's executed once "during" the initiation zulip-puppet/files/setupZulipUser.sh

Add documentation for upgradeing and data persistence

Hi,
I'm really interested to try this docker image on my 4GO VPS.

After installation of this image in production, is it easy to upgrade this image without any lost of data ? I see this is better to manage persistant file using volume .

Thanks for your help,
Best.
Sr

How to configure the docker-compose.yml?

First, I'm new at Docker. So, sorry for my dumb question.

  1. I have successfully installed Docker and got the container (docker pull quay.io/galexrt/zulip).
  2. Now, i should configure the docker-compose.yml before run the container. How? Where do i find the docker-compose.yml?

Thx for any help.

ERROR: permission denied to create extension "tsearch_extras"

I seem to have dug up another issue. I don't know very much about docker, perhaps the yml needs to be modified to grant root access in the zulip container?

STEPS TO REPRODUCE:

  • Stop and remove all docker containers.
  • Clone a fresh repository.
  • Make the following changes to docker-compose.yml
    • s/example.com/mydomain.org/g
    • Switch the ports from 80:80 -> 8080:80, and 443:443 -> 8443:443, to expose zulip on different host ports.
  • Run docker-compose up (as root)

VERSION INFO:

  • Docker version 1.8.3, build f4bf5c7
  • docker-compose version: 1.5.0rc1
  • Host System(I can't imagine this is relevant): Linux leviathan 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux

ERROR LINES:

zulip_1     | django.db.utils.InternalError: could not open dictionary file "/usr/share/postgresql/9.4/tsearch_data/en_us.dict": No such fil
e or directory
zulip_1     | 
zulip_1     | Zulip migration failed.
dockerzulip_zulip_1 exited with code 1

Probable Root Cause:

zulip_1     | ERROR:  permission denied to create extension "tsearch_extras"
zulip_1     | HINT:  Must be superuser to create this extension.

FULL ERROR OUTPUT:

zulip_1     | Setting up database settings and server ...
database_1  | 2015-10-22 02:00:06 UTC [84-1] zulip@zulip ERROR:  permission denied to create role
database_1  | 2015-10-22 02:00:06 UTC [84-2] zulip@zulip STATEMENT:  CREATE USER zulip;
zulip_1     | Waiting for database server to allow connectionsERROR:  permission denied to create role
zulip_1     | ALTER ROLE
database_1  | 2015-10-22 02:00:06 UTC [84-3] zulip@zulip ERROR:  database "zulip" already exists
database_1  | 2015-10-22 02:00:06 UTC [84-4] zulip@zulip STATEMENT:  CREATE DATABASE zulip OWNER=zulip;
database_1  | 2015-10-22 02:00:06 UTC [84-5] zulip@zulip ERROR:  schema "zulip" already exists
database_1  | 2015-10-22 02:00:06 UTC [84-6] zulip@zulip STATEMENT:  CREATE SCHEMA zulip AUTHORIZATION zulip;
zulip_1     | ERROR:  database "zulip" already exists
zulip_1     | ERROR:  schema "zulip" already exists
database_1  | 2015-10-22 02:00:06 UTC [85-1] zulip@zulip ERROR:  permission denied to create extension "tsearch_extras"
database_1  | 2015-10-22 02:00:06 UTC [85-2] zulip@zulip HINT:  Must be superuser to create this extension.
database_1  | 2015-10-22 02:00:06 UTC [85-3] zulip@zulip STATEMENT:  CREATE EXTENSION tsearch_extras SCHEMA zulip;
zulip_1     | ERROR:  permission denied to create extension "tsearch_extras"
zulip_1     | HINT:  Must be superuser to create this extension.
zulip_1     | Database setup done.
zulip_1     | Checking zulip config ...
zulip_1     | Starting zulip migration ...
zulip_1     | Operations to perform:
zulip_1     |   Synchronize unmigrated apps: staticfiles, pipeline
zulip_1     |   Apply all migrations: confirmation, sessions, guardian, zerver, sites, auth, contenttypes                           [37/385]
zulip_1     | Synchronizing apps without migrations:
zulip_1     |   Creating tables...
zulip_1     |     Running deferred SQL...
zulip_1     |   Installing custom SQL...
zulip_1     | Running migrations:
zulip_1     |   Rendering model states... DONE
database_1  | 2015-10-22 02:00:10 UTC [88-1] zulip@zulip ERROR:  could not open dictionary file "/usr/share/postgresql/9.4/tsearch_data/en_u
s.dict": No such file or directory
database_1  | 2015-10-22 02:00:10 UTC [88-2] zulip@zulip STATEMENT:  
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  |   CREATE FUNCTION escape_html(text) RETURNS text IMMUTABLE LANGUAGE 'sql' AS $$
database_1  |     SELECT replace(replace(replace(replace(replace($1, '&', '&amp;'), '<', '&lt;'),
database_1  |                                    '>', '&gt;'), '"', '&quot;'), '''', '&#39;');
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):                                                    [0/385]
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
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 "/usr/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 221, in handle
zulip_1     |     executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 110, in migrate
zulip_1     |     self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 148, in apply_migration
zulip_1     |     state = migration.apply(state, schema_editor)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/migration.py", line 115, in apply
zulip_1     |     operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/operations/special.py", line 102, in database_forwards
zulip_1     |     self._run_sql(schema_editor, self.sql)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/migrations/operations/special.py", line 127, in _run_sql
zulip_1     |     schema_editor.execute(statement, params=None)
zulip_1     |   File "/usr/lib/python2.7/dist-packages/django/db/backends/base/schema.py", line 111, in execute
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 62, in execute
zulip_1     |     return self.cursor.execute(sql)
zulip_1     |   File "/home/zulip/deployments/2015-10-21-23-07-49/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-10-21-23-07-49/zerver/lib/db.py", line 11, in wrapper_execute
zulip_1     |     return action(sql, params)
zulip_1     | django.db.utils.InternalError: could not open dictionary file "/usr/share/postgresql/9.4/tsearch_data/en_us.dict": No such fil
e or directory
zulip_1     | 
zulip_1     | Zulip migration failed.
dockerzulip_zulip_1 exited with code 1

"Hide" error, when it is no error: create extension "tsearch_extras"

database_1 | 2015-10-22 04:10:42 UTC [89-1] zulip@zulip ERROR:  permission denied to create extension "tsearch_extras"
database_1 | 2015-10-22 04:10:42 UTC [89-2] zulip@zulip HINT:  Must be superuser to create this extension.
database_1 | 2015-10-22 04:10:42 UTC [89-3] zulip@zulip STATEMENT:  CREATE EXTENSION tsearch_extras SCHEMA zulip;
zulip_1 | ERROR: permission denied to create extension "tsearch_extras"
zulip_1 | HINT: Must be superuser to create this extension.

Add an if or switch case to check if the postgres user is used to connect or if it is an option to add DB_ROOT_USER, ... for creationg of the extension.
See #22

dockerzulip_zulip_1 exited with code 1

Hello! I'm not sure whether this is a problem with the config, a problem with the documentation, or my own misunderstanding, but advice would be greatly appreciated :). (And thanks again for this repo!)

STEPS TO REPRODUCE:

  • Stop and remove all docker containers.
  • Clone a fresh repository.
  • Make the following changes to docker-compose.yml
    • s/example.com/mydomain.org/g
    • Switch the ports from 80:80 -> 8080:80, and 443:443 -> 8443:443, to expose zulip on different host ports.
  • Run docker-compose up (as root)

VERSION INFO:

  • Docker version 1.8.3, build f4bf5c7
  • docker-compose version: 1.5.0rc1
  • Host System(I can't imagine this is relevant): Linux leviathan 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux

ERROR LINES:

zulip_1 | subprocess.CalledProcessError: Command '['/home/zulip/deployments/current/bin/log-management-command', '/home/zulip/deployments/current/manage.py checkconfig']' returned non-zero exit status 1
dockerzulip_zulip_1 exited with code 1

FULL ERROR OUTPUT:

zulip_1 | Zulip settings setup done.
zulip_1 | Setting up database settings and server ...
database_1 | 2015-10-21 18:20:55 UTC [41-1] zulip@zulip ERROR: permission denied to create role
database_1 | 2015-10-21 18:20:55 UTC [41-2] zulip@zulip STATEMENT: CREATE USER zulip;
zulip_1 | Waiting for database server to allow connectionsERROR: permission denied to create role
zulip_1 | ALTER ROLE
database_1 | 2015-10-21 18:20:55 UTC [41-3] zulip@zulip ERROR: database "zulip" already exists
database_1 | 2015-10-21 18:20:55 UTC [41-4] zulip@zulip STATEMENT: CREATE DATABASE zulip OWNER=zulip;
zulip_1 | ERROR: database "zulip" already exists
database_1 | 2015-10-21 18:20:55 UTC [41-5] zulip@zulip ERROR: schema "zulip" already exists
zulip_1 | ERROR: schema "zulip" already exists
database_1 | 2015-10-21 18:20:55 UTC [41-6] zulip@zulip STATEMENT: CREATE SCHEMA zulip AUTHORIZATION zulip;
database_1 | 2015-10-21 18:20:55 UTC [42-1] zulip@zulip ERROR: permission denied to create extension "tsearch_extras" [16/338]
database_1 | 2015-10-21 18:20:55 UTC [42-2] zulip@zulip HINT: Must be superuser to create this extension.
database_1 | 2015-10-21 18:20:55 UTC [42-3] zulip@zulip STATEMENT: CREATE EXTENSION tsearch_extras SCHEMA zulip;
zulip_1 | ERROR: permission denied to create extension "tsearch_extras"
zulip_1 | HINT: Must be superuser to create this extension.
zulip_1 | Database setup done.
zulip_1 | Checking zulip config ...
zulip_1 | Traceback (most recent call last):
zulip_1 | File "/home/zulip/deployments/current/bin/log-management-command", line 10, in
zulip_1 | file_handler = logging.FileHandler(settings.MANAGEMENT_LOG_PATH)
zulip_1 | File "/usr/lib/python2.7/dist-packages/django/conf/init.py", line 48, in getattr
zulip_1 | self._setup(name)
zulip_1 | File "/usr/lib/python2.7/dist-packages/django/conf/init.py", line 44, in _setup
zulip_1 | self._wrapped = Settings(settings_module)
zulip_1 | File "/usr/lib/python2.7/dist-packages/django/conf/init.py", line 92, in init
zulip_1 | mod = importlib.import_module(self.SETTINGS_MODULE)
zulip_1 | File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
zulip_1 | import(name)
zulip_1 | File "/home/zulip/deployments/current/bin/../zproject/settings.py", line 31, in
zulip_1 | secrets_file.read("/etc/zulip/zulip-secrets.conf")
zulip_1 | File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
zulip_1 | self._read(fp, filename)
zulip_1 | File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
zulip_1 | raise MissingSectionHeaderError(fpname, lineno, line)
zulip_1 | ConfigParser.MissingSectionHeaderError: File contains no section headers.
zulip_1 | file: /etc/zulip/zulip-secrets.conf, line: 1
zulip_1 | "email_password = '12345'\n"
zulip_1 | Traceback (most recent call last):
zulip_1 | File "/home/zulip/deployments/current/manage.py", line 14, in
zulip_1 | " ".join(sys.argv)])
zulip_1 | File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
zulip_1 | raise CalledProcessError(retcode, cmd)
zulip_1 | subprocess.CalledProcessError: Command '['/home/zulip/deployments/current/bin/log-management-command', '/home/zulip/deployments/current/manage.py checkconfig']' returned non-zero exit status 1
dockerzulip_zulip_1 exited with code 1

Blank Login Page on Startup

screenshot 2015-10-22 at 6 22 20 pm

STEPS TO REPRODUCE:

  • Stop and remove all docker containers.
  • Clone a fresh repository.
  • Pull fresh images
    • docker pull quay.io/galexrt/zulip
    • docker pull quay.io/galexrt/zulip-postgresql-tsearchextras
  • Make the following changes to docker-compose.yml
    • s/example.com/mydomain.org/g
    • Switch the ports from 80:80 -> 8080:80, and 443:443 -> 8443:443, to expose zulip on different host ports.
  • Run docker-compose up -d (as root)
  • Go to main page, https://convox.org:8443
  • Login page doesn't work. (Nor does Register)

VERSION INFO:

  • Docker version 1.8.3, build f4bf5c7
  • docker-compose version: 1.5.0rc1
  • Host System(I can't imagine this is relevant): Linux leviathan 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux

LOGS:

  • I checked /var/log/zulip in the dockerzulip_zulip_1 container. Nothing in errors.log, and nothing suspicious in server.log. I can see my login requests, look normal:

2015-10-22 21:43:42,262 INFO 208.54.4.232 GET 301 1ms /login (unauth via ?)

2015-10-22 21:43:42,478 INFO 208.54.4.232 GET 200 47ms (db: 1ms/1q) /login/ (unauth via ?

Let me know if there's any particular log file that would be helpful.

Initializing database fails

What appears to be a SQL syntax error cascades into a barrage of errors citing fts_update_log

zulip_1     | 2015-11-06 23:23:36,863 INFO spawned: 'zulip-events-feedback_messages' with pid 258
database_1  | Initializing database...
database_1  | Creating user "zulip"...
database_1  | Creating database "zulip"...
database_1  | Granting access to database "zulip" for user "zulip"...
database_1  | 2015-11-06 23:09:44 UTC [80-1] ERROR:  syntax error at or near "'zulip'" at character 21
database_1  | 2015-11-06 23:09:44 UTC [80-2] STATEMENT:  ALTER USER postgres 'zulip';
database_1  |
database_1  | Starting PostgreSQL server...
database_1  | 2015-11-06 23:09:44 UTC [81-1] LOG:  database system was shut down at 2015-11-06 23:09:44 UTC
database_1  | 2015-11-06 23:09:44 UTC [81-2] LOG:  MultiXact member wraparound protections are now enabled
database_1  | 2015-11-06 23:09:44 UTC [85-1] LOG:  autovacuum launcher started
database_1  | 2015-11-06 23:09:44 UTC [1-1] LOG:  database system is ready to accept connections
zulip_1     | 2015-11-06 23:23:37,814 INFO success: zulip-django entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,814 INFO success: zulip-tornado entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,814 INFO success: process-fts-updates entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,814 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,814 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,814 INFO success: zulip-events-message_sender-4 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,814 INFO success: zulip-events-message_sender-0 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,814 INFO success: zulip-events-message_sender-1 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-message_sender-2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-message_sender-3 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-error_reports entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-user-presence entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-deliver-enqueued-emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-slowqueries entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-email_mirror entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-user-activity-interval entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-confirmation-emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-missedmessage_mobile_notifications entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-signups entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-digest_emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,815 INFO success: zulip-events-missedmessage_reminders entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,816 INFO success: zulip-events-user-activity entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1     | 2015-11-06 23:23:37,816 INFO success: zulip-events-feedback_messages entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
database_1  | 2015-11-06 23:23:38 UTC [88-1] zulip@zulip ERROR:  relation "fts_update_log" does not exist at character 28
database_1  | 2015-11-06 23:23:38 UTC [88-2] zulip@zulip STATEMENT:  SELECT id, message_id FROM fts_update_log;
zulip_1     | 2015-11-06 23:23:38,921 INFO exited: process-fts-updates (exit status 1; not expected)
zulip_1     | 2015-11-06 23:23:39,926 INFO spawned: 'process-fts-updates' with pid 281
zulip_1     | 2015-11-06 23:23:40,936 INFO success: process-fts-updates entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
database_1  | 2015-11-06 23:23:42 UTC [89-1] zulip@zulip ERROR:  relation "fts_update_log" does not exist at character 28
database_1  | 2015-11-06 23:23:42 UTC [89-2] zulip@zulip STATEMENT:  SELECT id, message_id FROM fts_update_log;
zulip_1     | 2015-11-06 23:23:42,217 INFO exited: process-fts-updates (exit status 1; not expected)
zulip_1     | 2015-11-06 23:23:43,220 INFO spawned: 'process-fts-updates' with pid 292
zulip_1     | 2015-11-06 23:23:44,223 INFO success: process-fts-updates entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
database_1  | 2015-11-06 23:23:45 UTC [91-1] zulip@zulip ERROR:  relation "fts_update_log" does not exist at character 28
database_1  | 2015-11-06 23:23:45 UTC [91-2] zulip@zulip STATEMENT:  SELECT id, message_id FROM fts_update_log;
zulip_1     | 2015-11-06 23:23:45,911 INFO exited: process-fts-updates (exit status 1; not expected)

The issue occurs with zulip:1.3.7 and zulip:1.3.7-1

The database definition in the compose file:

database:
  image: "quay.io/galexrt/zulip-postgresql-tsearchextras:latest"
  environment:
    DB_NAME: zulip
    DB_USER: zulip
    DB_PASS: zulip
  volumes:
    - "/opt/docker/zulip/postgresql/data:/var/lib/postgresql:rw"

Problem with smtp using tls or ssl

Hi @galexrt ,
Zulip involves the function of the smtp can not be normal use when I set it to use tls or ssl.
If I set ZULIP_SETTINGS_EMAIL_USE_SSL to False, it works well.

Below is the errors.log output in container:

2015-10-24 01:30:35,079 ERROR    Internal Server Error: /accounts/password/reset/
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/contrib/auth/views.py", line 182, in password_reset
    form.save(**opts)
  File "/usr/lib/python2.7/dist-packages/django/contrib/auth/forms.py", line 256, in save
    html_email_template_name=html_email_template_name)
  File "/usr/lib/python2.7/dist-packages/django/contrib/auth/forms.py", line 213, in send_mail
    email_message.send()
  File "/usr/lib/python2.7/dist-packages/django/core/mail/message.py", line 303, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/usr/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py", line 100, in send_messages
    new_conn_created = self.open()
  File "/usr/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py", line 58, in open
    self.connection = connection_class(self.host, self.port, **connection_params)
  File "/usr/lib/python2.7/smtplib.py", line 256, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python2.7/smtplib.py", line 317, in connect
    (code, msg) = self.getreply()
  File "/usr/lib/python2.7/smtplib.py", line 368, in getreply
    raise SMTPServerDisconnected("Connection unexpectedly closed")
SMTPServerDisconnected: Connection unexpectedly closed

Feature: Allow to disable HTTPS

I need to make a couple of changes that is not part of the main django configuration.
I was very glad to see the post-setup.d part in the entrypoint (https://github.com/Galexrt/docker-zulip/blob/master/entrypoint.sh#L474). But looks like the check there is wrong.
See;

    if [ "$(ls -A "$DATA_DIR/post-setup.d/")" ]; then
        echo "No post setup scripts found in \"$DATA_DIR/post-setup.d/\"."
        return 0
    fi

It is missing a not. And those 4 lines are not even necessary, since the loop below wont fire any script if it can't find any files.. Maybe these 4 lines should just be removed?

Database error: "zerver_realmfilter does not exist at character 146"

Hi @galexrt ,

Zulip can't work When I follow the below

You can add your certificate in the certs directory at the volumes mount point, for example by default > /opt/docker/zulip/zulip/, the certificates folder would be at /opt/docker/zulip/zulip/certs.

database'log output:

database_1 | 2015-10-23 03:22:52 UTC [10242-1] zulip@zulip ERROR:  relation "zerver_scheduledjob" does not exist at character 219
database_1 | 2015-10-23 03:22:52 UTC [10242-2] zulip@zulip STATEMENT:  SELECT "zerver_scheduledjob"."id", "zerver_scheduledjob"."scheduled_timestamp", "zerver_scheduledjob"."type", "zerver_scheduledjob"."data", "zerver_scheduledjob"."filter_id", "zerver_scheduledjob"."filter_string" FROM "zerver_scheduledjob" WHERE ("zerver_scheduledjob"."type" = 1 AND "zerver_scheduledjob"."scheduled_timestamp" <= '2015-10-23T03:22:52.077736-04:00'::timestamptz)
database_1 | 2015-10-23 03:22:52 UTC [10243-1] zulip@zulip ERROR:  relation "zerver_realmfilter" does not exist at character 146
database_1 | 2015-10-23 03:22:52 UTC [10243-2] zulip@zulip STATEMENT:  SELECT "zerver_realmfilter"."id", "zerver_realmfilter"."realm_id", "zerver_realmfilter"."pattern", "zerver_realmfilter"."url_format_string" FROM "zerver_realmfilter"
database_1 | 2015-10-23 03:22:52 UTC [10244-1] zulip@zulip ERROR:  relation "zerver_realmfilter" does not exist at character 146
database_1 | 2015-10-23 03:22:52 UTC [10244-2] zulip@zulip STATEMENT:  SELECT "zerver_realmfilter"."id", "zerver_realmfilter"."realm_id", "zerver_realmfilter"."pattern", "zerver_realmfilter"."url_format_string" FROM "zerver_realmfilter"
database_1 | 2015-10-23 03:22:52 UTC [10245-1] zulip@zulip ERROR:  relation "zerver_realmfilter" does not exist at character 146
database_1 | 2015-10-23 03:22:52 UTC [10245-2] zulip@zulip STATEMENT:  SELECT "zerver_realmfilter"."id", "zerver_realmfilter"."realm_id", "zerver_realmfilter"."pattern", "zerver_realmfilter"."url_format_string" FROM "zerver_realmfilter"

zulip's log output :

zulip_1 | 2015-10-23 03:00:52,901 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-message_sender-4 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-message_sender-0 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-message_sender-1 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-message_sender-2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-message_sender-3 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-error_reports entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-user-presence entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-deliver-enqueued-emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-slowqueries entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-email_mirror entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,902 INFO success: zulip-events-user-activity-interval entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,910 INFO success: zulip-events-confirmation-emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,910 INFO success: zulip-events-missedmessage_mobile_notifications entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,910 INFO success: zulip-events-signups entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,910 INFO success: zulip-events-digest_emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,910 INFO success: zulip-events-missedmessage_reminders entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,910 INFO success: zulip-events-user-activity entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:52,910 INFO success: zulip-events-feedback_messages entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-23 03:00:53,224 INFO exited: process-fts-updates (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:53,319 INFO exited: zulip-deliver-enqueued-emails (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:53,844 INFO spawned: 'zulip-deliver-enqueued-emails' with pid 362
zulip_1 | 2015-10-23 03:00:54,012 INFO exited: zulip-events-feedback_messages (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,033 INFO spawned: 'zulip-events-feedback_messages' with pid 363
zulip_1 | 2015-10-23 03:00:54,034 INFO exited: zulip-events-missedmessage_reminders (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,040 INFO spawned: 'zulip-events-missedmessage_reminders' with pid 364
zulip_1 | 2015-10-23 03:00:54,041 INFO exited: zulip-events-message_sender-4 (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,046 INFO spawned: 'zulip-events-message_sender-4' with pid 365
zulip_1 | 2015-10-23 03:00:54,048 INFO exited: zulip-events-message_sender-2 (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,077 INFO spawned: 'zulip-events-message_sender-2' with pid 366
zulip_1 | 2015-10-23 03:00:54,078 INFO exited: zulip-events-slowqueries (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,090 INFO spawned: 'zulip-events-slowqueries' with pid 368
zulip_1 | 2015-10-23 03:00:54,092 INFO exited: zulip-events-digest_emails (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,119 INFO spawned: 'zulip-events-digest_emails' with pid 369
zulip_1 | 2015-10-23 03:00:54,122 INFO exited: zulip-events-email_mirror (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,127 INFO spawned: 'zulip-events-email_mirror' with pid 371
zulip_1 | 2015-10-23 03:00:54,127 INFO exited: zulip-tornado (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,130 INFO spawned: 'zulip-tornado' with pid 372
zulip_1 | 2015-10-23 03:00:54,132 INFO exited: zulip-events-message_sender-3 (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,133 INFO exited: zulip-events-missedmessage_mobile_notifications (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,141 INFO spawned: 'zulip-events-message_sender-3' with pid 373
zulip_1 | 2015-10-23 03:00:54,144 INFO spawned: 'zulip-events-missedmessage_mobile_notifications' with pid 374
zulip_1 | 2015-10-23 03:00:54,158 INFO exited: zulip-events-error_reports (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,167 INFO spawned: 'zulip-events-error_reports' with pid 375
zulip_1 | 2015-10-23 03:00:54,168 INFO exited: zulip-events-user-activity (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,175 INFO spawned: 'zulip-events-user-activity' with pid 376
zulip_1 | 2015-10-23 03:00:54,176 INFO exited: zulip-events-user-presence (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,176 INFO exited: zulip-events-confirmation-emails (exit status 1; not expected)
zulip_1 | 2015-10-23 03:00:54,195 INFO spawned: 'zulip-events-user-presence' with pid 377
zulip_1 | 2015-10-23 03:00:54,197 INFO spawned: 'zulip-events-confirmation-emails' with pid 378
zulip_1 | 2015-10-23 03:00:54,201 INFO exited: zulip-events-message_sender-0 (exit status 1; not expected)

events-message_sender.log in container

Traceback (most recent call last):
  File "/home/zulip/deployments/current/manage.py", line 24, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 190, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 40, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/zulip/deployments/2015-10-22-19-21-40/zerver/management/commands/process_queue.py", line 6, in <module>
    from zerver.worker.queue_processors import get_worker
  File "/home/zulip/deployments/2015-10-22-19-21-40/zerver/worker/queue_processors.py", line 13, in <module>
    from zerver.lib.actions import do_send_confirmation_email, \
  File "/home/zulip/deployments/2015-10-22-19-21-40/zerver/lib/actions.py", line 41, in <module>
    from zerver.lib import bugdown
  File "/home/zulip/deployments/2015-10-22-19-21-40/zerver/lib/bugdown/__init__.py", line 1028, in <module>
    maybe_update_realm_filters(domain=None)
  File "/home/zulip/deployments/2015-10-22-19-21-40/zerver/lib/bugdown/__init__.py", line 1016, in maybe_update_realm_filters
    all_filters = all_realm_filters()
  File "/home/zulip/deployments/2015-10-22-19-21-40/zerver/models.py", line 260, in all_realm_filters
    for realm_filter in RealmFilter.objects.all():
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 162, in __iter__
    self._fetch_all()
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 977, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 238, in iterator
    results = compiler.execute_sql()
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 97, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "/home/zulip/deployments/2015-10-22-19-21-40/zerver/lib/db.py", line 23, in execute
    return wrapper_execute(self, super(TimeTrackingCursor, self).execute, query, vars)
  File "/home/zulip/deployments/2015-10-22-19-21-40/zerver/lib/db.py", line 11, in wrapper_execute
    return action(sql, params)
django.db.utils.ProgrammingError: relation "zerver_realmfilter" does not exist
LINE 1: ...n", "zerver_realmfilter"."url_format_string" FROM "zerver_re...

fts-updates.log in container

2015-10-23 03:00:51,534 INFO: process_fts_updates starting
2015-10-23 03:00:51,547 INFO: Not in recovery; listening for FTS updates
Traceback (most recent call last):
  File "/usr/local/bin/process_fts_updates", line 45, in <module>
    update_fts_columns(cursor)
  File "/usr/local/bin/process_fts_updates", line 9, in update_fts_columns
    cursor.execute("SELECT id, message_id FROM fts_update_log;")
psycopg2.ProgrammingError: relation "fts_update_log" does not exist
LINE 1: SELECT id, message_id FROM fts_update_log;
                                   ^

2015-10-23 03:00:53,212 INFO: process_fts_updates starting
2015-10-23 03:00:53,217 INFO: Not in recovery; listening for FTS updates
Traceback (most recent call last):
  File "/usr/local/bin/process_fts_updates", line 45, in <module>
    update_fts_columns(cursor)
  File "/usr/local/bin/process_fts_updates", line 9, in update_fts_columns
    cursor.execute("SELECT id, message_id FROM fts_update_log;")
psycopg2.ProgrammingError: relation "fts_update_log" does not exist
LINE 1: SELECT id, message_id FROM fts_update_log;
                                   ^

2015-10-23 03:00:55,697 INFO: process_fts_updates starting
2015-10-23 03:00:55,702 INFO: Not in recovery; listening for FTS updates
Traceback (most recent call last):
  File "/usr/local/bin/process_fts_updates", line 45, in <module>
    update_fts_columns(cursor)
  File "/usr/local/bin/process_fts_updates", line 9, in update_fts_columns
    cursor.execute("SELECT id, message_id FROM fts_update_log;")
psycopg2.ProgrammingError: relation "fts_update_log" does not exist
LINE 1: SELECT id, message_id FROM fts_update_log;
                                   ^

2015-10-23 03:00:59,131 INFO: process_fts_updates starting
2015-10-23 03:00:59,141 INFO: Not in recovery; listening for FTS updates
Traceback (most recent call last):
  File "/usr/local/bin/process_fts_updates", line 45, in <module>
    update_fts_columns(cursor)
  File "/usr/local/bin/process_fts_updates", line 9, in update_fts_columns
    cursor.execute("SELECT id, message_id FROM fts_update_log;")
psycopg2.ProgrammingError: relation "fts_update_log" does not exist
LINE 1: SELECT id, message_id FROM fts_update_log;

Clean up the whole container

This is the most important task right now, the clean up helps make the updates for new Zulip version much easier (and readable ๐Ÿ˜ƒ ).

  • Reformat the puppet manifests
  • Search and destory uneeded files
  • entrypoint.sh: Clean up the functions
  • entrypoint.sh: One big "run" function, with better seperation for example manage.py runs, etc.
  • entrypoint.sh:Test if it's still working, if not fix it!
  • Wait for fix in Galexrt/zulip-postgresql-tsearchextras
  • Release new container version (Branch: v1.3.7-1)

Related to issues #32, #35 and pull request #37.

Cannot configure ZULIP_SETTINGS_AUTH_LDAP_USER_SEARCH

When I configure it and try to login, zulip responds 500 Internal Server Error and logs as follows:

2015-11-17 01:28:41,380 ERROR    Internal Server Error: /accounts/login/
Traceback (most recent call last):
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/srv/zulip/zerver/views/__init__.py", line 634, in login_page
    extra_context=extra_context, **kwargs)
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/contrib/auth/views.py", line 44, in login
    if form.is_valid():
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/forms/forms.py", line 184, in is_valid
    return self.is_bound and not self.errors
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/forms/forms.py", line 176, in errors
    self.full_clean()
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/forms/forms.py", line 393, in full_clean
    self._clean_form()
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/forms/forms.py", line 417, in _clean_form
    cleaned_data = self.clean()
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/contrib/auth/forms.py", line 157, in clean
    password=password)
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 74, in authenticate
    user = backend.authenticate(**credentials)
  File "/srv/zulip/zproject/backends.py", line 162, in authenticate
    return ZulipLDAPAuthBackendBase.authenticate(self, username, password)
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 167, in authenticate
    user = ldap_user.authenticate(password)
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 337, in authenticate
    self._authenticate_user_dn(password)
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 447, in _authenticate_user_dn
    if self.dn is None:
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 411, in _get_user_dn
    self._load_user_dn()
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 474, in _load_user_dn
    self._search_for_user_dn()
  File "/srv/zulip-venv/local/lib/python2.7/site-packages/django_auth_ldap/backend.py", line 494, in _search_for_user_dn
    results = search.execute(self.connection, {'user': self._username})

It works fine when I set AUTH_LDAP_USER_SEARCH with the same value in /etc/zulip/settings.py.

Camo's service mandatory?

I can't see camo's reference in installation zulip documentation.
Could you document why did you included and his use?
Is optional?

Cannot search history message

From the error logs I saw

2015-11-10 08:13:48,575 ERROR    Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/decorator.py", line 85, in wrapper
    return func(request, *args, **kwargs)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/decorator.py", line 474, in _wrapped_view_func
    return view_func(request, *args, **kwargs)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/decorator.py", line 301, in _wrapped_view_func
    return authenticate_log_and_execute_json(request, view_func, *args, **kwargs)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/decorator.py", line 290, in authenticate_log_and_execute_json
    return view_func(request, user_profile, *args, **kwargs)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/views/messages.py", line 78, in json_get_old_messages
    return get_old_messages_backend(request, user_profile)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/decorator.py", line 474, in _wrapped_view_func
    return view_func(request, *args, **kwargs)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/views/messages.py", line 542, in get_old_messages_backend
    query_result = list(sa_conn.execute(query).fetchall())
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 662, in execute
    params)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 761, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 874, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1024, in _handle_dbapi_exception
    exc_info
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 196, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 867, in _execute_context
    context)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 324, in do_execute
    cursor.execute(statement, parameters)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/lib/db.py", line 23, in execute
    return wrapper_execute(self, super(TimeTrackingCursor, self).execute, query, vars)
  File "/home/zulip/deployments/2015-11-07-23-02-08/zerver/lib/db.py", line 11, in wrapper_execute
    return action(sql, params)
ProgrammingError: (ProgrammingError) function ts_match_locs_array(unknown, text, tsquery) does not exist
LINE 2: ...ECT message_id, flags, subject, rendered_content, ts_match_l...

HINT:  No function matches the given name and argument types. You might need to add explicit type casts. 'SELECT /* get_old_messages */ anon_1.message_id, anon_1.flags, anon_1.subject, anon_1.rendered_content, anon_1.content_matches, anon_1.subject_matches \nFROM (SELECT message_id, flags, subject, rendered_content, ts_match_locs_array(%(param_1)s, rendered_content, plainto_tsquery(%(param_2)s, %(param_3)s)) AS content_matches, ts_match_locs_array(%(param_4)s, escape_html(subject), plainto_tsquery(%(param_2)s, %(param_3)s)) AS subject_matches \nFROM zerver_usermessage JOIN zerver_message ON zerver_usermessage.message_id = zerver_message.id \nWHERE user_profile_id = %(param_5)s AND (search_tsvector @@ plainto_tsquery(%(param_2)s, %(param_3)s)) AND message_id <= %(message_id_1)s ORDER BY message_id DESC \n LIMIT %(param_6)s) AS anon_1 ORDER BY message_id ASC' {'param_5': 7, 'param_4': 'zulip.english_us_search', 'param_6': 100, 'param_1': 'zulip.english_us_search', 'param_3': u'dummy', 'param_2': 'zulip.english_us_search', 'message_id_1': 17}

Seems it is related with the tsearch. Not sure if we have this tsearch-extras dependency installed correctly or not. Does the search feature work well in your environment?

docker-compose up keeps running in foreground

With the latest image (1.3.7-2), after configuring docker-compose.yml, I managed to start a zulip instance successfully. Everything seems ok, I am able to login and register new user now. However, the containers keeps running in foreground after the docker-compose up command was issued. If I used ctrl +c to shutdown docker-compose, then all the containers will be stopped too. Any configuration to make the containers running in background ?

Error: unable to connect to node rabbit: nodedown

Hi, I met with some problem. The zulip fail to work.
And it's the logs.

zulip_1 | Deleting user "guest" ...
zulip_1 | Error: unable to connect to node rabbit@334a5e30e550: nodedown
zulip_1 |
zulip_1 | DIAGNOSTICS
zulip_1 | ===========
zulip_1 |
zulip_1 | nodes in question: [rabbit@334a5e30e550]
zulip_1 |
zulip_1 | hosts, their running nodes and ports:
zulip_1 | - 334a5e30e550: [{rabbitmqctl21,39997}]
zulip_1 |
zulip_1 | current node details:
zulip_1 | - node name: rabbitmqctl21@334a5e30e550
zulip_1 | - home dir: /var/lib/rabbitmq
zulip_1 | - cookie hash: VvBKmLVr1o2yQ4eeTognIQ==
zulip_1 |
zulip_1 | Creating user "zulip" ...
zulip_1 | Error: unable to connect to node rabbit@334a5e30e550: nodedown

ERROR: permission denied to create role

Hi ,
I still got the error when I use the zulip with 1.3.7 version.

Database log

Attaching to dockerzulip_database_1
database_1 | Initializing database...
database_1 | Creating user "zulip"...
database_1 | Creating database "zulip"...
database_1 | Granting access to database "zulip" for user "zulip"...
database_1 | Setting superuser password...
database_1 | Starting PostgreSQL server...
database_1 | 2015-10-22 04:10:14 UTC [81-1] LOG:  database system was shut down at 2015-10-22 04:10:14 UTC
database_1 | 2015-10-22 04:10:14 UTC [81-2] LOG:  MultiXact member wraparound protections are now enabled
database_1 | 2015-10-22 04:10:14 UTC [85-1] LOG:  autovacuum launcher started
database_1 | 2015-10-22 04:10:14 UTC [1-1] LOG:  database system is ready to accept connectionsdatabase_1 | 2015-10-22 04:10:42 UTC [88-1] zulip@zulip ERROR:  permission denied to create role
database_1 | 2015-10-22 04:10:42 UTC [88-2] zulip@zulip STATEMENT:  CREATE USER zulip;
database_1 | 2015-10-22 04:10:42 UTC [88-3] zulip@zulip ERROR:  database "zulip" already exists
database_1 | 2015-10-22 04:10:42 UTC [88-4] zulip@zulip STATEMENT:  CREATE DATABASE zulip OWNER=zulip;
database_1 | 2015-10-22 04:10:42 UTC [89-1] zulip@zulip ERROR:  permission denied to create extension "tsearch_extras"
database_1 | 2015-10-22 04:10:42 UTC [89-2] zulip@zulip HINT:  Must be superuser to create this extension.
database_1 | 2015-10-22 04:10:42 UTC [89-3] zulip@zulip STATEMENT:  CREATE EXTENSION tsearch_extras SCHEMA zulip;

zulip log

Attaching to dockerzulip_zulip_1
zulip_1 | Generating and setting secrets ...
zulip_1 | Generated Camo config file /etc/default/camo
zulip_1 | Generated /etc/zulip/zulip-secrets.conf with auto-generated secrets!
zulip_1 | Secret found for "email_password".
zulip_1 | No secret found for key "rabbitmq_password".
zulip_1 | No secret found for key "s3_key".
zulip_1 | No secret found for key "s3_secret_key".
zulip_1 | No secret found for key "android_gcm_api_key".
zulip_1 | No secret found for key "google_oauth2_client_secret".
zulip_1 | No secret found for key "dropbox_app_key".
zulip_1 | No secret found for key "mailchimp_api_key".
zulip_1 | No secret found for key "mandrill_api_key".
zulip_1 | No secret found for key "twitter_consumer_key".
zulip_1 | No secret found for key "twitter_consumer_secret".
zulip_1 | No secret found for key "twitter_access_token_key".
zulip_1 | No secret found for key "twitter_access_token_secret".
zulip_1 | Secrets generated and set.
zulip_1 | Setting Zulip settings ...
zulip_1 | Can't parse True or Right for ZULIP_AUTO_GENERATE_CERTS. Defaulting to True
zulip_1 | Certificates generation is true. Generating certificates ...
zulip_1 | Generating RSA private key, 4096 bit long modulus
zulip_1 | ................................................................................++
zulip_1 | ......................................................................................++
zulip_1 | e is 65537 (0x10001)
zulip_1 | writing RSA key
zulip_1 | Signature ok
zulip_1 | subject=/C=US/ST=Denial/L=Springfield/O=Dis/CN=192.168.1.207
zulip_1 | Getting Private key
zulip_1 | Certificates generation done.
zulip_1 | No authentication backend for key "EmailAuthBackend".
zulip_1 | No authentication backend for key "ZulipRemoteUserBackend".
zulip_1 | No authentication backend for key "GoogleMobileOauth2Backend".
zulip_1 | No authentication backend for key "ZulipLDAPAuthBackend".
zulip_1 | Setting key "EMAIL_HOST_USER" to value "192.168.1.203".
zulip_1 | Setting key "NOREPLY_EMAIL_ADDRESS" to value "[email protected]".
zulip_1 | Setting key "EMAIL_HOST" to value "192.168.1.203".
zulip_1 | Setting key "EXTERNAL_HOST" to value "192.168.1.207".
zulip_1 | Setting key "ADMIN_DOMAIN" to value "hyx.com".
zulip_1 | Setting key "DEFAULT_FROM_EMAIL" to value "Zulip <[email protected]>".
zulip_1 | Setting key "ZULIP_ADMINISTRATOR" to value "[email protected]".
zulip_1 | Zulip settings setup done.
zulip_1 | Configuring RabbitMQ ...
zulip_1 | RabbitMQ deleting user guest
zulip_1 | Deleting user "guest" ...
zulip_1 | RabbitMQ adding user zulip
zulip_1 | Creating user "zulip" ...
zulip_1 | RabbitMQ setting user tags "zulip"
zulip_1 | Setting tags for user "zulip" to [administrator] ...
zulip_1 | RabbitMQ setting permissions for user "zulip"
zulip_1 | Setting permissions for user "zulip" in vhost "/" ...
zulip_1 | RabbitMQ set permissions for user
zulip_1 | RabbitMQ configured.
zulip_1 | Setting up database settings and server ...
zulip_1 | Waiting for database server to allow connectionsERROR:  permission denied to create role
zulip_1 | ALTER ROLE
zulip_1 | ERROR:  database "zulip" already exists
zulip_1 | CREATE SCHEMA
zulip_1 | ERROR:  permission denied to create extension "tsearch_extras"
zulip_1 | HINT:  Must be superuser to create this extension.
zulip_1 | Database setup done.
zulip_1 | Checking zulip config ...
zulip_1 | Initiating  Database ...
zulip_1 | Migrating database ...
zulip_1 | Operations to perform:
zulip_1 |   Synchronize unmigrated apps: staticfiles, pipeline
zulip_1 |   Apply all migrations: confirmation, sessions, guardian, zerver, sites, auth, contenttypes
zulip_1 | Synchronizing apps without migrations:
zulip_1 |   Creating tables...
zulip_1 |     Running deferred SQL...
zulip_1 |   Installing custom SQL...
zulip_1 | Running migrations:
zulip_1 |   Rendering model states... DONE
zulip_1 |   Applying contenttypes.0001_initial... OK
zulip_1 |   Applying contenttypes.0002_remove_content_type_name... OK
zulip_1 |   Applying auth.0001_initial... OK
zulip_1 |   Applying auth.0002_alter_permission_name_max_length... OK
zulip_1 |   Applying auth.0003_alter_user_email_max_length... OK
zulip_1 |   Applying auth.0004_alter_user_username_opts... OK
zulip_1 |   Applying auth.0005_alter_user_last_login_null... OK
zulip_1 |   Applying auth.0006_require_contenttypes_0002... OK
zulip_1 |   Applying confirmation.0001_initial... OK
0zulip_1 |   Applying zerver.0001_initial... OK
zulip_1 |   Applying guardian.0001_initial... OK
zulip_1 |   Applying sessions.0001_initial... OK
zulip_1 |   Applying sites.0001_initial... OK
zulip_1 |   Applying zerver.0002_django_1_8... OK
zulip_1 |   Applying zerver.0003_custom_indexes... OK
zulip_1 |   Applying zerver.0004_userprofile_left_side_userlist... OK
zulip_1 |   Applying zerver.0005_auto_20150920_1340... OK
zulip_1 | Creating cache and third_party_api_results table ...
zulip_1 | Initializing Voyager database ...
zulip_1 | 2015-10-22 00:11:00,685 INFO     SimpleQueueClient connected (connecting took 0.048s)
zulip_1 | Successfully populated database with initial data.
zulip_1 | Database initiated.
zulip_1 | 
zulip_1 | Starting zulip migration ...
zulip_1 | Operations to perform:
zulip_1 |   Synchronize unmigrated apps: staticfiles, pipeline
zulip_1 |   Apply all migrations: confirmation, sessions, guardian, zerver, sites, auth, contenttypes
zulip_1 | Synchronizing apps without migrations:
zulip_1 |   Creating tables...
zulip_1 |     Running deferred SQL...
zulip_1 |   Installing custom SQL...
zulip_1 | Running migrations:
zulip_1 |   No migrations to apply.
zulip_1 |   Your models have changes that are not yet reflected in a migration, and so won't be applied.
zulip_1 |   Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
zulip_1 | Zulip migration done.
zulip_1 | Starting zulip using supervisor ...
zulip_1 | /usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working 
directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
zulip_1 |   'Supervisord is running as root and it is searching '
zulip_1 | 2015-10-22 04:11:02,160 CRIT Supervisor running as root (no user in config file)
zulip_1 | 2015-10-22 04:11:02,160 WARN Included extra file "/etc/supervisor/conf.d/zulip.conf" during parsing
zulip_1 | 2015-10-22 04:11:02,160 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
zulip_1 | 2015-10-22 04:11:02,160 WARN Included extra file "/etc/supervisor/conf.d/zulip_postsetup.conf" during parsing
zulip_1 | 2015-10-22 04:11:02,160 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing
zulip_1 | 2015-10-22 04:11:02,160 WARN Included extra file "/etc/supervisor/conf.d/zulip_db.conf" during parsing
zulip_1 | 2015-10-22 04:11:02,163 INFO Creating socket unix:///home/zulip/deployments/fastcgi-socket
zulip_1 | 2015-10-22 04:11:02,163 INFO Closing socket unix:///home/zulip/deployments/fastcgi-socket
zulip_1 | 2015-10-22 04:11:02,192 INFO RPC interface 'supervisor' initialized
zulip_1 | 2015-10-22 04:11:02,192 CRIT Server 'unix_http_server' running without any HTTP authentication checking
zulip_1 | 2015-10-22 04:11:02,192 INFO supervisord started with pid 1
zulip_1 | 2015-10-22 04:11:03,194 INFO Creating socket unix:///home/zulip/deployments/fastcgi-socket
zulip_1 | 2015-10-22 04:11:03,195 INFO spawned: 'zulip-django' with pid 299
zulip_1 | 2015-10-22 04:11:03,198 INFO spawned: 'zulip-tornado' with pid 300
zulip_1 | 2015-10-22 04:11:03,200 INFO spawned: 'process-fts-updates' with pid 301
zulip_1 | 2015-10-22 04:11:03,202 INFO spawned: 'zulip-events-message_sender-4' with pid 302
zulip_1 | 2015-10-22 04:11:03,204 INFO spawned: 'zulip-events-message_sender-0' with pid 303
zulip_1 | 2015-10-22 04:11:03,207 INFO spawned: 'zulip-events-message_sender-1' with pid 304
zulip_1 | 2015-10-22 04:11:03,209 INFO spawned: 'zulip-events-message_sender-2' with pid 305
zulip_1 | 2015-10-22 04:11:03,210 INFO spawned: 'zulip-events-message_sender-3' with pid 306
zulip_1 | 2015-10-22 04:11:03,212 INFO spawned: 'cron' with pid 307
zulip_1 | 2015-10-22 04:11:03,214 INFO spawned: 'nginx' with pid 308
zulip_1 | 2015-10-22 04:11:03,216 INFO spawned: 'zulip-postsetup-create_user' with pid 309
zulip_1 | 2015-10-22 04:11:03,218 INFO spawned: 'zulip-events-error_reports' with pid 310
zulip_1 | 2015-10-22 04:11:03,220 INFO spawned: 'zulip-events-user-presence' with pid 311
zulip_1 | 2015-10-22 04:11:03,222 INFO spawned: 'zulip-deliver-enqueued-emails' with pid 312
zulip_1 | 2015-10-22 04:11:03,224 INFO spawned: 'zulip-events-slowqueries' with pid 313
zulip_1 | 2015-10-22 04:11:03,232 INFO spawned: 'zulip-events-email_mirror' with pid 314
zulip_1 | 2015-10-22 04:11:03,234 INFO spawned: 'zulip-events-user-activity-interval' with pid 315
zulip_1 | 2015-10-22 04:11:03,239 INFO spawned: 'zulip-events-confirmation-emails' with pid 316
zulip_1 | 2015-10-22 04:11:03,250 INFO spawned: 'zulip-events-missedmessage_mobile_notifications' with pid 317
zulip_1 | 2015-10-22 04:11:03,253 INFO spawned: 'zulip-events-signups' with pid 318
zulip_1 | 2015-10-22 04:11:03,261 INFO spawned: 'zulip-events-digest_emails' with pid 319
zulip_1 | 2015-10-22 04:11:03,263 INFO spawned: 'zulip-events-missedmessage_reminders' with pid 320
zulip_1 | 2015-10-22 04:11:03,271 INFO spawned: 'zulip-events-user-activity' with pid 321
zulip_1 | 2015-10-22 04:11:03,277 INFO spawned: 'zulip-events-feedback_messages' with pid 322
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-django entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-tornado entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: process-fts-updates entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-events-message_sender-4 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-events-message_sender-0 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-events-message_sender-1 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-events-message_sender-2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-events-message_sender-3 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-postsetup-create_user entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-events-error_reports entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-events-user-presence entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,691 INFO success: zulip-deliver-enqueued-emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-slowqueries entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-email_mirror entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-user-activity-interval entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-confirmation-emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-missedmessage_mobile_notifications entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-signups entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-digest_emails entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-missedmessage_reminders entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-user-activity entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:04,692 INFO success: zulip-events-feedback_messages entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
zulip_1 | 2015-10-22 04:11:14,155 INFO exited: zulip-postsetup-create_user (exit status 200; expected)

Create friendlier README.md

If anyone has some ideas on making the README.md look friendlier and show a bit more info, I'll be thankful for any pull requests. :)

LDAP backend doesn't work

Looks like there are some problems with LDAP integration, I can't login to Zulip based on LDAP.

docker-compose part:

  • ZULIP_AUTH_BACKENDS=ZulipLDAPAuthBackend
  • ZULIP_SETTINGS_AUTH_LDAP_SERVER_URI=XXX
  • ZULIP_SETTINGS_AUTH_LDAP_USER_SEARCH=LDAPSearch("XXX",ldap.SCOPE_SUBTREE, "(mail=%(user)s)")
  • ZULIP_SETTINGS_AUTH_LDAP_APPEND_DOMAIN=None

What kind of log are needed for debugging?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.