Closed Javaluca closed 5 months ago
After long test, the problem seems to be related to windows machine. I've tried on a linux one and the test cluster starts correctly. Can anybody confirm this?
Unfortunately the restClient
created by the framework code that perform the simple request fail
final RestClient restClient = createRestClient();
Response response = restClient.performRequest(new Request("GET", "/_cat/plugins"));
with the following error
[2023-03-17T02:54:34,201][WARN ][o.o.c.NodeConnectionsService] [node_s1] failed to connect to {node_s0}{DgW_FcS3R5yLEHlmYKaekw}{1WaXpXAKS2mNOIlNbKwdjA}{127.0.0.1}{127.0.0.1:45489}{imr}{shard_indexing_pressure_enabled=true} (tried [1] times)
org.opensearch.transport.ConnectTransportException: [node_s0][127.0.0.1:45489] connect_exception
at org.opensearch.transport.TcpTransport$ChannelsConnectedListener.onFailure(TcpTransport.java:1076) ~[opensearch-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.action.ActionListener.lambda$toBiConsumer$2(ActionListener.java:215) ~[opensearch-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.common.concurrent.CompletableContext.lambda$addListener$0(CompletableContext.java:55) ~[opensearch-core-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863) ~[?:?]
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841) ~[?:?]
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2162) ~[?:?]
at org.opensearch.common.concurrent.CompletableContext.completeExceptionally(CompletableContext.java:70) ~[opensearch-core-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.nio.SocketChannelContext.connect(SocketChannelContext.java:160) ~[opensearch-nio-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.nio.EventHandler.handleConnect(EventHandler.java:130) ~[opensearch-nio-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.transport.nio.TestEventHandler.handleConnect(TestEventHandler.java:139) ~[framework-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.nio.NioSelector.attemptConnect(NioSelector.java:446) ~[opensearch-nio-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.nio.NioSelector.registerChannel(NioSelector.java:469) ~[opensearch-nio-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.nio.NioSelector.setUpNewChannels(NioSelector.java:458) ~[opensearch-nio-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.nio.NioSelector.preSelect(NioSelector.java:279) ~[opensearch-nio-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.nio.NioSelector.singleLoop(NioSelector.java:172) ~[opensearch-nio-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at org.opensearch.nio.NioSelector.runLoop(NioSelector.java:148) ~[opensearch-nio-2.3.0-SNAPSHOT.jar:2.3.0-SNAPSHOT]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.net.ConnectException: Connection refused
If I start the project with ./gradlew run
the cluster start correctly and If I manually perform the command curl -XGET 'localhost:9200/_cat/plugins'
it works fine giving me the list of the installed plugin.
Any idea on how to solve this? There are other way to work on custom plugin?
After long test, the problem seems to be related to windows machine. I've tried on a linux one and the test cluster starts correctly. Can anybody confirm this?
I cannot reproduce it on Windows box, the check passes:
$ ./gradlew check
...
BUILD SUCCESSFUL in 1m 5s
28 actionable tasks: 28 executed
UPD: added Windows based workflow here https://github.com/opensearch-project/opensearch-plugin-template-java/pull/51
Closing as resolved. Please comment/reopen if you see this again.
What is the bug?
I want to create a custom plugin for opensearch. I have simply cloned the repository and run the check task. The gradle build give me the following error.
but I don't know what it means. I haven't found anything usefull into the various discussions in this repository and in the docs provided.
How can one reproduce the bug?
Clone the repository (the last commit in the moment I'm writing is
5b0a14f47b4a1f643ec82b693937c80b478f6d93
) and simply run check task with gradle wrapper./gradlew check
What is the expected behavior?
Complete the task without errors (I think)
What is your host/environment?
Do you have any screenshots?
I can paste the complete console messages (localized in italian)
Do you have any additional context?
I don't know if it's a bug or maybe some configurations are needed, and sorry if I'm not very clear but I'm a newbie into opensearch and gradle as well. Of course if you need additional information about the issue I will respond as soon as possible.
Thank's in advance for your help.