我已经在Heroku中设置了一个盆景应用程序,它的工作原理就像一个魅力。我没有问题可以与带有curl的基础ElasticSearch交互
"name" : "oQBjmEy",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "mI_KfjdzTE2yqzJludk_8w",
"version" : {
"number" : "6.2.4",
"build_hash" : "ccec39f",
"build_date" : "2018-04-12T20:37:28.497551Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
对于我的项目,我想将文档从scrappy-ElasticSearch管道(“ https://github.com/knockrentals/scrapy-elasticsearch”)写入Heroku / Bonsai的ES。同样,本地集成就像一个魅力一样工作(在localhost:9200上的docker上进行了试用-一切都很好)
不幸的是,我无法将管道工作表scrappy-ElasticSearch接到Heroku /盆景
错误代码
File "XYZ\lib\site-packages\urllib3\connection.py", line 150, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x00000287B8DCE4E0>: Failed to establish a new connection: [WinError 10061] Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte
因此,这基本上是身份验证/网络问题。 我的settings.py文件看起来像这样
ELASTICSEARCH_SERVER = 'http://uav5XXXXXX:ky3XXXXXXX@elm-533263851.eu-west-1.bonsaisearch.net:9200'
#ELASTICSEARCH_AUTH = 'NTLM'
#ELASTICSEARCH_USERNAME = 'uav5uXXXXXX'
#ELASTICSEARCH_PASSWORD = 'ky3nXXXXXX'
ELASTICSEARCH_INDEX = 'events'
ELASTICSEARCH_TYPE = 'items'
ELASTICSEARCH_UNIQ_KEY = 'url'
与
相同的问题ELASTICSEARCH_SERVER = 'https://uav5XXXXX:ky3XXXXXX@elm-533263851.eu-west-1.bonsaisearch.net'
我不知道如何调试它,日志真的很...
您有个主意吗?太棒了
感谢和欢呼 乔纳斯(Jonas)