SSL Socket Error

Kev Dwyer kevin.p.dwyer at gmail.com
Sat May 9 03:00:27 EDT 2015


shdwkeeper at gmail.com wrote:

> Ive setup a Debian server with Python 2.7.9.  Have everything running and
> SSL as well, but when I try and login to using HTTPS:// I get this error:
> 
> Incoming web connection from ('192.168.15.177', 53202)
> error: uncaptured python exception, closing channel <main.AlarmServer
> listening :8111 at 0x75ea7b48> (:certfile must be specified for
> server-side operations [/usr/lib/python2.7/asyncore.py|read|83]
> [/usr/lib/python2.7/asyncore.py|handle_read_event|443]
> [./alarmserver.py|handle_accept|456]
> [/usr/lib/python2.7/ssl.py|wrap_socket|891]
> [/usr/lib/python2.7/ssl.py|init|498])
> 
> Any ideas how to resolve?

It looks like the exception is coming up through alarmserver.py, which seems 
to be based on https://github.com/juggie/AlarmServer (I'm not entirely
certain because the line numbers don't seem to match).  Anyway, looking at 
the code for alarmserver.py it expects to find certificate paths defined in
its config file, but they are undefined.

The sample config file for the project includes this section:

## The server runs with SSL. You need a certificate and key
## server.crt and server.key are included but you should 
## generate your own.
## If left blank the default included cert/key will be used
#certfile=/etc/apache2/ssl/server.crt
#keyfile=/etc/apache2/ssl/server.key
certfile=
keyfile=

So I think you need to start by examining the config file on your server.

Good luck,

Kev




More information about the Python-list mailing list