Closed Fire-Knight closed 4 years ago
运行python main.py -l 报错: (ssr) gyup@gyup-XPS-8930:~/ssr-commend-client$ python main.py -l Being parsed the ssr url: https://raw.githubusercontent.com/satrom/V2SSR/master/SSR/Day.txt It will take a moment,Please be patient~~ Traceback (most recent call last): File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen chunked=chunked, File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 381, in _make_request self._validate_conn(conn) File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn conn.connect() File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/connection.py", line 309, in connect conn = self._new_conn() File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/connection.py", line 172, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f6d01cdb048>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 727, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/home/gyup/anaconda3/envs/ssr/lib/python3.6/site-packages/urllib3/util/retry.py", line 439, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /satrom/V2SSR/master/SSR/Day.txt (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6d01cdb048>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 80, in
希望能得到答复,谢谢~
出现这个报错是因为你没有修改默认的订阅链接,请使用Python main.py --setting url 重置订阅链接。
设置开机启动会默认按照你当前用户的python环境启动,然而你的python第三方包装在了虚拟环境中,所以启动服务报错。 @William-WZL
环境:Ubuntu18.04.4, ssr-command-client基本设置完毕,可以通过项目目录下执行python3命令开启、连接代理
问题:设置开机自启动后,执行
sudo systemctl start ssr
或者sudo systemctl restart ssr
都会产生如下错误 执行python3 main.py -s
会告知代理已开启 此时执行curl http://ip-api.com/json/?lang=zh-CN
会告知拒绝链接 但是订阅可正常更新sudo python3 main.py -u
开机后只有使用
python3 main.py -S
再执行python3 main.py -s
才能连接代理