Primary shard is not active or isn't assigned is a known node ?

前端 未结 4 787
既然无缘
既然无缘 2021-02-07 04:37

I am running an elastic search version 4.1 on windows 8. I tried to index a document through java. When running a JUNIT test the error appears as below.

org.el         


        
4条回答
  •  长情又很酷
    2021-02-07 04:39

    In my case the culprit was port 9300. It was blocked.

    Elasticsearch will bind to a single port for both HTTP and the node/transport APIs.

    It'll try the lowest available port first, and if it is already taken, try the next. If you run a single node on your machine, it'll only bind to 9200 and 9300.

    So I unblocked port 9300 and I was good to go.

    In REDHAT linux to unblock a port.

    sudo firewall-cmd --zone=public --add-port=9300/tcp --permanent
    sudo firewall-cmd --reload
    sudo iptables-save | grep 9300
    

提交回复
热议问题