113: Host is unreachable) while connecting to upstream


  • I have been using TT-RSS for well over two years. I use the docker-compose (static) and everything was all fine until I decided to reinstall afresh on the same Linux NUC.
  • This is used at home without remote access so no SSLs or proxying.
  • I have followed the installation notes/README keenly using multiple browsers and rebooting the whole system. No luck.
  • The logs indicate an issue with web-ngix container:
    2022/09/22 21:05:53 [error] 34#34: *131 connect() failed (113: Host is unreachable) while connecting to upstream, client: 127.0.0.1, server: , request: "GET /tt-rss/index.php HTTP/1.1", upstream: "fastcgi://172.30.0.6:9000", host: "localhost"
    
    127.0.0.1 - - [22/Sep/2022:21:05:19 +0000] "GET /tt-rss/index.php HTTP/1.1" 502 157 "-" "curl/7.83.1"
    
  • After spending an unhealthy amount of time reading through most of the readings I could come about, I hit a dead-end and want to raise it here.
  • Tiny Tiny RSS version (including git commit id):
  • Platform (i.e. Linux distro, Docker, PHP, PostgreSQL, etc) versions:
  docker version 20.10.18, build b40c2f6
  docker-compose version 1.25.4, build 8d51620a
  OS: Ubuntu 20.04.5 LTS
  git log
  commit aaafe9a07409a204e8978e1c7e52f4ec3d55b315 (HEAD -> static-dockerhub, origin/static-dockerhub)
  Author: Andrew Dolgov <[email protected]>
  Date:   Sat Aug 6 13:34:03 2022 +0300

    switch to php 8.1 (again)

  • I have not touched the docker-compose.yml file.
  • Here is my file.env:
    # Copy this file to .env before building the container.
    # Put any local modifications here.
    
    # Run under this UID/GID.
    OWNER_UID=1000
    OWNER_GID=1000
    
    # FPM settings.
    PHP_WORKER_MAX_CHILDREN=5
    PHP_WORKER_MEMORY_LIMIT=256M
    
    # ADMIN_USER_* settings are applied on every startup.
    
    # Set admin user password to this value. If not set, random password will be
    # generated if default password is being used, look for it in the 'app'
    # container logs.
    #ADMIN_USER_PASS=xxx
    
    # Sets admin user access level to this value.
    # Valid values:
    # -2 - forbidden to login
    # -1 - readonly
    #  0 - default user
    # 10 - admin
    #ADMIN_USER_ACCESS_LEVEL=10
    
    # Auto create another user (in addition to built-in admin) unless it
    # already exists.
    AUTO_CREATE_USER=xxx
    AUTO_CREATE_USER_PASS=xxx
    AUTO_CREATE_USER_ACCESS_LEVEL=10 # see above
    
    # Default database credentials.
    TTRSS_DB_USER=postgres
    TTRSS_DB_NAME=postgres
    TTRSS_DB_PASS=xxx
    
    # You will likely need to set this to the correct value, see README.md
    # for more information.
    TTRSS_SELF_URL_PATH=http://192.168.0.20:8280/tt-rss
    
    # You can customize other config.php defines by setting overrides here.
    # See app/Dockerfile for complete list. Examples:
    # TTRSS_PLUGINS=auth_remote
    # TTRSS_SINGLE_USER_MODE=true
    # TTRSS_SESSION_COOKIE_LIFETIME=2592000
    # TTRSS_FORCE_ARTICLE_PURGE=30
    # etc, etc.
    
    # bind exposed port to 127.0.0.1 by default in case reverse proxy is used.
    # if you plan to run the container standalone and need origin port exposed
    # use next HTTP_PORT definition (or remove "127.0.0.1:").
    # HTTP_PORT=127.0.0.1:8280
    HTTP_PORT=8280
    

I think I may have found a culprit. The AUTO_CREATE_USER block.

When I comment out that whole block, the error disappears and everything works just fine. The logs indicate:

# Auto create another user (in addition to built-in admin) unless it
# already exists.
AUTO_CREATE_USER=xxx
AUTO_CREATE_USER_PASS=xxx
AUTO_CREATE_USER_ACCESS_LEVEL=10 # see above

app_1        | [22:23:21/596] Error: Invalid access level value: 10 # see above

I have no idea why that would be a problem as to affect web-nginx. I will not close this to allow for monitoring in the next few hours with restarts and check the robustness of the suggested problem.

i guess that’s my bad, you can’t use this syntax for .env files (it doesn’t parse comments properly).

the " # see above" should be moved to a different line.

thanks for reporting.

i’ve removed this incorrectly placed comment from the default .env files.

Thank you for the fix. I do not know how to “mark as solved” but this solved my issue.

three eternities later.jpg i managed to rebuild discourse container with “mark as solved” plugin so this should now be a thing here.

it’s in the three dots menu of the post (for staff, at least).

Thanks for posting this! I had the issue issue when my containers updated and restarted early this AM. Fortunately, I remembered reading it so was able quickly get it fixed.