简体   繁体   中英

Broken pipe errno32 LDAP Django

I'm currently trying to use my school's LDAP with a website built with Django. But i'm encountering an error that I'm not able to tackle.

When I am using my school's network the LDAP log in works perfectly on localhost. But when i am using an off-campus network the log-in doesn't work, even the admin login created when i've run manage.py for the first time doesn't work.

The terminal display's the following error each time i try to login :

Traceback (most recent call last):
  File "/Users/Me/anaconda/lib/python2.7/wsgiref/handlers.py", line 86, in run
    self.finish_response()
  File "/Users/Me/anaconda/lib/python2.7/wsgiref/handlers.py", line 128, in finish_response
    self.write(data)
  File "/Users/Me/anaconda/lib/python2.7/wsgiref/handlers.py", line 212, in write
    self.send_headers()
  File "/Users/Me/anaconda/lib/python2.7/wsgiref/handlers.py", line 270, in send_headers
    self.send_preamble()
  File "/Users/Me/anaconda/lib/python2.7/wsgiref/handlers.py", line 194, in send_preamble
    'Date: %s\r\n' % format_date_time(time.time())
  File "/Users/Me/anaconda/lib/python2.7/socket.py", line 324, in write
    self.flush()
  File "/Users/Me/anaconda/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
[28/Jan/2014 11:18:43] "POST /admin/ HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 60538)
Traceback (most recent call last):
  File "/Users/Me/anaconda/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/Users/Me/anaconda/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Users/Me/anaconda/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 150, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/Users/Me/anaconda/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/Users/Me/anaconda/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/Users/Me/anaconda/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/Users/Me/anaconda/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------

Thank you very much for your help !

This is an issue with the Django devserver (you are running your website using it, which is not recommended at all for production websites).

Please see this ticket for more details:

According to many sources the 'Broken Pipe' is a normal browser quirk. For example, the browser reads from the socket and then decides that the image it's been reading apparently didn't change. The browser now this (forcefully) closes the connection because it does not need more data. The other end of this socket (the python runserver) now raises a socket exception telling the program that the client 'Broke the socket pipe'.

Short answer is: ignore this error since it's a known error and won't be fixed.

There is also this SO thread talking about this issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM