And in /home/zulip/deployments/current/zprojects/settings.py
MIDDLEWARE = (
With the exception of it's dependencies,
# our logging middleware should be the top middleware item.
'zerver.middleware.TagRequests',
'zerver.middleware.SetRemoteAddrFromForwardedFor',
'zerver.middleware.LogRequests',
'zerver.middleware.JsonErrorHandler',
'zerver.middleware.RateLimitMiddleware',
'zerver.middleware.FlushDisplayRecipientCache',
'django.middleware.common.CommonMiddleware',
'zerver.middleware.SessionHostDomainMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', # Django-crowd-auth 0.8.0
# Make sure 2FA middlewares come after authentication middleware.
'django_otp.middleware.OTPMiddleware', # Required by Two Factor auth.
'two_factor.middleware.threadlocals.ThreadLocals', # Required by Twilio
# Needs to be after CommonMiddleware, which sets Content-Length
'zerver.middleware.FinalizeOpenGraphDescription',
But the server never really starts. And uWSGI throws the following error:
Starting uWSGI 2.0.17.1 (64bit) on [Thu Aug 8 16:39:23 2019]
compiled with version: 6.3.0 20170516 on 25 July 2019 12:43:05
os: Linux-4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u4 (2019-07-19)
nodename: zulip
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /home/zulip/deployments/2019-07-25-15-25-59
detected binary path: /srv/zulip-venv-cache/e1eb6592bce842070114364c4b6387c63e4c43d9/zulip-py3-venv/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
chdir() to /home/zulip/deployments/current/
your processes number limit is 7857
your memory page size is 4096 bytes
detected max file descriptor number: 40000
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /home/zulip/deployments/uwsgi-socket fd 3
Python version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516]
Python threads support is disabled. You can enable it with --enable-threads
Python main interpreter initialized at 0x559afdad2970
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 426040 bytes (416 KB) for 4 cores
Operational MODE: preforking
Traceback (most recent call last):
File "./zproject/wsgi.py", line 25, in
django.setup() # We need to call setup to load applications.
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/srv/zulip-venv-cache/e1eb6592bce842070114364c4b6387c63e4c43d9/zulip-py3-venv/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named 'django_crowd_auth'
unable to load app 0 (mountpoint='') (callable not found or import error)
no app loaded. going in full dynamic mode uWSGI is running in multiple interpreter mode
spawned uWSGI master process (pid: 30043)
spawned uWSGI worker 1 (pid: 30047, cores: 1)
spawned uWSGI worker 2 (pid: 30048, cores: 1)
spawned uWSGI worker 3 (pid: 30049, cores: 1)
spawned uWSGI worker 4 (pid: 30050, cores: 1)
We tried to include this into our zulip instance but we keep getting Internal Server Errors.
In the file /etc/zulip/settings.py we made the following changes:
AUTHENTICATION_BACKENDS = ( django_crowd_auth.backends.Backend
'zproject.backends.EmailAuthBackend', # Email and password; just requires SMTP setup
)
CROWD_CLIENT = { 'crowd_url': 'https://crowd.foo.bar', 'app_name': 'foo', 'app_pass': 'bar', 'ssl_verify': '/etc/pki/tls/certs/ca-bundle.crt', 'timeout': 10, } CROWD_USERS_ARE_STAFF = True
And in /home/zulip/deployments/current/zprojects/settings.py
MIDDLEWARE = (
With the exception of it's dependencies,
)
INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.staticfiles', 'django_crowd_auth', #django-crowd-auth 0.8.0 'confirmation', 'pipeline', 'webpack_loader', 'zerver', 'social_django',
2FA related apps.
]
We are using Python 3.5 and installed with pip3.
But the server never really starts. And uWSGI throws the following error:
Starting uWSGI 2.0.17.1 (64bit) on [Thu Aug 8 16:39:23 2019] compiled with version: 6.3.0 20170516 on 25 July 2019 12:43:05 os: Linux-4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u4 (2019-07-19) nodename: zulip machine: x86_64 clock source: unix detected number of CPU cores: 4 current working directory: /home/zulip/deployments/2019-07-25-15-25-59 detected binary path: /srv/zulip-venv-cache/e1eb6592bce842070114364c4b6387c63e4c43d9/zulip-py3-venv/bin/uwsgi !!! no internal routing support, rebuild with pcre support !!! chdir() to /home/zulip/deployments/current/ your processes number limit is 7857 your memory page size is 4096 bytes detected max file descriptor number: 40000 lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) uwsgi socket 0 bound to UNIX address /home/zulip/deployments/uwsgi-socket fd 3 Python version: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] Python threads support is disabled. You can enable it with --enable-threads Python main interpreter initialized at 0x559afdad2970 your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 426040 bytes (416 KB) for 4 cores Operational MODE: preforking Traceback (most recent call last): File "./zproject/wsgi.py", line 25, in
django.setup() # We need to call setup to load applications.
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/zulip/deployments/2019-07-25-15-25-59/zulip-py3-venv/lib/python3.5/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/srv/zulip-venv-cache/e1eb6592bce842070114364c4b6387c63e4c43d9/zulip-py3-venv/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named 'django_crowd_auth'
unable to load app 0 (mountpoint='') (callable not found or import error)
no app loaded. going in full dynamic mode
uWSGI is running in multiple interpreter mode
spawned uWSGI master process (pid: 30043)
spawned uWSGI worker 1 (pid: 30047, cores: 1)
spawned uWSGI worker 2 (pid: 30048, cores: 1)
spawned uWSGI worker 3 (pid: 30049, cores: 1)
spawned uWSGI worker 4 (pid: 30050, cores: 1)
Can Someone help us?