[GH-ISSUE #1566] error after first login #1233

Closed
opened 2026-02-27 11:16:00 +03:00 by kerem · 11 comments
Owner

Originally created by @CHazz on GitHub (Sep 8, 2018).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1566

hi i have problem after install :

Request Method: POST
https://xxxxxxxxx/accounts/login/
1.11.15
AttributeError
'NoneType' object has no attribute 'parameters'
/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/parameters/tools.py in get_global_parameter, line 186
/usr/bin/uwsgi-core
2.7.12
['.', '', '/srv/modoboa/env/lib/python2.7', '/srv/modoboa/env/lib/python2.7/plat-x86_64-linux-gnu', '/srv/modoboa/env/lib/python2.7/lib-tk', '/srv/modoboa/env/lib/python2.7/lib-old', '/srv/modoboa/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/modoboa/env/local/lib/python2.7/site-packages']
so, 8 Zář 2018 14:24:32 +0200

Environment:

Request Method: POST
Request URL: https://mail.xxxxxxx/accounts/login/

Django Version: 1.11.15
Python Version: 2.7.12
Installed Applications:
(u'django.contrib.auth',
u'django.contrib.contenttypes',
u'django.contrib.sessions',
u'django.contrib.messages',
u'django.contrib.sites',
u'django.contrib.staticfiles',
u'reversion',
u'ckeditor',
u'ckeditor_uploader',
u'rest_framework',
u'rest_framework.authtoken',
u'modoboa',
u'modoboa.core',
u'modoboa.lib',
u'modoboa.admin',
u'modoboa.transport',
u'modoboa.relaydomains',
u'modoboa.limits',
u'modoboa.parameters',
u'modoboa_amavis',
u'modoboa_pdfcredentials',
u'modoboa_postfix_autoreply',
u'modoboa_sievefilters',
u'modoboa_stats',
u'modoboa_webmail',
u'modoboa_contacts',
u'modoboa_radicale',
'webpack_loader')
Installed Middleware:
(u'x_forwarded_for.middleware.XForwardedForMiddleware',
u'django.contrib.sessions.middleware.SessionMiddleware',
u'django.middleware.common.CommonMiddleware',
u'django.middleware.csrf.CsrfViewMiddleware',
u'django.contrib.auth.middleware.AuthenticationMiddleware',
u'django.contrib.messages.middleware.MessageMiddleware',
u'django.middleware.locale.LocaleMiddleware',
u'django.middleware.clickjacking.XFrameOptionsMiddleware',
u'modoboa.core.middleware.LocalConfigMiddleware',
u'modoboa.lib.middleware.AjaxLoginRedirect',
u'modoboa.lib.middleware.CommonExceptionCatcher',
u'modoboa.lib.middleware.RequestCatcherMiddleware')

Traceback:

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner
185. return func(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner
185. return func(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/views/auth.py" in dologin
34. password=form.cleaned_data["password"])

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/auth/init.py" in authenticate
70. user = _authenticate_with_backend(backend, backend_path, request, credentials)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/auth/init.py" in _authenticate_with_backend
116. return backend.authenticate(*args, **credentials)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/auth/backends.py" in authenticate
22. UserModel().set_password(password)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/models.py" in set_password
123. self.password = self._crypt_password(raw_value)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/models.py" in _crypt_password
103. "password_scheme", raise_exception=False)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/parameters/tools.py" in get_global_parameter
186. return get_localconfig().parameters.get_value(name, app=app, **kwargs)

Exception Type: AttributeError at /accounts/login/
Exception Value: 'NoneType' object has no attribute 'parameters'

thanks for help

Originally created by @CHazz on GitHub (Sep 8, 2018). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1566 hi i have problem after install : Request Method: | POST -- | -- https://xxxxxxxxx/accounts/login/ 1.11.15 AttributeError 'NoneType' object has no attribute 'parameters' /srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/parameters/tools.py in get_global_parameter, line 186 /usr/bin/uwsgi-core 2.7.12 ['.', '', '/srv/modoboa/env/lib/python2.7', '/srv/modoboa/env/lib/python2.7/plat-x86_64-linux-gnu', '/srv/modoboa/env/lib/python2.7/lib-tk', '/srv/modoboa/env/lib/python2.7/lib-old', '/srv/modoboa/env/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/modoboa/env/local/lib/python2.7/site-packages'] so, 8 Zář 2018 14:24:32 +0200 Environment: Request Method: POST Request URL: https://mail.xxxxxxx/accounts/login/ Django Version: 1.11.15 Python Version: 2.7.12 Installed Applications: (u'django.contrib.auth', u'django.contrib.contenttypes', u'django.contrib.sessions', u'django.contrib.messages', u'django.contrib.sites', u'django.contrib.staticfiles', u'reversion', u'ckeditor', u'ckeditor_uploader', u'rest_framework', u'rest_framework.authtoken', u'modoboa', u'modoboa.core', u'modoboa.lib', u'modoboa.admin', u'modoboa.transport', u'modoboa.relaydomains', u'modoboa.limits', u'modoboa.parameters', u'modoboa_amavis', u'modoboa_pdfcredentials', u'modoboa_postfix_autoreply', u'modoboa_sievefilters', u'modoboa_stats', u'modoboa_webmail', u'modoboa_contacts', u'modoboa_radicale', 'webpack_loader') Installed Middleware: (u'x_forwarded_for.middleware.XForwardedForMiddleware', u'django.contrib.sessions.middleware.SessionMiddleware', u'django.middleware.common.CommonMiddleware', u'django.middleware.csrf.CsrfViewMiddleware', u'django.contrib.auth.middleware.AuthenticationMiddleware', u'django.contrib.messages.middleware.MessageMiddleware', u'django.middleware.locale.LocaleMiddleware', u'django.middleware.clickjacking.XFrameOptionsMiddleware', u'modoboa.core.middleware.LocalConfigMiddleware', u'modoboa.lib.middleware.AjaxLoginRedirect', u'modoboa.lib.middleware.CommonExceptionCatcher', u'modoboa.lib.middleware.RequestCatcherMiddleware') Traceback: File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner 41. response = get_response(request) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner 185. return func(*args, **kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner 185. return func(*args, **kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/views/auth.py" in dologin 34. password=form.cleaned_data["password"]) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in authenticate 70. user = _authenticate_with_backend(backend, backend_path, request, credentials) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in _authenticate_with_backend 116. return backend.authenticate(*args, **credentials) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/contrib/auth/backends.py" in authenticate 22. UserModel().set_password(password) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/models.py" in set_password 123. self.password = self._crypt_password(raw_value) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/core/models.py" in _crypt_password 103. "password_scheme", raise_exception=False) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/parameters/tools.py" in get_global_parameter 186. return get_localconfig().parameters.get_value(name, app=app, **kwargs) Exception Type: AttributeError at /accounts/login/ Exception Value: 'NoneType' object has no attribute 'parameters' thanks for help
kerem 2026-02-27 11:16:00 +03:00
Author
Owner

@CHazz commented on GitHub (Sep 8, 2018):

after full reinstall same error

<!-- gh-comment-id:419658563 --> @CHazz commented on GitHub (Sep 8, 2018): after full reinstall same error
Author
Owner

@tonioo commented on GitHub (Sep 11, 2018):

@CHazz How did you install modoboa?

<!-- gh-comment-id:420244385 --> @tonioo commented on GitHub (Sep 11, 2018): @CHazz How did you install modoboa?
Author
Owner

@CHazz commented on GitHub (Sep 11, 2018):

with the installer does not report any error even in debug mode

<!-- gh-comment-id:420300369 --> @CHazz commented on GitHub (Sep 11, 2018): with the installer does not report any error even in debug mode
Author
Owner

@tonioo commented on GitHub (Sep 11, 2018):

On which linux distribution?

<!-- gh-comment-id:420307890 --> @tonioo commented on GitHub (Sep 11, 2018): On which linux distribution?
Author
Owner

@CHazz commented on GitHub (Sep 11, 2018):

ubuntu server 16.04 amd64

<!-- gh-comment-id:420312847 --> @CHazz commented on GitHub (Sep 11, 2018): ubuntu server 16.04 amd64
Author
Owner

@tonioo commented on GitHub (Sep 11, 2018):

With default user or new one?

<!-- gh-comment-id:420322809 --> @tonioo commented on GitHub (Sep 11, 2018): With default user or new one?
Author
Owner

@CHazz commented on GitHub (Sep 11, 2018):

new sudoer but from begining (trying with SU but nothing change)

<!-- gh-comment-id:420357493 --> @CHazz commented on GitHub (Sep 11, 2018): new sudoer but from begining (trying with SU but nothing change)
Author
Owner

@tonioo commented on GitHub (Sep 11, 2018):

I'm talking about the modoboa user. I've tried a fresh install on a Ubuntu 16.04 VM and it works fine... I don't understand what's happening.

<!-- gh-comment-id:420374782 --> @tonioo commented on GitHub (Sep 11, 2018): I'm talking about the modoboa user. I've tried a fresh install on a Ubuntu 16.04 VM and it works fine... I don't understand what's happening.
Author
Owner

@CHazz commented on GitHub (Sep 11, 2018):

i also do not know :( i tried to upgrade python .. delete users and groups .. delete everything what the modoba installer create .. even copy data from the functional server with modoboa .. and still this error :(
absolute reinstall i can not afford .. just rsync backup to the moment before installing modoboa,

<!-- gh-comment-id:420391349 --> @CHazz commented on GitHub (Sep 11, 2018): i also do not know :( i tried to upgrade python .. delete users and groups .. delete everything what the modoba installer create .. even copy data from the functional server with modoboa .. and still this error :( absolute reinstall i can not afford .. just rsync backup to the moment before installing modoboa,
Author
Owner

@tonioo commented on GitHub (Sep 16, 2018):

@CHazz Can you try to run this command:

/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py migrate

And retry to login?

<!-- gh-comment-id:421790234 --> @tonioo commented on GitHub (Sep 16, 2018): @CHazz Can you try to run this command: ```shell /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py migrate ``` And retry to login?
Author
Owner

@CHazz commented on GitHub (Sep 17, 2018):

hi, thank you very much, but I will not try again .. I reinstalled completely the server in the meantime and this is how it is solved .. now it is finally functional :) obviously it was some older configuration what the installer did not overwrite

<!-- gh-comment-id:422105211 --> @CHazz commented on GitHub (Sep 17, 2018): hi, thank you very much, but I will not try again .. I reinstalled completely the server in the meantime and this is how it is solved .. now it is finally functional :) obviously it was some older configuration what the installer did not overwrite
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1233
No description provided.