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

    4
    2
    3
    Dec 11, 2015
    Ratings:
    +2
    Local Time:
    5:08 AM
    OK, that worked! Thank you.
     
    • Like Like x 1
  2. Recep Baltas

    Recep Baltas New Member

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

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

    rdan Premium Member Premium Member

    4,255
    1,034
    113
    May 25, 2014
    Ratings:
    +1,486
    Local Time:
    10:08 AM
    Mainline
    10.2
    This tutorial is for CentOS 7.
     
    • Agree Agree x 1
  4. upgrade81

    upgrade81 Premium Member Premium Member

    133
    6
    18
    Sep 5, 2016
    Italy
    Ratings:
    +8
    Local Time:
    4:08 AM
    1.13.8
    10
    I confirm, on Centos7 everything works smoothly for me
     
    • Agree Agree x 1
  5. Andy

    Andy Premium Member Premium Member

    418
    60
    28
    Aug 6, 2014
    Ratings:
    +81
    Local Time:
    10:08 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 Premium Member Premium Member

    1,364
    287
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +704
    Local Time:
    10:08 PM
    1.13.x
    MariaDB 10.1.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

    36,009
    7,897
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,177
    Local Time:
    12:08 PM
    Nginx 1.15.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)
     
    • Like Like x 1
  8. pamamolf

    pamamolf Well-Known Member

    3,113
    295
    83
    May 31, 2014
    Ratings:
    +530
    Local Time:
    5:08 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    408
    85
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +302
    Local Time:
    3:08 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
    • Like Like x 1
  10. Jimmy

    Jimmy Premium Member Premium Member

    1,364
    287
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +704
    Local Time:
    10:08 PM
    1.13.x
    MariaDB 10.1.x
  11. pamamolf

    pamamolf Well-Known Member

    3,113
    295
    83
    May 31, 2014
    Ratings:
    +530
    Local Time:
    5:08 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hello
    I am getting this error for my IPB:

    Any help please?

    Thank you
     
  12. pamamolf

    pamamolf Well-Known Member

    3,113
    295
    83
    May 31, 2014
    Ratings:
    +530
    Local Time:
    5:08 AM
    Nginx-1.13.x
    MariaDB 10.1.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

    408
    85
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +302
    Local Time:
    3:08 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.
     
    • Agree Agree x 1
  14. Revenge

    Revenge Active Member

    408
    85
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +302
    Local Time:
    3:08 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 Well-Known Member

    3,113
    295
    83
    May 31, 2014
    Ratings:
    +530
    Local Time:
    5:08 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    localhost
     
  16. Revenge

    Revenge Active Member

    408
    85
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +302
    Local Time:
    3:08 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" : {
          }
        }
    }'
     
    • Like Like x 2
  17. pamamolf

    pamamolf Well-Known Member

    3,113
    295
    83
    May 31, 2014
    Ratings:
    +530
    Local Time:
    5:08 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    should i edit anything on your command to align with my index name or something?
     
  18. Sunka

    Sunka Well-Known Member

    999
    275
    63
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +451
    Local Time:
    4:08 AM
    Nginx 1.15.0
    MariaDB 10.2.15
    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

    408
    85
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +302
    Local Time:
    3:08 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.
     
    • Like Like x 1
  20. Revenge

    Revenge Active Member

    408
    85
    28
    Feb 21, 2016
    Portugal
    Ratings:
    +302
    Local Time:
    3:08 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.
     
    • Informative Informative x 2
..