Connect to embedded node via transport protocol

First off, I know embedded servers are not officially supported. I'm glad for any "unofficial" help too.

I am trying to connect to an embedded node with a TransportClient. The embedded node gets created with the Node class like this:

final Settings settings = Settings.builder()
            // some settings omitted
            .put("cluster.name", clusterName)
            .put("transport.bind_host", "127.0.0.1")
            .put("http.enabled", false)
            .put("transport.type", "netty4")
            .put("transport.tcp.port", 9350)
            .build();
node = new Node(settings);

However, I get the following error:

java.lang.IllegalStateException: Unsupported transport.type [netty4]

The only semi-documented way to use the transport.type settings is transport.type: local, but I want it to be accessible. Setting it to local causes connection refused errors. netty4 is what I tried looking through the source code, with no success. Omitting the setting makes Elasticsearch assume empty string instead of a default, causing a similar error:

java.lang.IllegalStateException: Unsupported transport.type

How do I configure the internal node in a way that lets an external transport client connect to it?

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.