处理来自iOS设备的请求时发生异常。

5

我正在尝试在iOS设备上播放视频。当我尝试播放时,出现了以下错误:

[27/Apr/2015 06:59:30] "GET /media/2015/04/VID_20150327_112644.mp4 HTTP/1.1" 200 18

 Exception happened during processing of request from ('192.168.1.230', 51412)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/likewise-open/ZEALOUSYS/manesh/virtualenv/tracks/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 129, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------
Exception happened during processing of request from ('192.168.1.230', 51412)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/likewise-open/ZEALOUSYS/manesh/virtualenv/tracks/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 129, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------

所有格式的视频文件在所有浏览器和安卓设备上都可以正常工作。但是,在iOS设备上尝试访问时,会出现以上错误。从错误信息中可以看到,首先它给我响应200,然后就出现了“broken pipe”。这个“broken pipe”是什么意思?顺便说一下,我已经发布了一个问题,说明我无法在iOS设备上播放视频,现在我发布了一个新问题,因为我在终端中发现了这个错误。
如何解决这个问题?感谢任何帮助。

损坏的管道错误可能与iOS设备无法播放视频文件无关。请参阅https://dev59.com/pmsz5IYBdhLWcg3wbHEw#7913160,了解有关损坏的管道错误的信息。 - aumo
1个回答

3
这是因为Django正在处理您的媒体文件,而不是Apache。尝试通过更改服务器中的配置来解决。
例如,在您的apache2中,编辑example.com.conf文件并添加以下行,以便Apache可以提供媒体文件。
**Alias /media /your project path/media**

有时这可能会解决此问题。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接