NewFuture / DDNS

:triangular_flag_on_post: 自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)
https://ddns.newfuture.cc/
MIT License
4.31k stars 657 forks source link

[debug] OSError: [WinError 10051] A socket operation was attempted to an unreachable network #281

Closed ogtc890215 closed 2 years ago

ogtc890215 commented 3 years ago

Describe the bug [描述]

To Reproduce [复现]

Every time use "ddns -c config.json"

version info [基本信息]

config file [配置文件]

{
  "$schema": "https://ddns.newfuture.cc/schema/v2.8.json",
  "debug": false,
  "dns": "alidns",
  "id": "***",
  "index4": "false",
  "index6": "default",
  "ipv4": [],
  "ipv6": [
    "***"
  ],
  "proxy": null,
  "token": "***",
  "ttl": null
}

debug output [调试输出]

DDNS[ v2.10.2@2021-07-30T05:14:01+00:00 ] run: nt win32
Configuration was loaded from <== C:\tools\DDNS\config.json
========================= Wed Aug 18 12:47:07 2021 =========================
2021-08-18 12:47:07,373 <cache.load> 48@c:\python39\lib\site-packages\util\cache.py
[DEBUG] load cache data from C:\Users\ogtc\AppData\Local\Temp\ddns.cache
2021-08-18 12:47:07,373 <run.main> 145@c:\python39\lib\site-packages\run.py
[WARNING] Cache file is out of dated.
Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\Scripts\ddns.exe\__main__.py", line 7, in <module>
  File "c:\python39\lib\site-packages\run.py", line 150, in main
    update_ip('6', cache, dns, proxy_list)
  File "c:\python39\lib\site-packages\run.py", line 98, in update_ip
    address = get_ip(ip_type, index_rule)
  File "c:\python39\lib\site-packages\run.py", line 66, in get_ip
    value = getattr(ip, index + "_v" + ip_type)()
  File "c:\python39\lib\site-packages\util\ip.py", line 31, in default_v6
    s.connect(('1:1:1:1:1:1:1:1', 8))
OSError: [WinError 10051] A socket operation was attempted to an unreachable network
2021-08-18 12:47:07,376 <cache.sync> 85@c:\python39\lib\site-packages\util\cache.py
[DEBUG] save cache data to C:\Users\ogtc\AppData\Local\Temp\ddns.cache

Additional context

NewFuture commented 3 years ago

ipv6 网络正常么? 如果正常,可以配置其它ipv6获取方式

ogtc890215 commented 3 years ago

确认是路由器配置问题导致未分配公网ipv6地址,已经可以正常运行。