-
Notifications
You must be signed in to change notification settings - Fork 14
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
Can't open quarantine after upgrade from 1.9.0 to 1.10.1 #108
Comments
From @fyfe on January 29, 2018 17:22 In # A list of all the people who get code error notifications. When DEBUG=False
# and a view raises an exception, Django will email these people with the full
# exception information.
# See https://docs.djangoproject.com/en/dev/ref/settings/#admins
ADMINS = [('Administrator', '[email protected]')]
# The email address that error messages come from, such as those sent to ADMINS
SERVER_EMAIL = '[email protected]' |
From @lmfrazao on January 29, 2018 17:37 I have done it, but still no emails with debug information, is there any way I can force another error ? |
From @fyfe on January 29, 2018 17:38 Try closing you're browser and reopening the quarantine page. |
From @lmfrazao on January 29, 2018 17:43 already did it, cleared cache, and tryed other browsers |
From @fyfe on January 29, 2018 17:47 Can you access the quarantine page now or does it still show the Internal Error message? |
From @lmfrazao on January 29, 2018 17:48 Jan 29 17:47:00 xxxxxxx uwsgi: xxxxxxxx.xxx [pid: 1919|app: 2|req: 3/8] 192.168.33.8 () {54 vars in 1093 bytes} [Mon Jan 29 17:47:00 2018] GET /quarantine/listing/?sort_order=-date&reset_page=true&_=1517248020399 => generated 18132 bytes in 377 msecs (HTTP/1.1 500) 5 headers in 169 bytes (1 switches on core 0) Best I can get when I access it . |
From @lmfrazao on January 29, 2018 17:50 full lines: |
From @fyfe on January 29, 2018 17:54 Is it only the quarantine page that isn't working? |
From @lmfrazao on January 29, 2018 17:55 yes |
From @fyfe on January 29, 2018 17:59
|
From @lmfrazao on January 29, 2018 18:6 I'm using mariadb 5.5.56 Just noticed the database is in latin1, shall I convert it to utf-8 ? It was working before this update, this "The string that could not be encoded/decoded was: o ve�culo." it's "o veículo" error: UnicodeDecodeError at /quarantine/listing/ 'utf8' codec can't decode byte 0xed in position 12: invalid continuation byte Request Method: GET 'utf8' codec can't decode byte 0xed in position 12: invalid continuation byte Exception Location: /srv/modoboa/env/lib64/python2.7/encodings/utf_8.py in decode, line 16 ['.', Server time: Mon, 29 Jan 2018 18:00:14 +0000 The string that could not be encoded/decoded was: o ve�culo |
From @lmfrazao on January 29, 2018 18:7 Traceback: Request Method: GET Django Version: 1.11.9 Traceback: File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response File "/srv/modoboa/env/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response File "/srv/modoboa/env/lib/python2.7/site-packages/django/utils/decorators.py" in inner File "/srv/modoboa/env/lib/python2.7/site-packages/django/utils/decorators.py" in inner File "/srv/modoboa/env/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view File "/srv/modoboa/env/lib/python2.7/site-packages/modoboa_amavis/views.py" in _listing File "/srv/modoboa/env/lib/python2.7/site-packages/modoboa_amavis/views.py" in get_listing_pages File "/srv/modoboa/env/lib/python2.7/site-packages/modoboa_amavis/sql_connector.py" in fetch File "/srv/modoboa/env/lib/python2.7/site-packages/modoboa_amavis/utils.py" in fix_utf8_encoding File "/srv/modoboa/env/lib64/python2.7/encodings/utf_8.py" in decode Exception Type: UnicodeDecodeError at /quarantine/listing/ |
From @fyfe on January 29, 2018 18:15 Can you run the following SQL query on the amavis database: SELECT character_set_name FROM information_schema.`COLUMNS`
WHERE table_schema = "schemaname"
AND table_name = "msgs"
AND column_name = "subject"; mysql -u [username] -p [database] 'SELECT character_set_name, collate_name FROM information_schema.`COLUMNS` WHERE table_schema = "schemaname" AND table_name = "msgs" AND column_name = "subject";' |
From @lmfrazao on January 29, 2018 18:26 0 rows returned |
From @lmfrazao on January 29, 2018 18:28 in module instance.settings on the error I got this: AMAVIS_DEFAULT_DATABASE_ENCODING | u'LATIN1' should be utf-8, since the database is on utf-8 ? where can I change this ? |
From @fyfe on January 29, 2018 18:35 Yes if you're database uses utf-8 encoding add Before you change it can you run the next command, there is a deployment check that should checks this is set to the correct value for your database: python manage.py checks --deploy If that doesn't work can you run the following SQL on the amavis database SHOW FULL COLUMNS FROM msgs; |
From @lmfrazao on January 29, 2018 18:36 the result is: utf8mb4 |
From @lmfrazao on January 29, 2018 18:41 I get this: Traceback (most recent call last): |
From @fyfe on January 29, 2018 18:43 Did you do all the upgrade steps, you're probably missing |
From @lmfrazao on January 29, 2018 18:52 I folowed the steps, yes. I wasn't using modoboa user. error: Unknown command: 'checks' |
From @fyfe on January 29, 2018 18:54 Sorry that should have been python manage.py check --deploy |
From @lmfrazao on January 29, 2018 18:55 ?: (modoboa-amavis.W001) AMAVIS_DEFAULT_DATABASE_ENCODING does not match the character encoding used by the Amavis database. this should be the error |
From @fyfe on January 29, 2018 18:59
SELECT DEFAULT_CHARACTER_SET_NAME
FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME = "amavis"; |
From @lmfrazao on January 29, 2018 19:0 |
From @lmfrazao on January 29, 2018 19:1 on settings.py: |
From @lmfrazao on January 29, 2018 19:2 I have other errors btw, but I think it's shouldn't be related to this: ?: (modoboa-amavis.W001) AMAVIS_DEFAULT_DATABASE_ENCODING does not match the character encoding used by the Amavis database. |
From @fyfe on January 29, 2018 19:8
The other warnings are caused because we don't use This looks like an issue with python not liking what's in the subject field, can you post the result for the following SELECT subject FROM msgs |
From @lmfrazao on January 29, 2018 19:12 it's a long list with 42k lines but enconding is fine, the characters appear correctly |
From @lmfrazao on January 29, 2018 19:22 |
From @fyfe on January 29, 2018 19:43 I see the problem, unicode emoji, I hate them 😠 The I'll need to go away and look a this again I might have to revert my original fix for this. |
From @fyfe on January 29, 2018 19:51 Ok some quick research it's a python 2 issue, nothing to do with the database encoding. |
From @fyfe on January 29, 2018 20:39 @lmfrazao in python could you run the following >>> import sys
>>> 'UCS4' if sys.maxunicode >= 0x10000 else 'UCS2' |
From @lmfrazao on January 30, 2018 0:6 it returns 'UCS4' |
From @lmfrazao on January 30, 2018 0:19 oww wait, the error with the check --deploy is gone but what to do now ? |
From @lmfrazao on January 30, 2018 14:17 @fyfe you figured out how to fix this ? |
From @lmfrazao on January 29, 2018 17:18
Impacted versions
OS: centos 7.4
Steps to reproduce
Upgrade from 1.9.0
Current behavior
Can't open quarantine - Internal Error
I have put Debug on, should open the debug log on modoboa ? can't see nothing on log files.
Copied from original issue: modoboa/modoboa#1377
The text was updated successfully, but these errors were encountered: