我正在我的項目在2個不同的服務器上工作。該代碼是從到位桶克隆所以是完全一樣的,但在其中的一個我得到的每一個HTTP請求的這個錯誤:無法連接到主機,Elasticsearch下降? 500內部服務器錯誤 - HttpException
Couldn't connect to host, Elasticsearch down?
500 Internal Server Error - HttpException
S.O. Ubuntu的16.04
當我運行service elasticsearch status
我得到這個:
elasticsearch.service - LSB: Starts elasticsearch
Loaded: loaded (/etc/init.d/elasticsearch; bad; vendor preset: enabled)
Active: active (exited) since Sun 2017-01-15 11:05:25 CET; 1h 16min ago
Docs: man:systemd-sysv-generator(8)
Process: 1366 ExecStart=/etc/init.d/elasticsearch start (code=exited, status=0
Jan 15 11:05:25 ubuntu systemd[1]: Starting LSB: Starts elasticsearch...
Jan 15 11:05:25 ubuntu systemd[1]: Started LSB: Starts elasticsearch.
當我運行fos:elastica:populate
我得到這個錯誤:
[Elastica\Exception\Connection\HttpException]
Couldn't connect to host, Elasticsearch down?
運行curl -XGET http://127.0.0.1:9200
我得到
curl: (7) Failed to connect to 127.0.0.1 port 9200: Connection refused
我正在尋找5天,並認爲這個問題是一些東西t權限。
你的代碼在哪裏 – aimme
curl看起來不太好 –
看起來你需要打開端口,就像iptables –