Indexing doesn't start

I have installed Elasticsearch and I confirmed that it is running on my NC13RC4 server. I have also installed the two fulltextsearch apps from the app store and configured them according to the documentation.

However, when I run

sudo -u www-data php ./occ fulltextsearch:index

Indexing doesn’t start… there are also no errors in the nextcloud.log regarding fulltextsearch. Any hint, on how I can approach this?

root@cloud:/var/www/nextcloud# sudo -u www-data php ./occ fulltextsearch:reset
reset.
root@cloud:/var/www/nextcloud# sudo -u www-data php ./occ fulltextsearch:index
indexing.
root@cloud:/var/www/nextcloud# sudo -u www-data php ./occ fulltextsearch:live
live.
- RAM: 22.680480957031
- RAM: 22.680480957031
- RAM: 22.680480957031
- RAM: 22.680480957031
- RAM: 22.680480957031

Any details on your Nextcloud setup ?

Sure… here we go…

Server configuration detail

Operating system: Linux 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64

Webserver: Apache/2.4.25 (Debian) (apache2handler)

Database: mysql 10.1.26

PHP version: 7.0.19-1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, apc, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, json, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 13.0.0 RC 4 - 13.0.0.13

Updated from an older Nextcloud/ownCloud or fresh install:
updated from NC13 RC 2
Where did you install Nextcloud from:

Signing status

Array

List of activated apps
Enabled:
 - activity: 2.6.1
 - admin_audit: 1.3.0
 - apporder: 0.4.1
 - bookmarks: 0.10.1
 - bruteforcesettings: 1.0.3
 - calendar: 1.5.7
 - circles: 0.13.6
 - comments: 1.3.0
 - contacts: 2.0.1
 - dav: 1.4.6
 - deck: 0.3.0
 - end_to_end_encryption: 1.0.2
 - external: 3.0.1
 - federatedfilesharing: 1.3.1
 - federation: 1.3.0
 - files: 1.8.0
 - files_accesscontrol: 1.3.0
 - files_pdfviewer: 1.2.0
 - files_retention: 1.2.0
 - files_sharing: 1.5.0
 - files_texteditor: 2.5.1
 - files_trashbin: 1.3.0
 - files_versions: 1.6.0
 - files_videoplayer: 1.2.0
 - firstrunwizard: 2.2.1
 - fulltextsearch: 0.5.1
 - fulltextsearch_elasticsearch: 0.5.1
 - gallery: 18.0.0
 - groupfolders: 1.2.0
 - issuetemplate: 0.3.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.1.0
 - mindmaps: 0.1.0
 - nextcloud_announcements: 1.2.0
 - notifications: 2.1.2
 - oauth2: 1.1.0
 - onlyoffice: 1.2.0
 - passman: 2.1.4
 - password_policy: 1.3.0
 - previewgenerator: 1.0.9
 - provisioning_api: 1.3.0
 - registration: 0.3.1
 - serverinfo: 1.3.0
 - sharebymail: 1.3.0
 - spreed: 3.0.1
 - survey_client: 1.1.0
 - systemtags: 1.3.0
 - theming: 1.4.1
 - twofactor_backupcodes: 1.2.3
 - twofactor_totp: 1.4.1
 - twofactor_u2f: 1.5.1
 - updatenotification: 1.3.0
 - user_ldap: 1.3.1
 - workflowengine: 1.3.0
Disabled:
 - encryption
 - files_external
 - richdocuments
 - user_external

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "cloud.stephanbudach.de"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/cloud.stephanbudach.de",
    "dbtype": "mysql",
    "version": "13.0.0.13",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "logtimezone": "GMT+2",
    "installed": true,
    "ldapIgnoreNamingRules": false,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "25",
    "loglevel": 4,
    "htaccess.RewriteBase": "\/",
    "filelocking.enabled": "true",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "trashbin_retention_obligation": "auto",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379
    },
    "maintenance": false,
    "enable_previews": true,
    "preview_max_x": 2048,
    "preview_max_y": 2048,
    "updater.release.channel": "beta",
    "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
    "mail_smtpauth": 1,
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "theme": "",
    "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
    "log_rotate_size": 262144000,
    "log_type": "file"
}

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: LDAP

LDAP configuration (delete this part if not used)
+-------------------------------+---------------------------------------------+
| Configuration                 | s01                                         |
+-------------------------------+---------------------------------------------+
| hasMemberOfFilterSupport      | 1                                           |
| hasPagedResultSupport         |                                             |
| homeFolderNamingRule          | attr:uid                                    |
| lastJpegPhotoLookup           | 0                                           |
| ldapAgentName                 |                                             |
| ldapAgentPassword             | ***                                         |
| ldapAttributesForGroupSearch  | cn;apple-generateduid                       |
| ldapAttributesForUserSearch   | mail;cn                                     |
| ldapBackupHost                |                                             |
| ldapBackupPort                |                                             |
| ldapBase                      | dc=stephanbudach,dc=de                      |
| ldapBaseGroups                | cn=groups,dc=stephanbudach,dc=de            |
| ldapBaseUsers                 | cn=users,dc=stephanbudach,dc=de             |
| ldapCacheTTL                  | 6000                                        |
| ldapConfigurationActive       | 1                                           |
| ldapDefaultPPolicyDN          |                                             |
| ldapDynamicGroupMemberURL     |                                             |
| ldapEmailAttribute            | mail                                        |
| ldapExperiencedAdmin          | 1                                           |
| ldapExpertUUIDGroupAttr       |                                             |
| ldapExpertUUIDUserAttr        |                                             |
| ldapExpertUsernameAttr        | uid                                         |
| ldapGidNumber                 | gidNumber                                   |
| ldapGroupDisplayName          | cn                                          |
| ldapGroupFilter               | (&(|(objectclass=posixGroup)))              |
| ldapGroupFilterGroups         |                                             |
| ldapGroupFilterMode           | 0                                           |
| ldapGroupFilterObjectclass    | posixGroup                                  |
| ldapGroupMemberAssocAttr      | memberUid                                   |
| ldapHost                      | mac-mini-wozi.stephanbudach.de              |
| ldapIgnoreNamingRules         |                                             |
| ldapLoginFilter               | (&(|(objectclass=inetOrgPerson))(uid=%uid)) |
| ldapLoginFilterAttributes     |                                             |
| ldapLoginFilterEmail          | 1                                           |
| ldapLoginFilterMode           | 0                                           |
| ldapLoginFilterUsername       | 1                                           |
| ldapNestedGroups              | 0                                           |
| ldapOverrideMainServer        |                                             |
| ldapPagingSize                | 5000                                        |
| ldapPort                      | 389                                         |
| ldapQuotaAttribute            |                                             |
| ldapQuotaDefault              |                                             |
| ldapTLS                       | 0                                           |
| ldapUserDisplayName           | cn                                          |
| ldapUserDisplayName2          |                                             |
| ldapUserFilter                | (|(objectclass=person))                     |
| ldapUserFilterGroups          |                                             |
| ldapUserFilterMode            | 1                                           |
| ldapUserFilterObjectclass     | person                                      |
| ldapUuidGroupAttribute        | auto                                        |
| ldapUuidUserAttribute         | auto                                        |
| turnOffCertCheck              | 0                                           |
| turnOnPasswordChange          | 0                                           |
| useMemberOfToDetectMembership | 1                                           |
+-------------------------------+---------------------------------------------+```
</details>

## Client configuration

**Browser:** Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:57.0) Gecko/20100101 Firefox/57.0

**Operating system:** : macOS HighSierra


Anything else, I can provide?

Have you installed this apps:

https://apps.nextcloud.com/apps/files_fulltextsearch

Well… shoot… I have been missing that one. I just installed it and now, I am facinbg the same issue as some other poster had, when trying to run the indexer:

[OCA\FullTextSearch_ElasticSearch\Exceptions\ConfigurationException]
  please add ingest-attachment plugin to elasticsearch

I do have the plugin installed and the elasticsearch service has been stopped and restartet and it looks to me, like the ingest-attachment plugin has been loaded successfully:

[2018-02-05T14:02:06,695][INFO ][o.e.n.Node               ] [JnFUoja] stopping ...
[2018-02-05T14:02:06,837][INFO ][o.e.n.Node               ] [JnFUoja] stopped
[2018-02-05T14:02:06,837][INFO ][o.e.n.Node               ] [JnFUoja] closing ...
[2018-02-05T14:02:06,858][INFO ][o.e.n.Node               ] [JnFUoja] closed
[2018-02-05T14:02:24,365][INFO ][o.e.n.Node               ] [] initializing ...
[2018-02-05T14:02:24,534][INFO ][o.e.e.NodeEnvironment    ] [JnFUoja] using [1] data paths, mounts [[/ (/dev/mapper/cloud--vg-root)]], net usable_space [9.1gb], net total_space [13.4gb], types [ext4]
[2018-02-05T14:02:24,535][INFO ][o.e.e.NodeEnvironment    ] [JnFUoja] heap size [1007.3mb], compressed ordinary object pointers [true]
[2018-02-05T14:02:24,552][INFO ][o.e.n.Node               ] node name [JnFUoja] derived from node ID [JnFUojakRk-IW86ef-6_dw]; set [node.name] to override
[2018-02-05T14:02:24,552][INFO ][o.e.n.Node               ] version[6.1.3], pid[85597], build[af51318/2018-01-26T18:22:55.523Z], OS[Linux/4.9.0-3-amd64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_151/25.151-b12]
[2018-02-05T14:02:24,553][INFO ][o.e.n.Node               ] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch]
[2018-02-05T14:02:26,075][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [aggs-matrix-stats]
[2018-02-05T14:02:26,076][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [analysis-common]
[2018-02-05T14:02:26,076][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [ingest-common]
[2018-02-05T14:02:26,076][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [lang-expression]
[2018-02-05T14:02:26,076][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [lang-mustache]
[2018-02-05T14:02:26,076][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [lang-painless]
[2018-02-05T14:02:26,076][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [mapper-extras]
[2018-02-05T14:02:26,076][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [parent-join]
[2018-02-05T14:02:26,076][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [percolator]
[2018-02-05T14:02:26,077][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [reindex]
[2018-02-05T14:02:26,077][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [repository-url]
[2018-02-05T14:02:26,077][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [transport-netty4]
[2018-02-05T14:02:26,077][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded module [tribe]
[2018-02-05T14:02:26,078][INFO ][o.e.p.PluginsService     ] [JnFUoja] loaded plugin [ingest-attachment]
[2018-02-05T14:02:28,016][INFO ][o.e.d.DiscoveryModule    ] [JnFUoja] using discovery type [zen]
[2018-02-05T14:02:28,989][INFO ][o.e.n.Node               ] initialized
[2018-02-05T14:02:28,989][INFO ][o.e.n.Node               ] [JnFUoja] starting ...
[2018-02-05T14:02:29,147][INFO ][o.e.t.TransportService   ] [JnFUoja] publish_address {10.10.0.246:9300}, bound_addresses {10.10.0.246:9300}
[2018-02-05T14:02:29,167][INFO ][o.e.b.BootstrapChecks    ] [JnFUoja] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2018-02-05T14:02:32,244][INFO ][o.e.c.s.MasterService    ] [JnFUoja] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {JnFUoja}{JnFUojakRk-IW86ef-6_dw}{jN3Ywh6AS7KgnUYAFz4bFQ}{10.10.0.246}{10.10.0.246:9300}
[2018-02-05T14:02:32,249][INFO ][o.e.c.s.ClusterApplierService] [JnFUoja] new_master {JnFUoja}{JnFUojakRk-IW86ef-6_dw}{jN3Ywh6AS7KgnUYAFz4bFQ}{10.10.0.246}{10.10.0.246:9300}, reason: apply cluster state (from master [master {JnFUoja}{JnFUojakRk-IW86ef-6_dw}{jN3Ywh6AS7KgnUYAFz4bFQ}{10.10.0.246}{10.10.0.246:9300} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
[2018-02-05T14:02:32,288][INFO ][o.e.h.n.Netty4HttpServerTransport] [JnFUoja] publish_address {10.10.0.246:9200}, bound_addresses {10.10.0.246:9200}
[2018-02-05T14:02:32,288][INFO ][o.e.n.Node               ] [JnFUoja] started
[2018-02-05T14:02:32,497][INFO ][o.e.g.GatewayService     ] [JnFUoja] recovered [1] indices into cluster_state
[2018-02-05T14:02:32,829][INFO ][o.e.c.r.a.AllocationService] [JnFUoja] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[blog][2], [blog][4], [blog][3], [blog][0]] ...]).

Can you do the same edit than I asked there ?

Sure, but can you be more specific as of which file you’re referring to. I already digged around and I believe, that you refer to apps/fulltextsearch/lib/Service, no?

Around line 85, there is the following:

/**
 * @param Runner $runner
 */
public function setRunner(Runner $runner) {
        $this->runner = $runner;
    }

Do you mean this file?

lib/Service/IndexService.php

Ahh got it… and ha ha… I didn’t know…

[OCA\FullTextSearch_ElasticSearch\Exceptions\ConfigurationException]
  please add ingest-attachment plugin to elasticsearch{"error":{"root_cause":[{"type":"invalid_index
  _name_exception","reason":"Invalid index name [budysCloud], must be lowercase","index_uuid":"_na_"
  ,"index":"budysCloud"}],"type":"invalid_index_name_exception","reason":"Invalid index name [budysC
  loud], must be lowercase","index_uuid":"_na_","index":"budysCloud"},"status":400}

Using a lowercase name for the index works and indexing is now underway.

Great - thanks!

thanks for your report

#apps:fullnextsearch-elasticsearch

Hello every one
can any one give the solution for my issue on elastic search