目標:運行具有 MinIO 訪問權限的 Python 程式。
我可以通過登錄。瀏覽器,可以上傳/編輯檔案,與VPN斷開連接。
Ubuntu WSL 在連接時看不到任何套接字,例如我的 VPN。
電源外殼:
PS C:\> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 1
終端:
(sdg) me@PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ poetry run python -m sdg healthcare
Program started
Getting categories from Minio. Bucket: my-bucket
An exception of type MaxRetryError occurred. Arguments:
("HTTPConnectionPool(host='CENSORED.com', port=9000): Max retries exceeded with url: /my-bucket?location= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa1083cca00>: Failed to establish a new connection: [Errno -2] Name or service not known'))",)
Make sure to pass in a valid path or an array of categories
(sdg) me@PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ wget CESNORED.com
--2022-02-17 13:15:39-- http://CENSORED.com:9001/
Resolving CENSORED.com (CENSORED.com)... failed: Name or service not known.
wget: unable to resolve host address ‘CENSORED.com’
(sdg) me@PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ ss -s
ss: get_sockstat: No such file or directory
ss: get_snmpstat: No such file or directory
Total: 0
TCP: 0 (estab 0, closed 0, orphaned 0, timewait 0)
Transport Total IP IPv6
RAW 0 0 0
UDP 0 0 0
TCP 0 0 0
INET 0 0 0
FRAG 0 0 0
它無法連接。
“確保傳入有效路徑或類別陣列”
更新wsl.conf:
$ cat etc/wsl.conf
[network]
generateResolvConf = false
uj5u.com熱心網友回復:
電源外殼:
PS C:\Users\me> ipconfig /all
Windows IP Configuration
DNS Servers . . . . . . . . . . . : X.X.X.X
復制 DNS IPv4。
重擊:
sudo nano /etc/resolv.conf
輸入nameserver X.X.X.X并保存。
電源外殼:
PS C:\Users\me> wsl.exe --shutdown
再次打開 Bash:
wget <url>
資料來源:
WSL2 - VPN 修復
寫入resolv.conf
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/432091.html
標籤:python-3.x http 迷你
上一篇:更好的以事件為中心的方式來解決Kafka或任何流服務中的請求-回復問題
下一篇:從匹配鍵上的字典值創建新的df列
