MinIO HTTPConnectionPool [Errno -2] Name or service not known
Asked Answered
D

1

0

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
Dipterous answered 17/2, 2022 at 13:4 Comment(0)
D
2

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>

Sources:

WSL2 - VPN Fix

Write to resolv.conf

Dipterous answered 17/2, 2022 at 17:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.