Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when restarting after editing /etc/zulip/zulip.conf #399

Open
kevvvinyao opened this issue Mar 30, 2023 · 3 comments
Open

Error when restarting after editing /etc/zulip/zulip.conf #399

kevvvinyao opened this issue Mar 30, 2023 · 3 comments

Comments

@kevvvinyao
Copy link

I installed zulip via docker.
I want to put my zulip application behind a reverse proxy, following the document on https://zulip.readthedocs.io/en/stable/production/deployment.html#putting-the-zulip-application-behind-a-reverse-proxy
Therefore, I edited /etc/zulip/zulip.conf according to the tutorial. Then I run /home/zulip/deployments/current/scripts/zulip-puppet-apply and input y so that the changes will be applied.
However, when I wanted to restart the zulip server, error occured.
Below is my command to restart the zulip server:

su zulip -c '/home/zulip/deployments/current/scripts/restart-server'

Below is output:

root@7ca519b88979:~# su zulip -c '/home/zulip/deployments/current/scripts/restart-server'
2023-03-30 13:41:29,621 restart-server: Running syntax and database checks
Traceback (most recent call last):
  File "./manage.py", line 145, in <module>
    log_management_command(sys.argv, settings.MANAGEMENT_LOG_PATH)
  File "/srv/zulip-venv-cache/b2cdd20dd55ad18cd1e512082a3ec530e6b6ece9/zulip-py3-venv/lib/python3.8/site-packages/django/conf/__init__.py", line 92, in __getattr__
    self._setup(name)
  File "/srv/zulip-venv-cache/b2cdd20dd55ad18cd1e512082a3ec530e6b6ece9/zulip-py3-venv/lib/python3.8/site-packages/django/conf/__init__.py", line 79, in _setup
    self._wrapped = Settings(settings_module)
  File "/srv/zulip-venv-cache/b2cdd20dd55ad18cd1e512082a3ec530e6b6ece9/zulip-py3-venv/lib/python3.8/site-packages/django/conf/__init__.py", line 190, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/zulip/deployments/2023-01-23-18-51-59/zproject/settings.py", line 27, in <module>
    from .computed_settings import *  # noqa: F403 isort: skip
  File "/home/zulip/deployments/2023-01-23-18-51-59/zproject/computed_settings.py", line 75, in <module>
    SECRET_KEY = get_mandatory_secret("secret_key")
  File "/home/zulip/deployments/2023-01-23-18-51-59/zproject/config.py", line 50, in get_mandatory_secret
    raise ZulipSettingsError(f'Mandatory secret "{key}" is not set')
zproject.config.ZulipSettingsError: Mandatory secret "secret_key" is not set
Traceback (most recent call last):
  File "/home/zulip/deployments/current/scripts/restart-server", line 47, in <module>
    subprocess.check_call(["./manage.py", "check", "--database", "default"])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['./manage.py', 'check', '--database', 'default']' returned non-zero exit status 1.

I do not understand at all.
Then I tried re-install and start all over again, finding that: If I do not edit /etc/zulip/zulip.conf, the restart command could be run normally; If I edit /etc/zulip/zulip.conf, the restart command output error logs above.
I have no idea about why that happened.

@keithdanielll
Copy link

keithdanielll commented Apr 21, 2023

Same here after I edited the emailsettings according to https://zulip.readthedocs.io/en/latest/production/email.html (and it is not even docker)

@fyrfli
Copy link

fyrfli commented Sep 5, 2023

same here ... editing to add in the allowed ips though (i am running behind a reverse proxy).

@peracchi
Copy link

Same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants