netdata / msi-installer

Netdata installer for Windows using WSL2
GNU General Public License v3.0
21 stars 2 forks source link

Bad address $(hostname).local #14

Closed cakrit closed 1 year ago

cakrit commented 1 year ago

Something happened on our image and $(hostname).local no longer works.

The first command is in wsl -d Netdata (fresh install), the second is from a previously installed wsl Ubuntu.

DESKTOP-C7OKV71:/mnt/c/Users/cakri/Downloads#  wget -O output.txt http://$(hostname).local:9182/metrics
wget: bad address 'DESKTOP-C7OKV71.local:9182'
DESKTOP-C7OKV71:/mnt/c/Users/cakri/Downloads# exit

C:\Users\cakri\Downloads>wsl -d Ubuntu
root@DESKTOP-C7OKV71:/mnt/c/Users/cakri/Downloads#  wget -O output.txt http://$(hostname).local:9182/metrics
--2022-10-31 10:42:24--  http://desktop-c7okv71.local:9182/metrics
Resolving desktop-c7okv71.local (desktop-c7okv71.local)... 172.29.192.1, 10.0.0.212, fe80::d13b:4b5:7889:905, ...
Connecting to desktop-c7okv71.local (desktop-c7okv71.local)|172.29.192.1|:9182... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: ‘output.txt’

output.txt                                [ <=>                                                                     ]  45.56K  --.-KB/s    in 0.002s

2022-10-31 10:42:24 (23.6 MB/s) - ‘output.txt’ saved [46656]
dfpr commented 1 year ago

Try with just $(hostname), that is, without the ".local suffix".

cakrit commented 1 year ago

This is because the new installation used WSL1 for some reason. We will handle this case outside of the installer.