nextcloud / nextcloud/previewgenerator

Redis issue with previewgenerator -> 503 server

Open
#416 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug needs info
Dominant language
PHP
Stars
520
Forks
55
PR merge metrics
No merged PRs in 30d

Description

EDIT

My redis-server seems to be having all kinds of problems this morning, so that appears to be the main root cause of the problem. But I think the bug report here is still valid. It seems like there is no way to change the redis settings for the previewgenerator app, or it does not honour the settings in config.php when they are updated. Perhaps there is something I am missing, but I think that needs looking into.


Original report:

My server suddently started returning 503s today. Disabling the previewgenerator app solved the problem. I originally thought it was a redis problem, because of the error message, but it was not. Removing the redis conf settings from settings.conf did not do anything. The only way to solve the problem was to disable the app using occ app:disable previewgenerator

Here's the log:

{
  "reqId": "7mugNd3ki2cFu7W0SOwc",
  "level": 3,
  "time": "2023-09-14T09:27:47+08:00",
  "remoteAddr": "13.40.122.214",
  "user": "--",
  "app": "core",
  "method": "GET",
  "url": "/index.php/apps/files/preview-service-worker.js",
  "message": "NOAUTH Authentication required.",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/117.0",
  "version": "27.0.2.1",
  "exception": {
    "Exception": "RedisException",
    "Message": "NOAUTH Authentication required.",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/Memcache/Redis.php",
        "line": 72,
        "function": "get",
        "class": "Redis",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/L10N/Factory.php",
        "line": 346,
        "function": "get",
        "class": "OC\\Memcache\\Redis",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/L10N/Factory.php",
        "line": 483,
        "function": "findAvailableLanguages",
        "class": "OC\\L10N\\Factory",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/L10N/Factory.php",
        "line": 219,
        "function": "getLanguageFromRequest",
        "class": "OC\\L10N\\Factory",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/public/Util.php",
        "line": 227,
        "function": "findLanguage",
        "class": "OC\\L10N\\Factory",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line": 111,
        "function": "addTranslations",
        "class": "OCP\\Util",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line": 77,
        "function": "initTemplateEngine",
        "class": "OC_Template",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line": 321,
        "function": "__construct",
        "class": "OC_Template",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 74,
        "function": "printExceptionErrorPage",
        "class": "OC_Template",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Memcache/Redis.php",
    "Line": 72,
    "CustomMessage": "--"
  }
}```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how Redis settings from config.php and settings.conf reach the previewgenerator app, comparing that path with the Redis connection shown in lib/private/Memcache/Redis.php. Reproduce the authentication failure and confirm that updated Redis settings are honored without causing 503 responses when previewgenerator is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, redis
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.