curl:(7)未能连接到localhost端口9200:连接被拒绝[ubuntu 16.04,es 2.3.4.1,java 9.0.1]

fhity93d  于 2021-06-20  发布在  Mysql
关注(0)|答案(0)|浏览(213)

我犯的错误是。curl:(7)未能连接到localhost端口9200:连接被拒绝
我猜引擎坏了。我必须使用python与dbmysql建立引擎连接。我一直都很好,直到下面的代码。

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"

我在这个命令中没有错误,但是当我做的时候localhost:9200 i 连接被拒绝了,就像在运行代码后,引擎停止了工作。请告诉我怎么修理。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题