Join the community today
Register Now

Xenforo How To Install Elasticsearch 6.x for Xenforo

Discussion in 'Centmin Mod User Tutorials & Guides' started by Sunka, Nov 30, 2017.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,204
    305
    83
    May 31, 2014
    Ratings:
    +552
    Local Time:
    7:16 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Is an elastic search restart needed after that setting?

    Also it will survive after upgrading or restarting the server?
     
  2. pamamolf

    pamamolf Premium Member Premium Member

    3,204
    305
    83
    May 31, 2014
    Ratings:
    +552
    Local Time:
    7:16 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Did you adjust the default entries at the config file?

     
  3. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    6:16 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Still 5 shards

    Code:
    curl 'localhost:9200/_stats?human&pretty'
    {
      "_shards" : {
        "total" : 5,
        "successful" : 5,
        "failed" : 0
      },
    So how to fix that?
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    3,204
    305
    83
    May 31, 2014
    Ratings:
    +552
    Local Time:
    7:16 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Then maybe your index name is not content?
     
  5. Andy

    Andy Active Member

    432
    66
    28
    Aug 6, 2014
    Ratings:
    +90
    Local Time:
    1:16 AM
    6.3.1 is available via yum update.
     
    • Informative Informative x 2
  6. Jimmy

    Jimmy Premium Member Premium Member

    1,484
    304
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +757
    Local Time:
    1:16 AM
    1.13.x
    MariaDB 10.1.x
    Does anyone have an update for this. I'm getting an error on install. This worked the last time I tried to install elastic search. Now it's saying that the RPM isn't signed. I hesitate forcing the install.

    Code:
    ============================================================================================================================================
     Package                            Arch                        Version                        Repository                              Size
    ============================================================================================================================================
    Installing:
     elasticsearch                      noarch                      6.3.2-1                        elasticsearch-6.x                       87 M
    
    Transaction Summary
    ============================================================================================================================================
    Install  1 Package
    
    Total size: 87 M
    Installed size: 136 M
    Downloading packages:
    
    
    Package elasticsearch-6.3.2.rpm is not signed
    
     
  7. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    6:16 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Install guide not need an update.
    It was ES crew mistake!

     
    • Like Like x 1
  8. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    6:16 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Code (Text):
    # yum update
    Loaded plugins: fastestmirror, priorities, versionlock
    Determining fastest mirrors
    epel/x86_64/metalink                                                                    |  25 kB  00:00:00     
     * base: mirror.centos.org
     * epel: mirror.23media.de
     * extras: mirror.centos.org
     * rpmforge: mirror.de.leaseweb.net
     * updates: mirror.centos.org
    base                                                                                    | 3.6 kB  00:00:00     
    centos-sclo-rh                                                                          | 3.0 kB  00:00:00     
    centos-sclo-sclo                                                                        | 2.9 kB  00:00:00     
    elasticsearch-6.x                                                                       | 1.3 kB  00:00:00     
    epel                                                                                    | 3.2 kB  00:00:00     
    extras                                                                                  | 3.4 kB  00:00:00     
    mariadb                                                                                 | 2.9 kB  00:00:00     
    rpmforge                                                                                | 1.9 kB  00:00:00     
    updates                                                                                 | 3.4 kB  00:00:00     
    (1/11): base/7/x86_64/group_gz                                                          | 166 kB  00:00:00     
    (2/11): epel/x86_64/group_gz                                                            |  88 kB  00:00:00     
    (3/11): epel/x86_64/updateinfo                                                          | 928 kB  00:00:00     
    (4/11): base/7/x86_64/primary_db                                                        | 5.9 MB  00:00:00     
    (5/11): extras/7/x86_64/primary_db                                                      | 172 kB  00:00:00     
    (6/11): centos-sclo-sclo/x86_64/primary_db                                              | 289 kB  00:00:00     
    (7/11): updates/7/x86_64/primary_db                                                     | 4.2 MB  00:00:00     
    (8/11): epel/x86_64/primary                                                             | 3.5 MB  00:00:00     
    (9/11): mariadb/primary_db                                                              |  61 kB  00:00:00     
    (10/11): centos-sclo-rh/x86_64/primary_db                                               | 3.5 MB  00:00:00     
    (11/11): elasticsearch-6.x/primary                                                      |  92 kB  00:00:00     
    rpmforge/primary_db                                                                     | 125 kB  00:00:00     
    elasticsearch-6.x                                                                                      226/226
    epel                                                                                               12619/12619
    279 packages excluded due to repository priority protections
    Resolving Dependencies
    --> Running transaction check
    ---> Package clamav-data.noarch 0:0.100.0-2.el7 will be updated
    ---> Package clamav-data.noarch 0:0.100.1-1.el7 will be an update
    ---> Package clamav-filesystem.noarch 0:0.100.0-2.el7 will be updated
    ---> Package clamav-filesystem.noarch 0:0.100.1-1.el7 will be an update
    ---> Package elasticsearch.noarch 0:6.3.1-1 will be updated
    ---> Package elasticsearch.noarch 0:6.3.2-1 will be an update
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ===============================================================================================================
     Package                      Arch              Version                     Repository                    Size
    ===============================================================================================================
    Updating:
     clamav-data                  noarch            0.100.1-1.el7               epel                         159 M
     clamav-filesystem            noarch            0.100.1-1.el7               epel                          26 k
     elasticsearch                noarch            6.3.2-1                     elasticsearch-6.x             87 M
    
    Transaction Summary
    ===============================================================================================================
    Upgrade  3 Packages
    
    Total download size: 246 M
    Is this ok [y/d/N]: y
    Downloading packages:
    No Presto metadata available for elasticsearch-6.x
    epel/x86_64/prestodelta                                                                 | 1.0 kB  00:00:00     
    (1/3): clamav-data-0.100.1-1.el7.noarch.rpm                                             | 159 MB  00:00:03     
    (2/3): clamav-filesystem-0.100.1-1.el7.noarch.rpm                                       |  26 kB  00:00:00     
    (3/3): elasticsearch-6.3.2.rpm                                                          |  87 MB  00:00:04     
    ---------------------------------------------------------------------------------------------------------------
    Total                                                                           30 MB/s | 246 MB  00:00:08     
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
      Updating   : clamav-filesystem-0.100.1-1.el7.noarch                                                      1/6
      Updating   : clamav-data-0.100.1-1.el7.noarch                                                            2/6
      Updating   : elasticsearch-6.3.2-1.noarch                                                                3/6
    warning: /etc/elasticsearch/jvm.options created as /etc/elasticsearch/jvm.options.rpmnew
      Cleanup    : clamav-data-0.100.0-2.el7.noarch                                                            4/6
      Cleanup    : clamav-filesystem-0.100.0-2.el7.noarch                                                      5/6
      Cleanup    : elasticsearch-6.3.1-1.noarch                                                                6/6
    Created elasticsearch keystore in /etc/elasticsearch
      Verifying  : elasticsearch-6.3.2-1.noarch                                                                1/6
      Verifying  : clamav-data-0.100.1-1.el7.noarch                                                            2/6
      Verifying  : clamav-filesystem-0.100.1-1.el7.noarch                                                      3/6
      Verifying  : clamav-data-0.100.0-2.el7.noarch                                                            4/6
      Verifying  : elasticsearch-6.3.1-1.noarch                                                                5/6
      Verifying  : clamav-filesystem-0.100.0-2.el7.noarch                                                      6/6
    
    Updated:
      clamav-data.noarch 0:0.100.1-1.el7  clamav-filesystem.noarch 0:0.100.1-1.el7  elasticsearch.noarch 0:6.3.2-1
    
    Complete!
     
    • Like Like x 1
    • Informative Informative x 1
  9. Andy

    Andy Active Member

    432
    66
    28
    Aug 6, 2014
    Ratings:
    +90
    Local Time:
    1:16 AM
    6.4.1 is now available.
     
    • Agree Agree x 1
    • Informative Informative x 1
  10. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    6:16 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Installed last night and everything seems fine
     
    • Like Like x 1
  11. xenbiarritz

    xenbiarritz New Member

    19
    2
    3
    May 7, 2017
    Ratings:
    +2
    Local Time:
    6:16 AM
    @Sunka
    What is the correct step for xf2
    Thank you
     
  12. xenbiarritz

    xenbiarritz New Member

    19
    2
    3
    May 7, 2017
    Ratings:
    +2
    Local Time:
    6:16 AM
    same problem on xf2 did you find a solution?
     
  13. xenbiarritz

    xenbiarritz New Member

    19
    2
    3
    May 7, 2017
    Ratings:
    +2
    Local Time:
    6:16 AM
    now i have this error

    Code:
    Rejecting mapping update to [elastic] as the final mapping would have more than 1 type: [elastic, xf] in 
    i can't rebuid or remove search index from xf2

    my cluster name "elastic"

    can some one help me

    how can i delete my index or cluster? try many thing can't find solution
    don't know what to do?
     
  14. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    6:16 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    You may do that step or not. It is not to must for xf2
     
  15. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    6:16 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Nop.
    Still have default 5 shards
     
  16. Sunka

    Sunka Well-Known Member

    1,097
    297
    83
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +478
    Local Time:
    6:16 AM
    Nginx 1.15.8
    MariaDB 10.3.12
    Try rebuild search through cli.
    enter to your forum folder and run
    Code (Text):
    php cmd.php xf-rebuild:search
     
  17. xenbiarritz

    xenbiarritz New Member

    19
    2
    3
    May 7, 2017
    Ratings:
    +2
    Local Time:
    6:16 AM
    it return
    Code:
      [XF\PrintableException]                                                       
      An error was triggered while indexing. See the XenForo error log for details. 
                                                                                    
    
    xf-rebuild:search [--log-queries LOG-QUERIES] [-b|--batch BATCH] [--type TYPE] [--truncate]
     
  18. xenbiarritz

    xenbiarritz New Member

    19
    2
    3
    May 7, 2017
    Ratings:
    +2
    Local Time:
    6:16 AM
    hi @Xon thank you for your help

    it return


    Code:
      "error" : {
    
        "root_cause" : [
    
          {
    
            "type" : "index_not_found_exception",
    
            "reason" : "no such index",
    
            "resource.type" : "index_expression",
    
            "resource.id" : "_all"
    
          }
    
        ],
    
        "type" : "index_not_found_exception",
    
        "reason" : "no such index",
    
        "resource.type" : "index_expression",
    
        "resource.id" : "_all"
    
      },
    
      "status" : 404
    
    }
    
    


    in this steps

    Code:
    nano /etc/elasticsearch/elasticsearch.yml
    at the end of file add this:

    Code:
    cluster.name: CUSTOM NAME OF YOUR CLUSTER (same name should be inserted into your XenForo field in Admin Control Panel in field Elasticsearch Index Name)
    
    network.host: localhost
    
    http.port: 9200
    i choose "elastic" for my custom name


    First i configure xfes and enter "elastic" in index name

    i enable xfes and first it workes then i wanted to change the Word stemming setting in xfes and my problem start


    here are the error

    if i run optimise on xfes setting it return


    Code:
    XFES\Elasticsearch\RequestException: Rejecting mapping update to [elastic] as the final mapping would have more than 1 type: [elastic, xf] in src/addons/XFES/Elasticsearch/Api.php at line 387
    
    XFES\Elasticsearch\Api->request() in src/addons/XFES/Elasticsearch/Api.php at line 287
    
    XFES\Elasticsearch\Api->createIndex() in src/addons/XFES/Service/Optimizer.php at line 85
    
    XFES\Service\Optimizer->optimize() in src/addons/XFES/Admin/Controller/EnhancedSearch.php at line 151
    
    XFES\Admin\Controller\EnhancedSearch->actionOptimize() in src/XF/Mvc/Dispatcher.php at line 249
    
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
    
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1934
    
    XF\App->run() in src/XF.php at line 333
    
    XF::runApp() in admin.php at line 13

    if i want to rebuid search index and checked remove the index

    Code:
    XFES\Elasticsearch\RequestException: Rejecting mapping update to [elastic] as the final mapping would have more than 1 type: [elastic, xf] in src/addons/XFES/Elasticsearch/Api.php at line 387
    
    XFES\Elasticsearch\Api->request() in src/addons/XFES/Elasticsearch/Api.php at line 287
    
    XFES\Elasticsearch\Api->createIndex() in src/addons/XFES/Service/Optimizer.php at line 85
    
    XFES\Service\Optimizer->optimize() in src/addons/XFES/Search/Source/Elasticsearch.php at line 139
    
    XFES\Search\Source\Elasticsearch->truncate() in src/XF/Search/Search.php at line 127
    
    XF\Search\Search->truncate() in src/XF/Job/SearchRebuild.php at line 25
    
    XF\Job\SearchRebuild->run() in src/XF/Job/Manager.php at line 241
    
    XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 187
    
    XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 103
    
    XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
    
    XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 249
    
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
    
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
    
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1934
    
    XF\App->run() in src/XF.php at line 333
    
    XF::runApp() in admin.php at line 13

    when i run

    Code:
    curl -XGET 'localhost:9200'

    it return

    Code:
      "name" : "tywki3X",
    
      "cluster_name" : "elastic",
    
      "cluster_uuid" : "BpM-rmyfT6OzwObqGJC1gA",
    
      "version" : {
    
        "number" : "6.5.4",
    
        "build_flavor" : "default",
    
        "build_type" : "rpm",
    
        "build_hash" : "d2ef93d",
    
        "build_date" : "2018-12-17T21:17:40.758843Z",
    
        "build_snapshot" : false,
    
        "lucene_version" : "7.5.0",
    
        "minimum_wire_compatibility_version" : "5.6.0",
    
        "minimum_index_compatibility_version" : "5.0.0"
    
      },
    
      "tagline" : "You Know, for Search"
    
    }

    thank you for your help
     
  19. xenbiarritz

    xenbiarritz New Member

    19
    2
    3
    May 7, 2017
    Ratings:
    +2
    Local Time:
    6:16 AM
    and when i reconfigue in xfes i have this line

    Code:
    Index name
    
    elastic
    
    This index does not exist yet.
    when i run
    Code:
     curl -X GET "localhost:9200/_cat/indices?v"
    it return
    Code:
    health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
    
     
..