opensearch-project / cross-cluster-replication

Synchronize your data across multiple clusters for lower latencies and higher availability
https://opensearch.org/docs/latest/replication-plugin/index/
Apache License 2.0
47 stars 58 forks source link

[BUG] "org.opensearch.replication.BasicReplicationIT.test empty index replication" Test failure #1334

Closed CaptainDredge closed 6 months ago

CaptainDredge commented 6 months ago

What is the bug? All Index replication test is throwing connection Refused error when we create admin user different credentials other than myStrongPassword123! in release CI

1> [2024-02-16T00:13:02,727][INFO ][o.o.r.BasicReplicationIT ] [test empty index replication] after test
  2> REPRODUCE WITH: ./gradlew ':integTestRemote' --tests "org.opensearch.replication.BasicReplicationIT.test empty index replication" -Dtests.seed=87E473EC64D720CF -Dtests.security.manager=true -Dtests.locale=en-MT -Dtests.timezone=America/Shiprock -Druntime.java=19
  2> org.opensearch.client.ResponseException: method [PUT], host [https://localhost:9201/], URI [/_plugins/_replication/lsvvxibneh/_start?wait_for_restore=true], status line [HTTP/1.1 500 Internal Server Error]
    {"error":{"root_cause":[{"type":"connect_transport_exception","reason":"[][127.0.0.1:9200] connect_exception"}],"type":"connect_transport_exception","reason":"[][127.0.0.1:9200] connect_exception","caused_by":{"type":"annotated_connect_exception","reason":"Connection refused: localhost/127.0.0.1:9200","caused_by":{"type":"connect_exception","reason":"Connection refused"}}},"status":500}
        at __randomizedtesting.SeedInfo.seed([87E473EC64D720CF:E4930300BB801772]:0)
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:376)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:346)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:321)
        at app//org.opensearch.replication.ReplicationHelpersKt.startReplication(ReplicationHelpers.kt:96)
        at app//org.opensearch.replication.ReplicationHelpersKt.startReplication$default(ReplicationHelpers.kt:63)
        at app//org.opensearch.replication.BasicReplicationIT.test empty index replication(BasicReplicationIT.kt:54)

How can one reproduce the bug? Steps to reproduce the behavior: Run

./gradlew integTestRemote --tests "org.opensearch.replication.BasicReplicationIT.test empty index replication" -Dleader.http_host=localhost:9200 -Dfollower.http_host=localhost:9201 -Dleader.transport_host=localhost:9200 -Dfollower.transport_host=localhost:9301 -Dsecurity_enabled=true -Duser=admin -Dpassword='myStrongPassword123!' -PnumNodes=1 --console=plain

What is the expected behavior? Test should work with new admin credential changes

ankitkala commented 6 months ago

Related to https://github.com/opensearch-project/cross-cluster-replication/issues/1317