hassio-addons/addon-influxdb

Cannot access WebUI anymore - 404 #94

Fridolin34 posted onGitHub

Greetings,

My system: CC2531 plugged in a Synology, HassIO Docker container; Mosquitto broker, Zigbee2mqtt, InfluxDB and Grafana as installed addons (docker containers as well).

Since a couple of days, I cannot open the InfluxDB WebUI anymore. The database itself is running and I can use Grafana to still see my data, but each time I click on either 'show WebUI' or use the sidebar link, the browser tells me '404 - page not found'. What am I doing wrong? Logs are fine, nothing to be seen there. It's been working flawlessly before.

Thanks in advance, Fridolin


Synology is not a supported system by the Home Assistant project.

posted by frenck over 4 years ago

Hmm... what an answer, but never mind - thanks to you anyways and Merry Christmas.

posted by Fridolin34 over 4 years ago

I too have the same problem. My setup runs:

Add-on version: 3.7.9
 You are running the latest version of this add-on.
 System: Ubuntu 20.04.1 LTS  (aarch64 / odroid-c2)
 Home Assistant Core: 2020.12.1
 Home Assistant Supervisor: 2020.12.7

(yes, I know it's unsupported)... Hope you don't mind that people with the same issue use your ticketing system to find a solution...

I tried poking inside the container, to see on what port nginx was listening, but the container is pretty minimal and lacks basic troubleshooting utilities. I was able to get a list of ports used with this little one-liner:

root@a0d7b954-influxdb:/# awk 'function hextodec(str,ret,n,i,k,c){
    ret = 0
    n = length(str)
    for (i = 1; i <= n; i++) {
        c = tolower(substr(str, i, 1))
        k = index("123456789abcdef", c)
        ret = ret * 16 + k
    }
    return ret
}
function getIP(str,ret){
    ret=hextodec(substr(str,index(str,":")-2,2)); 
    for (i=5; i>0; i-=2) {
        ret = ret"."hextodec(substr(str,i,2))
    }
    ret = ret":"hextodec(substr(str,index(str,":")+1,4))
    return ret
} 
NR > 1 {{if(NR==2)print "Local - Remote";local=getIP($2);remote=getIP($3)}{print local" - "remote}}' /proc/net/tcp 
Local - Remote
127.0.0.1:9092 - 0.0.0.0:0
127.0.0.1:8088 - 0.0.0.0:0
172.30.33.1:1337 - 0.0.0.0:0
127.0.0.1:8889 - 0.0.0.0:0
127.0.0.11:33949 - 0.0.0.0:0
127.0.0.1:9092 - 127.0.0.1:39272
127.0.0.1:9092 - 127.0.0.1:39604
127.0.0.1:39272 - 127.0.0.1:9092
127.0.0.1:39604 - 127.0.0.1:9092
127.0.0.1:36240 - 127.0.0.1:8086
root@a0d7b954-influxdb:/# 

Also, according to nginx configuration, it's set to listen to 1337:

root@a0d7b954-influxdb:/# cat /etc/nginx/servers/ingress.conf 
server {
    listen 172.30.33.1:1337 default_server;

    include /etc/nginx/includes/server_params.conf;
    include /etc/nginx/includes/proxy_params.conf;

    location / {
        allow   172.30.32.2;
        deny    all;

        proxy_pass http://backend/api/hassio_ingress/someRANDOMstring/;
    }
}

I've looked for the 172.30.32.2 address, but couldn't find it (yet). I found .1 in the homeassistant docker image:

bash-5.0# ip addr show hassio
5: hassio: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 
    link/ether 02:42:08:16:02:fc brd ff:ff:ff:ff:ff:ff
    inet 172.30.32.1/23 brd 172.30.33.255 scope global hassio
       valid_lft forever preferred_lft forever
    inet6 fe80::42:8ff:fe16:2fc/64 scope link 
       valid_lft forever preferred_lft forever

I tried to enable port 80 on nginx with this command within the docker container (+ restarting the container):

 mv /etc/nginx/servers/direct.disabled /etc/nginx/servers/direct.conf

Now I get a 502 error in the web interface. Next I added a forward inside Home Assistant Supervisor for port 80 to port 8999 on the host. I restarted the addon from the web gui and now the web access from Home Assistant works! Yay!

May I ask why was the direct access disabled? For security?

posted by mad-ady over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests