The first message in the stack overflow, sorry if there is any error in how to ask my question.
I had exactly the same problem when I started the client in memory, but I could not connect using the transport client having NoNodeAvailableException as an error message.
Settings settings = Settings.builder()
.put("path.home", "target/elasticsearch")
.put("transport.type", "local")
.put("http.enabled", false)
.build();
node = new Node(settings).start();
node(). client() , .
spring boot ES 5 spring -data, ES 5:
https://github.com/jomilanez/elastic5