nextcloud / fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
https://apps.nextcloud.com/apps/fulltextsearch_elasticsearch
GNU Affero General Public License v3.0
81 stars 30 forks source link

Elastic errors: Private methods and Required parameters #139

Open adi-dev opened 3 years ago

adi-dev commented 3 years ago

I had Elastic Search installed on my Nextcloud server some time ago until it stopped working due to compatibility issues. Recently decided to give it another go, but I hit something I cannot overcome: The installation and configuration gone flawless. When I start fulltextsearch:index is seams to start but stops after a few seconds with no error in console. I have errors in Nextcloud log though:

[
  {
    "reqId": "5NTySXef6eyl4iTqarEo",
    "level": 3,
    "time": "2021-04-26T13:31:30+00:00",
    "remoteAddr": "",
    "user": "--",
    "app": "PHP",
    "method": "",
    "url": "--",
    "message": "Private methods cannot be final as they are never overridden by other classes at /var/www/nextcloud/lib/private/FullTextSearch/Model/IndexDocument.php#725",
    "userAgent": "--",
    "version": "21.0.1.1",
    "id": "6086c0b20e3a0"
  },
  {
    "reqId": "5NTySXef6eyl4iTqarEo",
    "level": 3,
    "time": "2021-04-26T13:31:20+00:00",
    "remoteAddr": "",
    "user": "--",
    "app": "PHP",
    "method": "",
    "url": "--",
    "message": {
      "Exception": "Error",
      "Message": "Required parameter $internalPath follows optional parameter $mountId at /var/www/nextcloud/lib/private/Files/Config/CachedMountFileInfo.php#34",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/nextcloud/lib/composer/composer/ClassLoader.php",
          "line": 478,
          "function": "onError",
          "class": "OC\\Log\\ErrorHandler",
          "type": "::"
        },
        {
          "file": "/var/www/nextcloud/lib/composer/composer/ClassLoader.php",
          "line": 478,
          "function": "include"
        },
        {
          "file": "/var/www/nextcloud/lib/composer/composer/ClassLoader.php",
          "line": 346,
          "function": "Composer\\Autoload\\includeFile"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Files/Config/UserMountCache.php",
          "line": 342,
          "function": "loadClass",
          "class": "Composer\\Autoload\\ClassLoader",
          "type": "->"
        },
        {
          "function": "OC\\Files\\Config\\{closure}",
          "class": "OC\\Files\\Config\\UserMountCache",
          "type": "->",
          "args": [
            "*** sensitive parameters replaced ***"
          ]
        },
        {
          "file": "/var/www/nextcloud/lib/private/Files/Config/UserMountCache.php",
          "line": 341,
          "function": "array_map"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Files/Node/Folder.php",
          "line": 371,
          "function": "getMountsForFileId",
          "class": "OC\\Files\\Config\\UserMountCache",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php",
          "line": 514,
          "function": "getById",
          "class": "OC\\Files\\Node\\Folder",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php",
          "line": 417,
          "function": "getPathFromViewerId",
          "class": "OCA\\Files_FullTextSearch\\Service\\FilesService",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php",
          "line": 367,
          "function": "generateFilesDocumentFromFile",
          "class": "OCA\\Files_FullTextSearch\\Service\\FilesService",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/files_fulltextsearch/lib/Service/FilesService.php",
          "line": 268,
          "function": "generateFilesDocumentFromParent",
          "class": "OCA\\Files_FullTextSearch\\Service\\FilesService",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/files_fulltextsearch/lib/Provider/FilesProvider.php",
          "line": 252,
          "function": "getFilesFromUser",
          "class": "OCA\\Files_FullTextSearch\\Service\\FilesService",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Service/IndexService.php",
          "line": 192,
          "function": "generateIndexableDocuments",
          "class": "OCA\\Files_FullTextSearch\\Provider\\FilesProvider",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php",
          "line": 410,
          "function": "indexProviderContentFromUser",
          "class": "OCA\\FullTextSearch\\Service\\IndexService",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/apps/fulltextsearch/lib/Command/Index.php",
          "line": 273,
          "function": "indexProvider",
          "class": "OCA\\FullTextSearch\\Command\\Index",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/symfony/console/Command/Command.php",
          "line": 255,
          "function": "execute",
          "class": "OCA\\FullTextSearch\\Command\\Index",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/core/Command/Base.php",
          "line": 169,
          "function": "run",
          "class": "Symfony\\Component\\Console\\Command\\Command",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/symfony/console/Application.php",
          "line": 1009,
          "function": "run",
          "class": "OC\\Core\\Command\\Base",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/symfony/console/Application.php",
          "line": 273,
          "function": "doRunCommand",
          "class": "Symfony\\Component\\Console\\Application",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/3rdparty/symfony/console/Application.php",
          "line": 149,
          "function": "doRun",
          "class": "Symfony\\Component\\Console\\Application",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Console/Application.php",
          "line": 215,
          "function": "run",
          "class": "Symfony\\Component\\Console\\Application",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/console.php",
          "line": 100,
          "function": "run",
          "class": "OC\\Console\\Application",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/occ",
          "line": 11,
          "args": [
            "/var/www/nextcloud/console.php"
          ],
          "function": "require_once"
        }
      ],
      "File": "/var/www/nextcloud/lib/private/Log/ErrorHandler.php",
      "Line": 92,
      "CustomMessage": "--"
    },
    "userAgent": "--",
    "version": "21.0.1.1",
    "id": "6086c0a8d3cac"
  }
]

After that, fulltextsearch:index throws:

In RunningService.php line 86:

  Index is already running

fulltextsearch:index [--output [OUTPUT]] [-r|--no-readline] [--] [<options>]

Only way, I found, to clear this fault is fulltextsearch:stop

My setup (all normal install, no Docker etc): Nextcloud 21.0.1 with Full text search + Full text search - Elastic Platform and Full text search - Files. All apps up to date as 26/4/2021 PHP 8.0.3 pgsql 12.6 one Ubuntu