causefx / Organizr

HTPC/Homelab Services Organizer - Written in PHP
GNU General Public License v3.0
5.12k stars 290 forks source link

Speedtest Homepage Item Timing Out #1477

Closed ghost closed 3 years ago

ghost commented 3 years ago

Version: 2.0.650 Branch: v2-master Server OS: *nix PHP: 7.3.22 Install Type: Official Docker Auth Type: internal Auth Backend: Installed Plugins: Installed Themes: Theme: Organizr Local: true oAuth: false Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0


Problem Description:

Organizr not displaying speedtest results on the home screen. The speedtest website works if I go directly to it though and displays all the graphs. The homepage item loads for a bit then times out every time I refresh the page. The connection address I am using is http://192.168.1.x:8765. This adds the homepage item but it is unable to connect due to timing out. The speedtest plugin is enabled as well but I don't think that is relevant to this and the issue remains whether it is enabled or not.


Reproduction Steps:

Install organizr and speedtest in docker. Enable the speedtest homepage item using http://localIP:8765, disable the title, leave authentication as co-admin. Refresh the homepage while accessing from within the local network.


Errors on screen? If so paste here:

Speedtest Connect Function - Error: cURL error 28: Connection timed out after 10000 milliseconds [Execution Time: 10.08s | 10085.3ms]
ghost commented 3 years ago

Changing the URL for speedtest to the container name got it working locally and on WAN. Which is different than how I understood the other items to work where the urls used needed to be accessible from the browser being used.

HalianElf commented 3 years ago

Homepage connection urls can (and really should be) be the local url since it's Organizr pulling the data and displaying it. The tabs need to be externally accessible because they're just iframes.

ghost commented 3 years ago

Is there any documentation on which type of URL needs to be used for each item? I know there is the help button near the url field but it doesn't seem correct for my case. Seems that different services only work with different URL types. Speedtest only loads for "speedtest or http://speedtest" and not LAN or WAN IP. Sonarr, radarr, ombi do not work for the container names, LAN address, or localhost:port and seems to need the reverse proxied domain. All of these services are running in docker on the same network and server.

HalianElf commented 3 years ago

That's all dependent to your setup. If you've got any type of auth on the external, the external isn't going to work. If Organizr isn't on the same custom bridge network as everything else, the container name isn't going to work. You need to figure out your networking. Your issues aren't specific to Organizr... it's completely your networking.

ghost commented 3 years ago

That was my thought at first too. But, I have no auth on speedtest and everything is on the same default network. My docker-compose is below. If I use the IP that I get when pinging from bash on the organizr container then it works as well, but that IP isn't static so that won't work permanently. It seems that the docker DNS resolution isn't working correctly. It's possible it's a docker problem and not organizr but I have no problem with tautulli or ombi reaching the other containers by name. Compose file below:

swag:
    image: linuxserver/swag
    container_name: swag
    cap_add:
        - NET_ADMIN
    ports:
        - 443:443
    volumes:
        - ./swag/config:/config
    restart: always
    environment:
        - PUID=1000
        - PGID=1000
        - EMAIL=xxx
        - TZ=America/Chicago
        - VALIDATION=dns
        - DNSPLUGIN=cloudflare
        - URL=xxx
        - SUBDOMAINS=wildcard
        - MAXMINDDB_LICENSE_KEY=xxx

organizr:
    image: organizr/organizr
    container_name: organizr
    environment:
      - PGID=1000
      - PUID=1000
    ports:
      - 8850:80
    volumes:
      - ./organizr:/config

speedtest:
    container_name: speedtest
    image: henrywhitaker3/speedtest-tracker
    ports:
      - 8765:80
    volumes:
      - ./speedtest:/config
    environment:
      - TZ=America/Chicago
      - PUID=1000
      - PGID=1000
      - OOKLA_EULA_GDPR=true
    logging:
      driver: "json-file"
      options:
        max-file: "10"
        max-size: "200k"
    restart: always

ombi:
    image: linuxserver/ombi
    container_name: ombi
    environment:
        - PUID=1000
        - PGID=1000
        - TZ=America/Chicago
    volumes:
        - ./ombi:/config
    ports:
        - '3579:3579'
    restart: always

tautulli:
    image: linuxserver/tautulli
    container_name: tautulli
    environment:
        - PUID=1000
        - PGID=1000
        - TZ=America/Chicago
    volumes:
        - ./tautulli:/config
        - /var/lib/plexmediaserver/Library/'Application Support'/'Plex Media Server'/Logs:/logs
    ports:
        - '8181:8181'
    restart: always

radarr:
    container_name: radarr
    restart: always
    ports:
        - '7878:7878'
    volumes:
        - ./radarr:/config
        - /data/media:/data
    environment:
        - PUID=1000
        - PGID=1000
        - TZ=America/Chicago
    image: linuxserver/radarr

sonarr:
    container_name: sonarr
    restart: always
    ports:
        - '8989:8989'
    volumes:
        - ./sonarr:/config
        - /data/media:/data
    environment:
        - PUID=1000
        - PGID=1000
        - TZ=America/Chicago
    image: linuxserver/sonarr
tendonut commented 3 years ago

Hopping in here, I'm experiencing the same thing too. Brand new Organizr installation (docker), brand new speedtest install (docker).

@MarcusJY you said you used the container name rather than the IP/Port? How does that look?

ghost commented 3 years ago

@MarcusJY you said you used the container name rather than the IP/Port? How does that look?

In the url for the speedtest options I just typed speedtest, no http, no port or anything. I think that has to match the container_name that I set in the docker-compose. I am not sure what it defaults to if you don't manually set it.

HalianElf commented 3 years ago

It should have scheme too so like my speedtest url is just http://speedtest something like tautulli that needs an alternate port is like http://tautulli:8181/tautulli but yes it should be the container_name. I'm not sure why your radarr/sonarr wouldn't work with you using compose. It is possible it's something wonky with your docker dns but weird that it's only those 2 having issues doing it that way.

ghost commented 3 years ago

Yes speedtest works with or without scheme. I think I figured it mostly out. Speedtest does not work if you add the port in the url, ombi, tautulli, radarr and sonarr need the port. I had removed their port because speedtest wouldn't work with port so I incorrectly assumed that meant everything wouldn't. So http://radarr:7878 for example, which matches what the help in the url box says. The confusion is the speedtest url help says it needs port but it does not work if I add the port.

This just leaves transmission to figure out. The DNS name doesn't work but the local IP:port works. In this case I will likely leave it as it doesn't make a difference in the end which url it uses to resolve, as long as it is local as you said was recommended. Edit: After playing around with it a bit out of curiousity: I found that following your tautulli example worked for transmission. http://tranmission:9091/transmission.

@HalianElf If I'm correct that everyone shouldn't use port for speedtest and it isn't just me, maybe the help for that field should be updated?

HalianElf commented 3 years ago

Should be fine if you do http://speedtest:80 (there's just no need to since http already means 80 by default). You just have to keep in mind that when you're using docker dns you have to use the container port and not what port you mapped.

ghost commented 3 years ago

Ok so that is the solution. I've been using the mapped port. Thanks so much for thinking this through with me!