Join the community today
Become a Member

Xenforo How To Install Elasticsearch 6.x for Xenforo

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

  1. Recep Baltas

    Recep Baltas New Member

    5
    3
    3
    Dec 11, 2015
    Ratings:
    +3
    Local Time:
    3:13 AM
    OK, that worked! Thank you.

     
  2. Recep Baltas

    Recep Baltas New Member

    5
    3
    3
    Dec 11, 2015
    Ratings:
    +3
    Local Time:
    3:13 AM
    This code does not work on my server:

    systemctl daemon-reload
    -bash: systemctl: command not found
     
  3. rdan

    rdan Well-Known Member

    5,449
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    8:13 AM
    Mainline
    10.2
    This tutorial is for CentOS 7.
     
  4. upgrade81

    upgrade81 Member

    295
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    2:13 AM
    1.17
    10.3
    I confirm, on Centos7 everything works smoothly for me
     
  5. Andy

    Andy Active Member

    544
    89
    28
    Aug 6, 2014
    Ratings:
    +133
    Local Time:
    7:13 PM
    Anyone knows what we need to do to config ES to work over HTTPS connection?
    There is an option in Xenforo 2.0 that allows this over https.
     
  6. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    8:13 PM
    @Revenge @eva2000

    IPS has added elastic search in the new version.

    If I'm using localhost do I need to add IPs to CSF? I'm a little confused as to what needs to be done after the install as far as CSF / iptables, etc.
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,225
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    10:13 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Nothing need to be done to CSF Firewall, if Elasticsearch is running on same server as your forum/script. Only need to if you ran a remote external Elasticsearch server and need to whitelist the remote server's IP (preferably private lan IP as opposed to public IP)
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    3:13 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    I think as you will use 127.0.0.1 is not needed but it is better to wait experts to answer that :)
     
  9. Revenge

    Revenge Active Member

    469
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +354
    Local Time:
    1:13 AM
    1.9.x
    10.1.x
    You don't need to do anything in your firewall, because its localhost. It's the same thing as when IPS used Sphinx instead, and most of us also used it in localhost.

    In my case im going to use Elasticsearch in another server, but i have already configured iptables to only allow connections in elasticsearch port between both servers.

    Im just waiting for tapatalk to update their plugin to be compatible with 4.3.

    PS: Xenforo users, did you know Elasticsearch for IPS is not an addon but instead its part of IPS core and as such its free? Jealous? :whistle: :D
     
    Last edited: Apr 21, 2018
  10. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    8:13 PM
  11. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    3:13 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Hello
    I am getting this error for my IPB:

    Any help please?

    Thank you
     
  12. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    3:13 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Ok i try to add this line at elastic config /etc/elasticsearch/elasticsearch.yml :

    but when i stop and start the elastic i am getting this error:

    and that line 90 is the above line...

    Any help?

    Thank you
     
  13. Revenge

    Revenge Active Member

    469
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +354
    Local Time:
    1:13 AM
    1.9.x
    10.1.x
    Iam also getting that exception. Its when a guest go check something like page 500 of the content of some user.
    I don't think the solution is to increase that value, as it can increasy way too much the memory consumption.

    I have opened a ticket with them.
     
  14. Revenge

    Revenge Active Member

    469
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +354
    Local Time:
    1:13 AM
    1.9.x
    10.1.x
    @pamamolf do you have your elasticsearch in an external server or localhost? I was forced to install on localhost because it was slowing down the submitting of new posts by a second or two.
     
  15. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    3:13 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    localhost
     
  16. Revenge

    Revenge Active Member

    469
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +354
    Local Time:
    1:13 AM
    1.9.x
    10.1.x
    @pamamolf elasticsearch by default uses 5 shards, but they suggest to use only 1 shard per node. Having more than 1 shard in a node will simple slowdown elasticsearch.

    You can alter the number of shards by creating a template in elasticsearch and then you simple reindex the search data.

    You just need to run this and you are all set.

    Code:
    curl -XPUT http://localhost:9200/_template/content -H 'Content-Type: application/json' -d '
    {
        "template" : "content*",
        "settings" : {
          "number_of_shards": 1
        },
        "mappings" : {
          "content" : {
          }
        }
    }'
     
  17. pamamolf

    pamamolf Premium Member Premium Member

    4,101
    428
    83
    May 31, 2014
    Ratings:
    +837
    Local Time:
    3:13 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    should i edit anything on your command to align with my index name or something?
     
  18. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    2:13 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    I am confused.
    Tried this code and result is
    Code:
    {"acknowledged":true}
    Restarted elasticsearch
    Reindex search after that
    but output for
    curl -XGET 'localhost:9200/_cat/shards'
    is still 5 shards?

    So how to have only one shard?
     
  19. Revenge

    Revenge Active Member

    469
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +354
    Local Time:
    1:13 AM
    1.9.x
    10.1.x
    If the name of your index is "content", its the default in ips, you don't need to change anything.
     
  20. Revenge

    Revenge Active Member

    469
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +354
    Local Time:
    1:13 AM
    1.9.x
    10.1.x
    curl 'localhost:9200/_stats?human&pretty'

    With that command right in the beginning what it says about the shards? Mine says this:

    Code:
    {
      "_shards" : {
        "total" : 2,
        "successful" : 1,
        "failed" : 0
    Before was:

    Code:
    {
      "_shards" : {
        "total" : 10,
        "successful" : 5,
        "failed" : 0
    Another way to check, is to go search for the shards on the disk.

    Go to this folder: /var/lib/elasticsearch/nodes/0/indices/

    Inside that folder you have another one with random chars, enter it.

    Here if you only see a folder with the name "0", you only have 1 shard. If you see 5 folders, 0, 1, 2, 3 and 4, you have 5 shards.