saltyorg / Saltbox

Ansible-based solution for rapidly deploying a Docker containerized cloud media server.
https://docs.saltbox.dev
GNU General Public License v3.0
573 stars 65 forks source link

Autoscan is not accessible locally or otherwise #67

Closed vpatel9202 closed 2 years ago

vpatel9202 commented 2 years ago

Describe the bug When using Authelia (and perhaps without Authelia, not sure), autoscan is not available to any service locally or via external URL. For example, attempting to go to https://autoscan.my.tld results in a 404 error page. Attempting to access https://autoscan.my.tld and http://autoscan:3030 from inside an *Arr container also results in a 404 error.

I double checked this by running curl -s --head --request GET autoscan:3030 and curl -s --head --request GET autoscan.my.tld from inside multiple containers but the result is always the same:

HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
Request-Id: c98iv27f2ncg2ib9fp00
X-Content-Type-Options: nosniff
Date: Sat, 09 Apr 2022 07:02:32 GMT
Content-Length: 19

I double checked and the container is on the correct docker network (saltbox) so I don't understand what would stop it from being accessible, at least locally. Traefik shouldn't even enter the picture with inter-container communication. I also tried restarting the autoscan container without authorization enabled but no luck. I don't think that should matter either as it should still return a 401 code rather than 303.

Expected behavior Compare the above with the result when trying to access another container, say Plex (curl -s --head --request GET plex:32400):

HTTP/1.1 401 Unauthorized
X-Plex-Protocol: 1.0
Content-Length: 193
Content-Type: text/html
Connection: close
Cache-Control: no-cache
Date: Sat, 09 Apr 2022 07:03:20 GMT

The autoscan container is basically invisible to outside of its own container which means there is no way for *Arr suite to send requests.

Logs Log looks fine:

GNU nano 4.8                                               activity.log                                                          
Apr  9 01:49:31 INF Initialised processor anchors=["/mnt/unionfs/plex_autoscan.anchor"] min_age=5m0s
Apr  9 01:49:31 INF Initialised triggers bernard=0 inotify=1 lidarr=0 manual=1 radarr=2 sonarr=2
Apr  9 01:49:31 INF Starting server on port 3030
Apr  9 01:49:31 INF Initialised targets autoscan=0 emby=0 jellyfin=0 plex=1
Apr  9 01:49:31 INF Initialised version="1.3.0 (5c66ab8@1646220421)"
Apr  9 01:49:31 INF Processor started
saltydk commented 2 years ago

Autoscan does not use Authelia, and also does not show anything on the https://autoscan.domain.tld endpoint unless you also add /triggers/manual

vpatel9202 commented 2 years ago

Right, I guess I should have mentioned that but I have a manual trigger set up. Also, regardless of whether or not it shows a web UI, the fact that the URLs are not resolving means that none of the Arr apps can talk to autoscan via webhook, so autoscan can't function at all.

saltydk commented 2 years ago

My point is that curl -s --head --request GET autoscan.my.tld will never do anything as the manual trigger endpoint is the only page it'll ever show you.

saltydk commented 2 years ago

Example being


curl -s --head --request GET https://autoscan.domain.tld
HTTP/2 404
content-type: text/plain; charset=utf-8
date: Sat, 09 Apr 2022 10:01:10 GMT
request-id: c98lipnf2ncm9e4n5is0
vary: Accept-Encoding
x-content-type-options: nosniff
x-robots-tag: none,noarchive,nosnippet,notranslate,noimageindex
x-xss-protection: 1; mode=block
content-length: 19

curl -s --head --request GET https://autoscan.domain.tld/triggers/manual
HTTP/2 401
date: Sat, 09 Apr 2022 10:01:18 GMT
request-id: c98lirnf2ncm9e4n5isg
vary: Accept-Encoding
www-authenticate: Basic realm="Autoscan 1.x"
x-content-type-options: nosniff
x-robots-tag: none,noarchive,nosnippet,notranslate,noimageindex
x-xss-protection: 1; mode=block
content-length: 0