<class 'socket.error'> | Python 2.7.13: /usr/bin/python Fri Jan 22 12:45:23 2021 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>) |
556 """Runs the handler, flushes the streams, and ends the request.""" |
557 try: |
=> 558 protocolStatus, appStatus = self.server.handler(self) |
559 except: |
560 traceback.print_exc(file=self.stderr) |
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>> |
/usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>) |
1116 try: |
1117 try: |
=> 1118 result = self.application(environ, start_response) |
1119 try: |
1120 for data in result: |
result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <django.core.handlers.wsgi.WSGIHandler object>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/services/http/users', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/services/http/users', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response = <function start_response> |
/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py in __call__(self=<django.core.handlers.wsgi.WSGIHandler object>, environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/services/http/users', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/services/http/users', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'br,gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'HTTP_CONNECTION': 'close', ...}, start_response=<function start_response>) |
168 response = http.HttpResponseBadRequest() |
169 else: |
=> 170 response = self.get_response(request) |
171 |
172 response._handler_class = self.__class__ |
response undefined, self = <django.core.handlers.wsgi.WSGIHandler object>, self.get_response = <bound method WSGIHandler.get_response of <django.core.handlers.wsgi.WSGIHandler object>>, request = <WSGIRequest: GET '/~dadams/fmc/'> |
/usr/lib/python2.7/dist-packages/django/core/handlers/base.py in get_response(self=<django.core.handlers.wsgi.WSGIHandler object>, request=<WSGIRequest: GET '/~dadams/fmc/'>) |
122 set_urlconf(settings.ROOT_URLCONF) |
123 |
=> 124 response = self._middleware_chain(request) |
125 |
126 # This block is only needed for legacy MIDDLEWARE_CLASSES; if |
response undefined, self = <django.core.handlers.wsgi.WSGIHandler object>, self._middleware_chain = <function _legacy_get_response>, request = <WSGIRequest: GET '/~dadams/fmc/'> |
/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py in inner(request=<WSGIRequest: GET '/~dadams/fmc/'>) |
42 response = get_response(request) |
43 except Exception as exc: |
=> 44 response = response_for_exception(request, exc) |
45 return response |
46 return inner |
response undefined, global response_for_exception = <function response_for_exception>, request = <WSGIRequest: GET '/~dadams/fmc/'>, exc = ImproperlyConfigured('Invalid BACKEND for a temp...: <not defined>. Check your TEMPLATES setting.',) |
/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py in response_for_exception(request=<WSGIRequest: GET '/~dadams/fmc/'>, exc=ImproperlyConfigured('Invalid BACKEND for a temp...: <not defined>. Check your TEMPLATES setting.',)) |
92 else: |
93 signals.got_request_exception.send(sender=None, request=request) |
=> 94 response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info()) |
95 |
96 return response |
response undefined, global handle_uncaught_exception = <function handle_uncaught_exception>, request = <WSGIRequest: GET '/~dadams/fmc/'>, global get_resolver = <function get_resolver>, global get_urlconf = <function get_urlconf>, global sys = <module 'sys' (built-in)>, sys.exc_info = <built-in function exc_info> |
/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py in handle_uncaught_exception(request=<WSGIRequest: GET '/~dadams/fmc/'>, resolver=<RegexURLResolver 'weekly_fmc.urls' (None:None) ^/>, exc_info=(<class 'django.core.exceptions.ImproperlyConfigured'>, ImproperlyConfigured('Invalid BACKEND for a temp...: <not defined>. Check your TEMPLATES setting.',), <traceback object>)) |
130 'Internal Server Error: %s', request.path, |
131 exc_info=exc_info, |
=> 132 extra={'status_code': 500, 'request': request}, |
133 ) |
134 |
extra undefined, request = <WSGIRequest: GET '/~dadams/fmc/'> |
/usr/lib/python2.7/logging/__init__.py in error(self=<logging.Logger object>, msg=u'Internal Server Error: %s', *args=(u'/~dadams/fmc/',), **kwargs={'exc_info': (<class 'django.core.exceptions.ImproperlyConfigured'>, ImproperlyConfigured('Invalid BACKEND for a temp...: <not defined>. Check your TEMPLATES setting.',), <traceback object>), 'extra': {u'request': <WSGIRequest: GET '/~dadams/fmc/'>, u'status_code': 500}}) |
1191 """ |
1192 if self.isEnabledFor(ERROR): |
=> 1193 self._log(ERROR, msg, args, **kwargs) |
1194 |
1195 def exception(self, msg, *args, **kwargs): |
self = <logging.Logger object>, self._log = <bound method Logger._log of <logging.Logger object>>, global ERROR = 40, msg = u'Internal Server Error: %s', args = (u'/~dadams/fmc/',), kwargs = {'exc_info': (<class 'django.core.exceptions.ImproperlyConfigured'>, ImproperlyConfigured('Invalid BACKEND for a temp...: <not defined>. Check your TEMPLATES setting.',), <traceback object>), 'extra': {u'request': <WSGIRequest: GET '/~dadams/fmc/'>, u'status_code': 500}} |
/usr/lib/python2.7/logging/__init__.py in _log(self=<logging.Logger object>, level=40, msg=u'Internal Server Error: %s', args=(u'/~dadams/fmc/',), exc_info=(<class 'django.core.exceptions.ImproperlyConfigured'>, ImproperlyConfigured('Invalid BACKEND for a temp...: <not defined>. Check your TEMPLATES setting.',), <traceback object>), extra={u'request': <WSGIRequest: GET '/~dadams/fmc/'>, u'status_code': 500}) |
1284 exc_info = sys.exc_info() |
1285 record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra) |
=> 1286 self.handle(record) |
1287 |
1288 def handle(self, record): |
self = <logging.Logger object>, self.handle = <bound method Logger.handle of <logging.Logger object>>, record = <logging.LogRecord object> |
/usr/lib/python2.7/logging/__init__.py in handle(self=<logging.Logger object>, record=<logging.LogRecord object>) |
1294 """ |
1295 if (not self.disabled) and self.filter(record): |
=> 1296 self.callHandlers(record) |
1297 |
1298 def addHandler(self, hdlr): |
self = <logging.Logger object>, self.callHandlers = <bound method Logger.callHandlers of <logging.Logger object>>, record = <logging.LogRecord object> |
/usr/lib/python2.7/logging/__init__.py in callHandlers(self=<logging.Logger object>, record=<logging.LogRecord object>) |
1334 found = found + 1 |
1335 if record.levelno >= hdlr.level: |
=> 1336 hdlr.handle(record) |
1337 if not c.propagate: |
1338 c = None #break out |
hdlr = <django.utils.log.AdminEmailHandler object>, hdlr.handle = <bound method AdminEmailHandler.handle of <django.utils.log.AdminEmailHandler object>>, record = <logging.LogRecord object> |
/usr/lib/python2.7/logging/__init__.py in handle(self=<django.utils.log.AdminEmailHandler object>, record=<logging.LogRecord object>) |
757 self.acquire() |
758 try: |
=> 759 self.emit(record) |
760 finally: |
761 self.release() |
self = <django.utils.log.AdminEmailHandler object>, self.emit = <bound method AdminEmailHandler.emit of <django.utils.log.AdminEmailHandler object>>, record = <logging.LogRecord object> |
/usr/lib/python2.7/dist-packages/django/utils/log.py in emit(self=<django.utils.log.AdminEmailHandler object>, record=<logging.LogRecord object>) |
119 message = "%s\n\n%s" % (self.format(no_exc_record), reporter.get_traceback_text()) |
120 html_message = reporter.get_traceback_html() if self.include_html else None |
=> 121 self.send_mail(subject, message, fail_silently=True, html_message=html_message) |
122 |
123 def send_mail(self, subject, message, *args, **kwargs): |
self = <django.utils.log.AdminEmailHandler object>, self.send_mail = <bound method AdminEmailHandler.send_mail of <django.utils.log.AdminEmailHandler object>>, subject = u'ERROR (EXTERNAL IP): Internal Server Error: /~dadams/fmc/', message = u"Internal Server Error: /~dadams/fmc/\n\nImproperly...ONS = u'SAMEORIGIN'\nYEAR_MONTH_FORMAT = u'F Y'\n\n\n", fail_silently undefined, builtin True = True, html_message = None |
/usr/lib/python2.7/dist-packages/django/utils/log.py in send_mail(self=<django.utils.log.AdminEmailHandler object>, subject=u'ERROR (EXTERNAL IP): Internal Server Error: /~dadams/fmc/', message=u"Internal Server Error: /~dadams/fmc/\n\nImproperly...ONS = u'SAMEORIGIN'\nYEAR_MONTH_FORMAT = u'F Y'\n\n\n", *args=(), **kwargs={'fail_silently': True, 'html_message': None}) |
122 |
123 def send_mail(self, subject, message, *args, **kwargs): |
=> 124 mail.mail_admins(subject, message, *args, connection=self.connection(), **kwargs) |
125 |
126 def connection(self): |
global mail = <module 'django.core.mail' from '/usr/lib/python2.7/dist-packages/django/core/mail/__init__.pyc'>, mail.mail_admins = <function mail_admins>, subject = u'ERROR (EXTERNAL IP): Internal Server Error: /~dadams/fmc/', message = u"Internal Server Error: /~dadams/fmc/\n\nImproperly...ONS = u'SAMEORIGIN'\nYEAR_MONTH_FORMAT = u'F Y'\n\n\n", args = (), connection undefined, self = <django.utils.log.AdminEmailHandler object>, self.connection = <bound method AdminEmailHandler.connection of <django.utils.log.AdminEmailHandler object>>, kwargs = {'fail_silently': True, 'html_message': None} |
/usr/lib/python2.7/dist-packages/django/core/mail/__init__.py in mail_admins(subject=u'ERROR (EXTERNAL IP): Internal Server Error: /~dadams/fmc/', message=u"Internal Server Error: /~dadams/fmc/\n\nImproperly...ONS = u'SAMEORIGIN'\nYEAR_MONTH_FORMAT = u'F Y'\n\n\n", fail_silently=True, connection=<django.core.mail.backends.smtp.EmailBackend object>, html_message=None) |
101 if html_message: |
102 mail.attach_alternative(html_message, 'text/html') |
=> 103 mail.send(fail_silently=fail_silently) |
104 |
105 |
mail = <django.core.mail.message.EmailMultiAlternatives object>, mail.send = <bound method EmailMultiAlternatives.send of <dj...core.mail.message.EmailMultiAlternatives object>>, fail_silently = True |
/usr/lib/python2.7/dist-packages/django/core/mail/message.py in send(self=<django.core.mail.message.EmailMultiAlternatives object>, fail_silently=True) |
340 # send to. |
341 return 0 |
=> 342 return self.get_connection(fail_silently).send_messages([self]) |
343 |
344 def attach(self, filename=None, content=None, mimetype=None): |
self = <django.core.mail.message.EmailMultiAlternatives object>, self.get_connection = <bound method EmailMultiAlternatives.get_connect...core.mail.message.EmailMultiAlternatives object>>, fail_silently = True, ).send_messages undefined |
/usr/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py in send_messages(self=<django.core.mail.backends.smtp.EmailBackend object>, email_messages=[<django.core.mail.message.EmailMultiAlternatives object>]) |
98 return |
99 with self._lock: |
=> 100 new_conn_created = self.open() |
101 if not self.connection: |
102 # We failed silently on open(). |
new_conn_created undefined, self = <django.core.mail.backends.smtp.EmailBackend object>, self.open = <bound method EmailBackend.open of <django.core.mail.backends.smtp.EmailBackend object>> |
/usr/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py in open(self=<django.core.mail.backends.smtp.EmailBackend object>) |
56 }) |
57 try: |
=> 58 self.connection = connection_class(self.host, self.port, **connection_params) |
59 |
60 # TLS/SSL are mutually exclusive, so only attempt TLS over |
self = <django.core.mail.backends.smtp.EmailBackend object>, self.connection = None, connection_class = <class smtplib.SMTP>, self.host = u'localhost', self.port = 25, connection_params = {'local_hostname': 'death.ocf.berkeley.edu'} |
/usr/lib/python2.7/smtplib.py in __init__(self=<smtplib.SMTP instance>, host=u'localhost', port=25, local_hostname='death.ocf.berkeley.edu', timeout=<object object>) |
254 self.esmtp_features = {} |
255 if host: |
=> 256 (code, msg) = self.connect(host, port) |
257 if code != 220: |
258 raise SMTPConnectError(code, msg) |
code undefined, msg undefined, self = <smtplib.SMTP instance>, self.connect = <bound method SMTP.connect of <smtplib.SMTP instance>>, host = u'localhost', port = 25 |
/usr/lib/python2.7/smtplib.py in connect(self=<smtplib.SMTP instance>, host=u'localhost', port=25) |
314 if self.debuglevel > 0: |
315 print>>stderr, 'connect:', (host, port) |
=> 316 self.sock = self._get_socket(host, port, self.timeout) |
317 (code, msg) = self.getreply() |
318 if self.debuglevel > 0: |
self = <smtplib.SMTP instance>, self.sock undefined, self._get_socket = <bound method SMTP._get_socket of <smtplib.SMTP instance>>, host = u'localhost', port = 25, self.timeout = <object object> |
/usr/lib/python2.7/smtplib.py in _get_socket(self=<smtplib.SMTP instance>, host=u'localhost', port=25, timeout=<object object>) |
289 if self.debuglevel > 0: |
290 print>>stderr, 'connect:', (host, port) |
=> 291 return socket.create_connection((host, port), timeout) |
292 |
293 def connect(self, host='localhost', port=0): |
global socket = <module 'socket' from '/usr/lib/python2.7/socket.pyc'>, socket.create_connection = <function create_connection>, host = u'localhost', port = 25, timeout = <object object> |
/usr/lib/python2.7/socket.py in create_connection(address=(u'localhost', 25), timeout=<object object>, source_address=None) |
573 |
574 if err is not None: |
=> 575 raise err |
576 else: |
577 raise error("getaddrinfo returns an empty list") |
err = error(111, 'Connection refused') |
<class 'socket.error'>: [Errno 111] Connection refused
args =
(111, 'Connection refused')
errno =
111
filename =
None
message =
''
strerror =
'Connection refused'