I managed to break tt-rss docker container, here's my story

I’m seeing the same issue that shabble is seeing, except I don’t have extra slashes in my path. In my docker .env file, I have it defined as:

TTRSS_SELF_URL_PATH=https://rss.mydomain.tld

In the ttrss_app docker volume under tt-rss the feed-icons/ folder only has an index.html as expected. Under cache/feed-icons/ I have a number of numerically named files, with no suffix, which from what I read is to also be expected. So it appears the housekeeping tasks are running as expected.

git log shows the version in the docker “app” container is running commit 292ca86665d13582028d32d6d40bbb6f4d8f5cc1. The docker-compose commit version is 3491194167200e2d27ed2de17d6e1acfd98b0fe3 (looks like php8.1 related stuffs).

I don’t see anything odd, URL wise, in the logs for nginx container either:

web-nginx_1  | 172.21.0.1 - - [28/Nov/2022:21:25:58 +0000] "GET /public.php?op=feed_icon&id=134 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
web-nginx_1  | 172.21.0.1 - - [28/Nov/2022:21:25:58 +0000] "GET /public.php?op=feed_icon&id=6 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
web-nginx_1  | 172.21.0.1 - - [28/Nov/2022:21:25:58 +0000] "GET /public.php?op=feed_icon&id=74 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
web-nginx_1  | 172.21.0.1 - - [28/Nov/2022:21:25:58 +0000] "GET /public.php?op=feed_icon&id=133 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
web-nginx_1  | 172.21.0.1 - - [28/Nov/2022:21:25:58 +0000] "GET /public.php?op=feed_icon&id=194 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"
web-nginx_1  | 172.21.0.1 - - [28/Nov/2022:21:25:58 +0000] "GET /public.php?op=feed_icon&id=46 HTTP/1.1" 404 153 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0"

Anything else I’m missing information wise?

TT-RSS expects to be hosted in the subdirectory “/tt-rss”.

TT-RSS expects to be hosted in the subdirectory “/tt-rss”.

Expects? Or requires? They’re generally two different things, and until this change I’ve run tt-rss under a subdomain since close to when Google Reader was shutdown without issues. I’ve not seen an issue with any other caching or missing icons. As the url is reading a file on the local file system based on the cache directory, I’m also not sure how that’d be impacted by the URL as it’s reading a local file system to feed the data back to the end user. I’ll admit that I’ve not looked at that code though, so maybe I’m missing how it’d be impacted.

1 Like

FWIW, I have been using a subdomain for TT-RSS for a few years, and it still works after I upgraded to the latest commit yesterday. I need to trigger a global feed updates as mentioned in Favicons cache implementation overhaul - #2 by yan12125 to get icons back.

stock docker container expects and requires /tt-rss/ path, tt-rss itself doesn’t.

Ahh, yes I forgot I’d tweaked the web-nginx/nginx.conf file to not have the /tt-rss in it. I probably need to dig into that a bit more. I’d still expect that it’d work, as the files were moved successfully and all the other disk caching stuff seems to be operational (that I can tell). Anyway, that’ll teach me for poking at things to try making my life easier, I’ll do some more poking.

$ git diff
diff --git a/web-nginx/Dockerfile b/web-nginx/Dockerfile
index 50d976b..83ce0d5 100644
--- a/web-nginx/Dockerfile
+++ b/web-nginx/Dockerfile
@@ -1,5 +1,5 @@
 FROM nginx:alpine
 
-HEALTHCHECK CMD curl --fail http://localhost/tt-rss/index.php || exit 1
+HEALTHCHECK CMD curl --fail http://localhost/index.php || exit 1
 
 COPY nginx.conf /etc/nginx/nginx.conf
diff --git a/web-nginx/nginx.conf b/web-nginx/nginx.conf
index 40b11f7..75ddc29 100644
--- a/web-nginx/nginx.conf
+++ b/web-nginx/nginx.conf
@@ -23,14 +23,14 @@ http {
        server {
                listen 80;
                listen [::]:80;
-               root /var/www/html;
+               root /var/www/html/tt-rss;
 
-               location /tt-rss/cache {
+               location /cache {
                        aio threads;
                        internal;
                }
 
-               location /tt-rss/backups {
+               location /backups {
                        internal;
                }

Okay, figured out the cause why it’s “broken” in the docker container if you want to use a subdomain and not a subdirectory. The nginx_xaccel plugin, pulled from git, has a hard set path for NGINX_XACCEL_PREFIX of /tt-rss which ignores the variable being set in app/config.docker.php. So even if you modified the nginx stuff like in my previous post, and edited app/config.docker.php, it still ends up broken.

I know this is probably outside the scope because the docker container is supposed to be run as /tt-rss. I figured I’d drop this here just in case somebody else was breaking the container like I am, and couldn’t figure out why.

i hope at some point you’re going to understand that posting your self-inflicted issues in an unrelated thread is not helping anyone, you’re just lowering overall signal-to-noise ratio here and confusing people for no reason.

i’m going to move your posts to a separate “i broke tt-rss docker container because i don’t know any better” thread, consider this a hint.

TLDR: was your issue related to favicons overhaul? no, it wasn’t. then stop shitting up this thread.

I have an instance of TT-RSS running in the root directory of my domani without any problem until the change in favicon cache. I’m using a docker setup with the recommended configuration, overwriting only the nginx.conf file in the nginx container with a version not having the tt-rss subpath.
After that change feed icons started to return 404 (everything else seems to work).

It turns out that the issue is related to having TT-RSS running in the root of the domain, since re-adding the prefix tt-rss in nginx.conf (and in the TTRSS_SELF_URL_PATH configuration variable) fixed it.

The problem was not in tt-rss itself but in the plugin ttrss-nginx-xaccel, since it does not read the NGINX_XACCEL_PREFIX constant defined in config.php (changing it was my first attempt) but hardcode the path /tt-rss.
Editing the file tt-rss/plugins.local/nginx_xaccel/init.php in the app container fixed the issue in my setup.

I understand that my setup is not officially supported (and may not be stable), but I think that sharing my experience can still be useful to someone.

it’s not hardcoding anything, you’re linking to the default value of a configurable option.

https://tt-rss.org/wiki/GlobalConfig

constants like this one were removed a long time ago.

It’d appear the docker config file hasn’t been updated to reflect that change, and I think that is what has caught both myself and came88 out. Line 10 in app/config.docker.php still lists it as define and not putenv.

https://git.tt-rss.org/fox/ttrss-docker-compose.git/tree/app/config.docker.php#n10

That’d certainly explain why changing it did nothing, and it was ignored.

that’s just a relic of ye olde times, it is not needed (because it’s the default) and should be removed altogether. i’ll make a note.

You were right, simply adding TTRSS_NGINX_XACCEL_PREFIX= in my .env fixed the favicons without modifying any core file.
Thanks

1 Like