Want to subscribe to topics you're interested in?
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:
    5:35 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

    29,049
    6,591
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,786
    Local Time:
    5:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    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:
    5:35 AM
    Yep! It is same server. But I alway be blocked.
     
  4. eva2000

    eva2000 Administrator Staff Member

    29,049
    6,591
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,786
    Local Time:
    5:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    29,049
    6,591
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,786
    Local Time:
    5:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    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:
    5:35 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

    29,049
    6,591
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,786
    Local Time:
    5:35 AM
    Nginx 1.13.x
    MariaDB 5.5
    i use 127.0.0.1 for elasticsearch without problems :)
     
  8. HarryPotter

    HarryPotter Member

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