No response to 3 echo-requests

本文探讨了如何解决出租屋宽带质量不佳、使用network-manager拨号后频繁掉线的问题。通过分析network-manager配置文件及pppoe日志中的错误提示,发现连接稳定性问题源于网络配置。文章详细介绍了如何修改network-manager配置文件中的ppp连接参数,以提升连接稳定性和减少掉线情况。通过加入关键参数,如`lcp-echo-interval`和`lcp-echo-failure`,可以显著改善宽带使用体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 问题描述:
出租屋的宽带质量很差。 使用network-manager拨号后,频繁掉线。使用plog -f查看pppoe日志, 发现报错:[color=red]No response to 3 echo-requests[/color]。
2. 解决方法:
nm的配置文件在: /etc/NetWorkManager下。connection相关的日志在子目录:system-connections下。如果是单个用户的设置, 则在HOME目录的.gconf下。所以为了给整个系统配置拨号,就需要在配置完后选中for all users选项。 这样就可以在/etc/NetWorkManager/system-connections下看到了。比如我的拨号取名:my_dsl, 则会有一个my_dsl的文件。此文件会省略掉一些默认的配置。加入以下项:
[color=red][ppp]
lcp-echo-interval=3600
lcp-echo-failure=60[/color]
ppp项默认是木有的。之前我是加在pppoe项下。这样是无论如何也不会起效果的。后来翻了翻源码才知道这两个选项是ppp的配置。
重启network-mananger:/etc/init.d/network-manager restart
检查方法:ps -ef | grep NetworkManager
会看到我们新增的参数已经更新到NetworkManager启动的子进程pppd的选项中了。之前默认配置分别是3和20。所以一分钟内是会掉线重连的。
C:\Users\Administrator\anaconda3\python.exe "E:/pycharm/PyCharm 2024.2.4/plugins/python-ce/helpers/pydev/pydevconsole.py" --mode=client --host=127.0.0.1 --port=51678 import sys; print(&#39;Python %s on %s&#39; % (sys.version, sys.platform)) sys.path.extend([&#39;C:\\Users\\Administrator\\PycharmProjects\\scientificProject&#39;]) PyDev console: using IPython 8.15.0 Python 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)] on win32 runfile(&#39;C:\\Users\\Administrator\\PycharmProjects\\scientificProject\\travel.py&#39;, wdir=&#39;C:\\Users\\Administrator\\PycharmProjects\\scientificProject&#39;) 请输入目标城市:>? 广州 请输入出行日期(YYYY-MM-DD):>? 2025-03-25 【天气预报】 [调试] 地理API响应: {&#39;error&#39;: {&#39;status&#39;: 401, &#39;type&#39;: &#39;https://dev.qweather.com/docs/resource/error-code/#unauthorized&#39;, &#39;title&#39;: &#39;Unauthorized&#39;, &#39;detail&#39;: &#39;Authentication failed, check your KEY/Token or Host.&#39;}} ❌ 接口错误:未知错误 【旅游攻略】 Traceback (most recent call last): File "C:\Users\Administrator\anaconda3\Lib\site-packages\IPython\core\interactiveshell.py", line 3526, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-2-4805391bd2fc>", line 1, in <module> runfile(&#39;C:\\Users\\Administrator\\PycharmProjects\\scientificProject\\travel.py&#39;, wdir=&#39;C:\\Users\\Administrator\\PycharmProjects\\scientificProject&#39;) File "E:\pycharm\PyCharm 2024.2.4\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\pycharm\PyCharm 2024.2.4\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, &#39;exec&#39;), glob, loc) File "C:\Users\Administrator\PycharmProjects\scientificProject\travel.py", line 78, in <module> guide = planner.generate_guide(city) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\PycharmProjects\scientificProject\travel.py", line 51, in generate_guide client = Deepseek(api_key=self.deepseek_key) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\PycharmProjects\scientificProject\deepseek_api.py", line 10, in __init__ response = client.chat.completions.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\anaconda3\Lib\site-packages\openai\_utils\_utils.py", line 279, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\anaconda3\Lib\site-packages\openai\resources\chat\completions\completions.py", line 914, in create return self._post( ^^^^^^^^^^^ File "C:\Users\Administrator\anaconda3\Lib\site-packages\openai\_base_client.py", line 1242, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\anaconda3\Lib\site-packages\openai\_base_client.py", line 919, in request return self._request( ^^^^^^^^^^^^^^ File "C:\Users\Administrator\anaconda3\Lib\site-packages\openai\_base_client.py", line 1023, in _request raise self._make_status_error_from_response(err.response) from None openai.AuthenticationError: Error code: 401 - {&#39;error&#39;: {&#39;message&#39;: &#39;Authentication Fails (no such user)&#39;, &#39;type&#39;: &#39;authentication_error&#39;, &#39;param&#39;: None, &#39;code&#39;: &#39;invalid_request_error&#39;}}
最新发布
03-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值