-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This issue is not new (though the SSL cipher issue is), so I have done some research and found this http://notes.alexdong.com/how-to-configure-djangomodwsgi-to-avoid-a-fro I was thinking we could try updating our apache configs to not use threads, but processes to see if this fixes the issue for us. As an alternative, I was also thinking of ditching modwsgi in favour of gunicorn. Both approaches still need some testing, but I'd like your input on this (does it sound any of the two approaches is feasible?) On 01/19/2012 04:40 AM, Haw Loeung wrote: > It's happening right now as we speak: > > hloeung@satsuma:/var/log/apache2$ tail -n 20 > pay.ubuntu.com-error.log [Thu Jan 19 07:38:39 2012] [error] [client > 91.189.89.105] mod_wsgi (pid=27305): Exception occurred processing > WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:39 2012] [error] [client 91.189.89.105] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:38:41 > 2012] [error] [client 91.189.89.105] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:41 2012] [error] [client 91.189.89.105] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:38:45 > 2012] [error] [client 91.189.89.106] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:45 2012] [error] [client 91.189.89.106] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:38:47 > 2012] [error] [client 91.189.89.106] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:47 2012] [error] [client 91.189.89.106] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:38:49 > 2012] [error] [client 91.189.89.106] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:49 2012] [error] [client 91.189.89.106] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:38:51 > 2012] [error] [client 91.189.89.106] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:51 2012] [error] [client 91.189.89.106] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:38:53 > 2012] [error] [client 91.189.89.106] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:53 2012] [error] [client 91.189.89.106] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:38:55 > 2012] [error] [client 91.189.89.106] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:55 2012] [error] [client 91.189.89.106] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:38:57 > 2012] [error] [client 91.189.89.106] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:38:57 2012] [error] [client 91.189.89.106] > TypeError: 'NoneType' object is not iterable [Thu Jan 19 07:39:00 > 2012] [error] [client 91.189.89.105] mod_wsgi (pid=27305): > Exception occurred processing WSGI script > '/srv/pay.ubuntu.com/production/code/payments-config/django.wsgi'. > [Thu Jan 19 07:39:00 2012] [error] [client 91.189.89.105] > TypeError: 'NoneType' object is not iterable > > > hloeung@satsuma:/srv/pay.ubuntu.com/production-logs/www-logs$ tail > -n 100 *.log response = middleware_method(request, response) File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/middleware.py", > line 36, in process_response request.session.save() File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/db.py", > line 52, in save session_key = self.session_key, File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py", > line 152, in _get_session_key self._session_key = > self._get_new_session_key() File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py", > line 144, in _get_new_session_key if not self.exists(session_key): > File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/db.py", > line 25, in exists Session.objects.get(session_key=session_key) > File "/usr/lib/pymodules/python2.6/django/db/models/manager.py", > line 120, in get return self.get_query_set().get(*args, **kwargs) > File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line > 300, in get num = len(clone) File > "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 81, > in __len__ self._result_cache = list(self.iterator()) File > "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 238, > in iterator for row in self.query.results_iter(): File > "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line > 287, in results_iter for rows in self.execute_sql(MULTI): File > "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line > 2368, in execute_sql cursor = self.connection.cursor() File > "/usr/lib/pymodules/python2.6/django/db/backends/__init__.py", line > 81, in cursor cursor = self._cursor() File > "/usr/lib/pymodules/python2.6/django/db/backends/postgresql_psycopg2/base.py", > line 98, in _cursor self.connection = > Database.connect(**conn_params) OperationalError: SSL error: wrong > cipher returned FATAL: no pg_hba.conf entry for host > "91.189.89.108", user "payments", database "payments_production", > SSL off > > 2012-01-19 07:39:22,635 ERROR Unhandled WSGI application exception > (OOPS 2210satsuma2069) Traceback (most recent call last): File > "/usr/lib/python2.6/dist-packages/canonical/oops/wsgi.py", line > 173, in __call__ body = self.app(environ, trap_response) File > "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py", line > 245, in __call__ response = middleware_method(request, response) > File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/middleware.py", > line 36, in process_response request.session.save() File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/db.py", > line 52, in save session_key = self.session_key, File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py", > line 152, in _get_session_key self._session_key = > self._get_new_session_key() File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py", > line 144, in _get_new_session_key if not self.exists(session_key): > File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/db.py", > line 25, in exists Session.objects.get(session_key=session_key) > File "/usr/lib/pymodules/python2.6/django/db/models/manager.py", > line 120, in get return self.get_query_set().get(*args, **kwargs) > File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line > 300, in get num = len(clone) File > "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 81, > in __len__ self._result_cache = list(self.iterator()) File > "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 238, > in iterator for row in self.query.results_iter(): File > "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line > 287, in results_iter for rows in self.execute_sql(MULTI): File > "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line > 2368, in execute_sql cursor = self.connection.cursor() File > "/usr/lib/pymodules/python2.6/django/db/backends/__init__.py", line > 81, in cursor cursor = self._cursor() File > "/usr/lib/pymodules/python2.6/django/db/backends/postgresql_psycopg2/base.py", > line 98, in _cursor self.connection = > Database.connect(**conn_params) OperationalError: SSL error: wrong > cipher returned FATAL: no pg_hba.conf entry for host > "91.189.89.108", user "payments", database "payments_production", > SSL off > > 2012-01-19 07:39:22,639 ERROR Error when dumping OOPS > 2210satsuma2069 Traceback (most recent call last): File > "/usr/lib/python2.6/dist-packages/canonical/oops/wsgi.py", line > 173, in __call__ body = self.app(environ, trap_response) File > "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py", line > 245, in __call__ response = middleware_method(request, response) > File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/middleware.py", > line 36, in process_response request.session.save() File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/db.py", > line 52, in save session_key = self.session_key, File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py", > line 152, in _get_session_key self._session_key = > self._get_new_session_key() File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/base.py", > line 144, in _get_new_session_key if not self.exists(session_key): > File > "/usr/lib/pymodules/python2.6/django/contrib/sessions/backends/db.py", > line 25, in exists Session.objects.get(session_key=session_key) > File "/usr/lib/pymodules/python2.6/django/db/models/manager.py", > line 120, in get return self.get_query_set().get(*args, **kwargs) > File "/usr/lib/pymodules/python2.6/django/db/models/query.py", line > 300, in get num = len(clone) File > "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 81, > in __len__ self._result_cache = list(self.iterator()) File > "/usr/lib/pymodules/python2.6/django/db/models/query.py", line 238, > in iterator for row in self.query.results_iter(): File > "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line > 287, in results_iter for rows in self.execute_sql(MULTI): File > "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py", line > 2368, in execute_sql cursor = self.connection.cursor() File > "/usr/lib/pymodules/python2.6/django/db/backends/__init__.py", line > 81, in cursor cursor = self._cursor() File > "/usr/lib/pymodules/python2.6/django/db/backends/postgresql_psycopg2/base.py", > line 98, in _cursor self.connection = > Database.connect(**conn_params) OperationalError: SSL error: wrong > cipher returned FATAL: no pg_hba.conf entry for host > "91.189.89.108", user "payments", database "payments_production", > SSL off > > > SSL wrong cipher returned, however, it says SSL is off! > > > Regards, > > Haw > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8YCjsACgkQaHF+Qaymu6ffpwCfUUEOaRoJsjkXiWd01l1facW7 XmcAnRfFUCNje99wBRQ0ZvVaxASpawYL =bUKd -----END PGP SIGNATURE-----