Errors with hub/spoke Docker deployment of Scrutiny (WebUI for SMART disk monitoring) reddit / selfhosted ---------------------------------------------------------------------- Curious-Region7448 · 2023-10-02 19:08 Note I posted this as an [issue in the scrutiny github](https://github.com/AnalogJ/scrutiny/issues/518), but responses there are slow, and I think this is a docker issue where I just don't understand something, so perhaps a wider audience could help out? I am attempting to deploy using the hub/spoke method described [here](https://github.com/AnalogJ/scrutiny#hubspoke-deployment), given that I have multiple servers I want to monitor, so I want to deploy multiple collectors. I deployed the influxdb container as follows (password and token replaced): docker run -d -p 8086:8086 \ -v `pwd`/influxdb2:/var/lib/influxdb2 \ -e DOCKER_INFLUXDB_INIT_MODE=setup \ -e DOCKER_INFLUXDB_INIT_USERNAME=admin \ -e DOCKER_INFLUXDB_INIT_PASSWORD=####### \ -e DOCKER_INFLUXDB_INIT_ORG=homelab \ -e DOCKER_INFLUXDB_INIT_BUCKET=scrutiny \ -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=######## \ --name scrutiny-influxdb \ --restart=always \ influxdb:2.2 This looks good... I can log into the Influx UI by pointing a browser to port 8086 on my docker host, using the credentials I specified above... I populated scrutiny/scrutiny.yaml as follows based on [the example he re](https://github.com/AnalogJ/scrutiny/blob/master/example.scrutiny.y aml) version: 1 web: listen: host: localhost port: 8080 basepath: '' database: location: /opt/scrutiny/config/scrutiny.db src: frontend: path: /opt/scrutiny/web influxdb: scheme: 'http' host: docker1. port: 8086 token: '####' org: 'homelab' bucket: 'scrutiny' retention_policy: true insecure_skip_verify: true Note I have the actual docker host hostname as the "host" for influxdb, but "localhost" as the "host" for scrutiny-web... This got me the furthest, as things just didn't work otherwise (see additional details below). The next step, starting the Scrutiny web, is where I'm hung up. I run: docker run -d -p 8080:8080 \ -v $(pwd)/scrutiny:/opt/scrutiny/config \ --name scrutiny-web \ --restart=always \ ghcr.io/analogj/scrutiny:master-web I can see that the listener starts up on port 8080... root@docker1:~# lsof -i COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ... docker-pr 5284 root 4u IPv4 1601824 0t0 TCP *:http-alt (LISTEN) docker-pr 5290 root 4u IPv6 1601827 0t0 TCP *:http-alt (LISTEN) At this point, I would expect to be able to connect to the scrutiny web UI (I know it would be empty since no data was collected), but I can't seem to talk to it, from a web browser on my network, or even locally: root@docker1:~# telnet localhost 8080 Trying ::1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host. If I try to run the container with the DEBUG log option, I get the following in my logfile: time="2023-09-30T05:53:12Z" level=debug msg="{\"log\":{\"file\":\"/opt/scrutiny/config/scrutiny-web.log\",\"le vel\":\"DEBUG\"},\"notify\":{\"urls\":[]},\"version\":1,\"web\":{\"dat abase\":{\"location\":\"/opt/scrutiny/config/scrutiny.db\"},\"influxdb \":{\"bucket\":\"scrutiny\",\"host\":\"docker1.\",\"init_password\":\" password12345\",\"init_username\":\"admin\",\"insecure_skip_verify\":t rue,\"org\":\"homelab\",\"port\":8086,\"retention_policy\":true,\"sche me\":\"http\",\"tls\":{\"insecure_skip_verify\":false},\"token\":\"69a mazingmets\"},\"listen\":{\"basepath\":\"\",\"host\":\"localhost\",\"p ort\":8080},\"src\":{\"frontend\":{\"path\":\"/opt/scrutiny/web\"}}}}" type=web time="2023-09-30T05:53:12Z" level=info msg="Trying to connect to scrutiny sqlite db: /opt/scrutiny/config/scrutiny.db\n" type=web time="2023-09-30T05:53:12Z" level=info msg="Successfully connected to scrutiny sqlite db: /opt/scrutiny/config/scrutiny.db\n" type=web time="2023-09-30T05:53:12Z" level=debug msg="InfluxDB url: http://docker1.:8086" type=web time="2023-09-30T05:53:12Z" level=info msg="InfluxDB certificate verification: true\n" type=web time="2023-09-30T05:53:12Z" level=debug msg="Determine Influxdb setup status..." type=web time="2023-09-30T05:53:12Z" level=info msg="Database migration starting. Please wait, this process may take a long time...." type=web time="2023-09-30T05:53:12Z" level=info msg="Database migration completed successfully" type=web time="2023-09-30T05:53:12Z" level=info msg="SQLite global configuration migrations starting. Please wait...." type=web time="2023-09-30T05:53:12Z" level=info msg="SQLite global configuration migrations completed successfully" type=web time="2023-09-30T05:53:12Z" level=debug msg="basepath: " type=web Am I doing something wrong? Can anyone help me troubleshoot? What happens when I specify different "host" values in the YAML... If I specify the actual hostname as my scrutiny-web host, I get the following during container startup... ERROR: listen tcp 192.168.1.245:8080: bind: cannot assign requested address If I specify localhost as the influx hostname, I get this error: panic: failed to check influxdb setup status - Get "http://localhost:8086/api/v2/setup": dial tcp 127.0.0.1:8086: connect: connection refused Environment is Docker running in a Debian LXC container on Proxmox 8.0.3: # uname -a Linux docker1 6.2.16-5-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-6 (2023-07-25T15:33Z) x86_64 GNU/Linux # docker -v Docker version 24.0.6, build ed223bc # dpkg -l | grep -i docker ii docker-buildx-plugin 0.11.2-1~debian.12~bookworm amd64 Docker Buildx cli plugin. ii docker-ce 5:24.0.6-1~debian.12~bookworm amd64 Docker: the open-source application container engine ii docker-ce-cli 5:24.0.6-1~debian.12~bookworm amd64 Docker CLI: the open-source application container engine ii docker-ce-rootless-extras 5:24.0.6-1~debian.12~bookworm amd64 Rootless support for Docker. ii docker-compose-plugin 2.21.0-1~debian.12~bookworm amd64 Docker Compose (V2) plugin for the Docker CLI. ---------------------------------------------------------------------- hdddanbrown · 2023-10-02 21:26 You dont connect to localhost to open the webui, you must use the docker host ip. ---------------------------------------------------------------------- Curious-Region7448 · 2023-10-03 01:51 I know, it doesn't work. It's like connecting to a website that's not there. I just showed on the docker host itself that port 8080 shows as listening. ---------------------------------------------------------------------- thekrautboy · 2023-10-03 03:26 Maybe stop trying different values without knowing what they do and listen to advice instead. And why not ask /r/Docker for example? You clearly have some basic misunderstandings of how Docker works, which is fine, but you wont learn it by just messing around and asking for help but then ignoring it. ---------------------------------------------------------------------- Curious-Region7448 · 2023-10-03 05:22 To clarify, I cannot connect to the scrutiny container using the docker host name/IP and port specified in the container, using a web browser, e.g., http://docker1:8080. Note that I can connect to the influxdb container using http://docker1:8086. Sorry if I wasn't clear. I probably was too wordy and gave troubleshooting details that weren't necessary and confused the issue. My bad. I'm not sure what advice you think I ignored? The advice given in response to my original post was something I had already tried prior to even posting the question. Can you elaborate on the misunderstanding you think I have? I will cross post to /r/Docker; thanks, that's good advice. ---------------------------------------------------------------------- sneakpeekbot · 2023-10-03 05:22 Here's a sneak peek of /r/docker using the [top posts](https://np.reddit.com/r/docker/top/?sort=top&t=year) of the year! \#1: [Don't Let Reddit Kill 3rd Party Apps!](/r/Save3rdPartyApps/comme nts/13yh0jf/dont_let_reddit_kill_3rd_party_apps/) | [3 comments](https ://np.reddit.com/r/docker/comments/140639k/dont_let_reddit_kill_3rd_pa rty_apps/) \#2: [Don't Let Reddit Kill 3rd Party Apps!](/r/Save3rdPartyApps/comme nts/13yh0jf/dont_let_reddit_kill_3rd_party_apps/) | [3 comments](https ://np.reddit.com/r/docker/comments/13z8fk0/dont_let_reddit_kill_3rd_pa rty_apps/) \#3: [Docker is no longer sunsetting Free Team organizations](https:// np.reddit.com/r/docker/comments/120zkyz/docker_is_no_longer_sunsetting _free_team/) ---- ^^I'm ^^a ^^bot, ^^beep ^^boop ^^| ^^Downvote ^^to ^^remove ^^| ^^[Contact](https://www.reddit.com/message/compose/?to=sneakpeekbot) ^^| ^^[Info](https://np.reddit.com/r/sneakpeekbot/) ^^| ^^[Opt-out](ht tps://np.reddit.com/r/sneakpeekbot/comments/o8wk1r/blacklist_ix/) ^^| ^^[GitHub](https://github.com/ghnr/sneakpeekbot) ---------------------------------------------------------------------- Curious-Region7448 · 2023-10-03 05:57 I found out the issue on my own. I somehow was using an old version of the example application YAML file. I needed to specify [0.0.0.0](https://0.0.0.0) as the web/listen/host value instead of localhost. That made the service bind correctly so I could access it via [http://docker1:8080](http://docker1:8080). Thanks to those that offered help. ---------------------------------------------------------------------- thimplicity · 2023-10-22 18:09 Did you get notifications to work? I was not successful doing that through the docker installation with pushover ---------------------------------------------------------------------- Curious-Region7448 · 2023-10-23 20:51 Haven't set up notifications from Scrutiny yet. I don't really use any of those services they interface with. I have smartd and zfs event daemon set to send emails on all my servers and that's been sufficient thus far.