Goal: run Python program with MinIO access.
I can login via. Browser, and can upload/ edit files and am disconnected from VPN.
Ubuntu WSL can't see any sockets, such as my VPN when connected.
Powershell:
PS C:\> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 1
Terminal:
(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
It fails to connect.
"Make sure to pass in a valid path or an array of categories"
Updated wsl.conf
:
$ cat etc/wsl.conf
[network]
generateResolvConf = false
CodePudding user response:
Powershell:
PS C:\Users\me> ipconfig /all
Windows IP Configuration
DNS Servers . . . . . . . . . . . : X.X.X.X
Copy the DNS IPv4.
Bash:
sudo nano /etc/resolv.conf
Type in nameserver X.X.X.X
and save.
Powershell:
PS C:\Users\me> wsl.exe --shutdown
Open up Bash again:
wget <url>