Django 连接中止:协议不支持地址族 [英] Django connection aborted: address family not supported by protocol
问题描述
我正在 raspberry pi 上运行一个脚本,该脚本每分钟向我的 Django 应用程序发送一次 POST 请求.我在我的公寓里运行了 3 个小时,它很好,但后来我把它带回家只运行了 37 分钟,就出现了这个错误:
I'm running a script on a raspberry pi that sends a POST request to my Django app once every minute. I ran it for 3 hours at my apartment and it was fine, but then I took it home and ran it for just 37 minutes before getting this error:
...
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(97, 'Address family not supported by protocol'))
我用谷歌搜索并找到了这个:Apache 上的 Django 应用程序抛出协议不支持的地址族",这是未解决的(我无法发表评论,因为我还没有足够高的声誉,不幸的是.)
I googled around and found this: Django app on Apache throws "Address family not supported by protocol", which is unanswered (I can't comment because I don't have a high enough reputation yet, unfortunately.)
有谁知道为什么会发生这种情况?我以前从未见过这样的事情,而且我也没什么好说的.
Does anyone know why this might be happening? I've never seen something like this before, and I don't have a lot to go off.
推荐答案
我认为你缺少这个内核模块 af_packet
,你可以像这样重新加载它:
I think you are missing this kernel module af_packet
, you can reload it like:
root@linux# depmod -a
root@linux# modprobe af_packet
如果还是不行,可以尝试直接加载:
if it doesnot work, you can try to load directly:
root@linux# insmod /lib/modules/2.6.13-15-default/kernel/net/packet/af_packet.ko
这篇关于Django 连接中止:协议不支持地址族的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!