Python curl:(7)无法连接到本地主机端口9200:连接被拒绝[Ubuntu 16.04,ES 2.3.4.1,Java 9.0.1]
我犯的错误是curl:(7)无法连接到本地主机端口9200:连接被拒绝 我猜引擎坏了。我必须使用python与db mysql建立引擎连接。我一直都很好,直到下面的代码Python curl:(7)无法连接到本地主机端口9200:连接被拒绝[Ubuntu 16.04,ES 2.3.4.1,Java 9.0.1],python,mysql,ubuntu,
elasticsearch,Python,Mysql,Ubuntu,
elasticsearch,我犯的错误是curl:(7)无法连接到本地主机端口9200:连接被拒绝 我猜引擎坏了。我必须使用python与db mysql建立引擎连接。我一直都很好,直到下面的代码 echo '{ "type":"jdbc", "jdbc":{ "url":"jdbc:mysql://localhost:3306/ElasticSearchDatabase", "user":"root", "password":"", "sql":"SELECT id as _id, id, name,email FROM
echo '{
"type":"jdbc",
"jdbc":{
"url":"jdbc:mysql://localhost:3306/ElasticSearchDatabase",
"user":"root",
"password":"",
"sql":"SELECT id as _id, id, name,email FROM test",
"index":"users",
"type":"users",
"autocommit":"true",
"metrics": {
"enabled" : true
},
"elasticsearch" : {
"cluster" : "servercluster",
"host" : "localhost",
"port" : 9300
}
}
}' | java -cp "/etc/elasticsearch/elasticsearch-jdbc-2.2.0.0/lib/*" -"Dlog4j.configurationFile=file:////etc/elasticsearch/elasticsearch-jdbc-2.2.0.0/bin/log4j2.xml" "org.xbib.tools.Runner" "org.xbib.tools.JDBCImporter"
我在这个命令中并没有错误,但当我执行curl localhost:9200时,我得到了连接拒绝,就像在运行那个代码段之后,引擎停止工作一样。请告诉我如何修复。运行此命令时有什么错误
java-cp”/etc/elasticsearch/elasticsearch-jdbc-2.2.0.0/lib/*“-”Dlog4j.configurationFile=file:////etc/elasticsearch/elasticsearch-jdbc-2.2.0.0/bin/log4j2.xml“org.xbib.tools.Runner”“org.xbib.tools.jdbc导入器”
服务器上是否有运行的elasticsearch服务?我是elasticsearch新手,运行此命令后没有收到任何错误。否,没有运行任何其他服务