Want to subscribe to topics you're interested in?
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:
    5:04 AM
    OK, that worked! Thank you.
     
  2. Recep Baltas

    Recep Baltas New Member

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

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

    rdan Well-Known Member

    4,988
    1,186
    113
    May 25, 2014
    Ratings:
    +1,808
    Local Time:
    11:04 AM
    Mainline
    10.2
    This tutorial is for CentOS 7.
     
  4. upgrade81

    upgrade81 Premium Member Premium Member

    266
    16
    18
    Sep 5, 2016
    Italy
    Ratings:
    +27
    Local Time:
    4:04 AM
    1.17
    10.3
    I confirm, on Centos7 everything works smoothly for me
     
  5. Andy

    Andy Premium Member Premium Member

    477
    77
    28
    Aug 6, 2014
    Ratings:
    +109
    Local Time:
    11:04 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,706
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    11:04 PM
    1.17.x
    MariaDB 10.3.x
    @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

    45,434
    10,311
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,991
    Local Time:
    1:04 PM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    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

    3,858
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    5:04 AM
    Nginx-1.17.x
    MariaDB 10.3.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

    458
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +350
    Local Time:
    3:04 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,706
    365
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +923
    Local Time:
    11:04 PM
    1.17.x
    MariaDB 10.3.x
  11. pamamolf

    pamamolf Premium Member Premium Member

    3,858
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    5:04 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello
    I am getting this error for my IPB:

    Any help please?

    Thank you
     
  12. pamamolf

    pamamolf Premium Member Premium Member

    3,858
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    5:04 AM
    Nginx-1.17.x
    MariaDB 10.3.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

    458
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +350
    Local Time:
    3:04 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

    458
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +350
    Local Time:
    3:04 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

    3,858
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    5:04 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    localhost
     
  16. Revenge

    Revenge Active Member

    458
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +350
    Local Time:
    3:04 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

    3,858
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    5:04 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    should i edit anything on your command to align with my index name or something?
     
  18. Sunka

    Sunka Well-Known Member

    1,142
    313
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +510
    Local Time:
    4:04 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

    458
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +350
    Local Time:
    3:04 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

    458
    93
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +350
    Local Time:
    3:04 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.