Join the community today
Become a Member

Centminmod have some trouble with Elasticsearch

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by HarryPotter, Apr 7, 2015.

  1. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    10:49 AM
    Hi. Im not sure if it is, but currently I installed ElasticSearch on my VPS.

    Sometime when i try to searching it return error.
    Code:
    'Elasticsearch\Common\Exceptions\Curl\CouldNotConnectToHost' with message 'couldn't connect to host'
    I think sometime IpTables auto block port 9200. So how to alway open that port??

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:49 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you don't need to white list 9200 if elasticsearch is installed on same server as your web app that uses elasticsearch
     
    Last edited: Apr 7, 2015
  3. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    10:49 AM
    Yep! It is same server. But I alway be blocked.
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:49 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what's the web app ? xenforo ? I have no problems on xenforo on this forum and never had to white list elasticsearch

    make sure you have properly configured elasticsearch - you're on your own for that :)
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:49 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    oh obvious question, you sure you have elasticsearch running in the first place ?

    to check
    Code:
    curl -XGET 127.0.0.1:9200
    Code:
    netstat -plunt | grep 9200
     
  6. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    10:49 AM
    Code:
    [root@vps ~]# curl -XGET http://localhost:9200
    {
      "status" : 200,
      "name" : "***",
      "cluster_name" : "***",
      "version" : {
        "number" : "1.5.0",
        "build_hash" : "544816042d40151d3ce4ba4f95399d7860dc2e92",
        "build_timestamp" : "2015-03-23T14:30:58Z",
        "build_snapshot" : false,
        "lucene_version" : "4.10.4"
      },
      "tagline" : "You Know, for Search"
    }
    
    That is. I have config to localhost rather 127.0.0.1 :D

    But sometime it not work :/
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    10:49 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    i use 127.0.0.1 for elasticsearch without problems :)
     
  8. HarryPotter

    HarryPotter Member

    41
    0
    6
    Apr 3, 2015
    Ratings:
    +0
    Local Time:
    10:49 AM
    Run the command netstat... it shown 127.0.0.1
    So that is problem??