[Twisted-web] socket error: 22, 'Invalid argument'

Werner Thie wthie at thiengineering.ch
Tue Apr 29 11:09:14 EDT 2008


Hi all

Running on twisted 2.5 OpenBSD I see the following traceback in the logs 
every twenty minutes with up to 200 athena/LivePages connected:

	Traceback (most recent call last):
	--- <exception caught here> ---
	  File 
"/usr/local/lib/python2.5/site-packages/twisted/internet/selectreactor.py", 
line 148, in _doReadOrWrite
	    why = getattr(selectable, method)()
	  File 
"/usr/local/lib/python2.5/site-packages/twisted/internet/tcp.py", line 
362, in doRead
	    return self.protocol.dataReceived(data)
	  File 
"/usr/local/lib/python2.5/site-packages/twisted/protocols/basic.py", 
line 233, in dataReceived
	    why = self.lineReceived(line)
	  File "/usr/local/lib/python2.5/site-packages/twisted/web/http.py", 
line 1069, in lineReceived
	    self.allContentReceived()
	  File "/usr/local/lib/python2.5/site-packages/twisted/web/http.py", 
line 1110, in allContentReceived
	    req.requestReceived(command, path, version)
	  File "/usr/local/lib/python2.5/site-packages/twisted/web/http.py", 
line 603, in requestReceived
	    self.host = self.channel.transport.getHost()
	  File 
"/usr/local/lib/python2.5/site-packages/twisted/internet/tcp.py", line 
672, in getHost
	    return address.IPv4Address('TCP', *(self.socket.getsockname() + 
('INET',)))
	  File "<string>", line 1, in getsockname
	
	socket.error: (22, 'Invalid argument')

Changing reactors does not help, the error is very unspecific. Before I 
start changing the source sprinkling it with log statements is there 
anybody out there who has a cure or knows an explanation.

Thank you so much,

Werner Thie



More information about the Twisted-web mailing list