私はelasticsearchコンテナを使用してテストを書きます。 https://www.testcontainers.org/ライブラリで実行します。私はテストのための私のポートを再設定し、9200ポートが使用可能であるテストのための伸縮性検索とテスト容器
org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{9fuJUZYWS6O6IgLGOgJDaA}{localhost}{127.0.0.1:32792}]
(testcontainersによってマッピングされたポート上) - 私はでそれを確認: それは私の設定です:
@ClassRule
public static GenericContainer elasticContainer =
new GenericContainer("docker.elastic.co/elasticsearch/elasticsearch:5.3.0")
.withExposedPorts(9300, 9200)
.withEnv("xpack.security.enabled", "false")
.withEnv("transport.host", "127.0.0.1")
.withEnv("http.host", "0.0.0.0");
そして私は、例外が発生しましたカール。しかし、9300はそうではありません。
誰もがトランスポートホストの問題を修正する方法を知っていますか?