简体   繁体   English

errno32 LDAP Django管道损坏

[英]Broken pipe errno32 LDAP Django

I'm currently trying to use my school's LDAP with a website built with Django. 我目前正在尝试将我学校的LDAP与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. 当我使用学校的网络时,LDAP登录可以在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. 但是,当我使用校外网络时,登录无法正常工作,即使我第一次运行manage.py时创建的管理员登录也无法正常工作。

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). 这是Django devserver的问题(您正在使用它运行网站,完全不建议将其用于生产网站)。

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'. 现在,此套接字的另一端(python运行服务器)引发套接字异常,告诉程序客户端“中断套接字管道”。

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. 还有一个SO线程正在谈论这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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