Server Error (500) on Docker instance


I’ve had kobo-docker on one of my servers for more than a year now working perfectly, however starting 2-3 weeks ago, enumerators started getting a “Server Error (500)” on the tablets on submitting, for a while just stopping and starting the instance worked and i wasn’t having time to debug it.

This morning the kobocat started throwing a “500” message on API requests, when I looked at the logs i noticed that everything works well until at some point i get this message in the uwsgi.log

Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/django/core/handlers/”, line 189, in call
response = self.get_response(request)
File “/usr/local/lib/python2.7/dist-packages/django/core/handlers/”, line 209, in get_response
response = self.get_exception_response(request, resolver, 400)
File “/usr/local/lib/python2.7/dist-packages/django/core/handlers/”, line 90, in get_exception_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File “/usr/local/lib/python2.7/dist-packages/django/core/handlers/”, line 268, in handle_uncaught_exception
return callback(request, **param_dict)
File “/usr/local/lib/python2.7/dist-packages/django/utils/”, line 106, in _wrapped_view
result = middleware.process_view(request, view_func, args, kwargs)
File “/usr/local/lib/python2.7/dist-packages/django/middleware/”, line 159, in process_view
good_referer = ‘https://%s/’ % request.get_host()
File “/usr/local/lib/python2.7/dist-packages/django/http/”, line 102, in get_host
raise DisallowedHost(msg)
django.core.exceptions.DisallowedHost: Invalid HTTP_HOST header:‘{server IP}’ . You may need to add u’{server IP}’ to ALLOWED_HOSTS.

and then always followed by:

POST /mifs/.;/services/LogService => generated 0 bytes in 28 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)

But that request seems to come from different dynamic IPs that i don’t recognize.

And after that all API requests result in a 500 error.

Anyone facing this issue? help much appreciated