# Unsupported http.type \[netty3\] when trying to start embedded elasticsearch node

**URL:** <https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669>\
**Category:** Elasticsearch\
**Created:** [December 21, 2016, 12:34pm UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669 "2016-12-21T12:34:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajind\_Ruparathna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajind_ruparathna/32/10545_2.png) [@Rajind\_Ruparathna](https://discuss.elastic.co/u/Rajind_Ruparathna)\
**Post date:** [December 21, 2016, 12:34pm UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/1 "2016-12-21T12:34:20Z")

</div>

I know that embedded Elasticsearch is not recommended. I'm just trying it for testing purposes.

I'm trying to start an embedded Elasticsearch node giving the configuration from the following elasticsearch.yml

```
# Name for the cluster
cluster.name: elasticsearch
# Name for the embedded node
node.name: EmbeddedESNode
# Path to log files:
path.logs: logs
discovery.zen.ping.unicast.hosts: []
# Disable dynamic scripting
script.inline: false
script.stored: false
script.file: false
transport.type: local
http.type: netty3

```

I'm using es 5.1.1 and my code to start embedded node is as follows.

```
    try {
        Settings elasticsearchSetting = Settings.builder()
                // Value for path.home is required for es but will not be used as long as other properties
                // path.logs, path.data and path.conf is set.
                .put(ES_PROPERTY_PATH_HOME, "nullpath")
                .put(ES_PROPERTY_PATH_CONF, confDir)
                .build();
        Node node = new Node(elasticsearchSetting).start();
        logger.info("Embedded Elasticsearch server successfully started ...");

    } catch (Exception e) {
        throw e;
    }

```

I get the following trace.

```
java.lang.IllegalStateException: Unsupported http.type [netty3]
	at org.elasticsearch.common.network.NetworkModule.getHttpServerTransportSupplier(NetworkModule.java:194) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:396) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:229) ~[elasticsearch-5.1.1.jar:5.1.1]
	at org.elasticsearch.node.Node.<init>(Node.java:225) ~[elasticsearch-5.1.1.jar:5.1.1]
	... 18 more

```

I've tried with `http.type: netty4` as well but no luck so far. It works when `http.enabled:false` is set but I want to use http rest api for testing.

P.S:  
I've been using [this](https://github.com/elastic/elasticsearch-hadoop/blob/fefcf8b191d287aca93a04144c67b803c6c81db5/mr/src/itest/java/org/elasticsearch/hadoop/EsEmbeddedServer.java) elasticsearch hadoop class for reference in implementing embedded es and unfortunately I couldn't find any docs on `http.type`.

**Can't I start an embedded node with http now in ES 5.x ?**  
**What am i doing wrong here ?**

Any help is highly appreciated.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 21, 2016, 11:11pm UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/2 "2016-12-21T23:11:57Z")

</div>

> [@Rajind\_Ruparathna](#):
>
> I know that embedded Elasticsearch is not recommended

It's entirely not supported, so you are unlikely to get any assistance on this sorry to say ☹

---

<div class="post-metadata">

**Author:** ![Rajind\_Ruparathna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajind_ruparathna/32/10545_2.png) [@Rajind\_Ruparathna](https://discuss.elastic.co/u/Rajind_Ruparathna)\
**Post date:** [December 22, 2016, 4:39am UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/3 "2016-12-22T04:39:52Z")

</div>

Can we not use it even for test cases ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 22, 2016, 4:40am UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/4 "2016-12-22T04:40:37Z")

</div>

Have a read of [https://www.elastic.co/blog/elasticsearch-the-server](https://www.elastic.co/blog/elasticsearch-the-server)

---

<div class="post-metadata">

**Author:** ![Rajind\_Ruparathna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajind_ruparathna/32/10545_2.png) [@Rajind\_Ruparathna](https://discuss.elastic.co/u/Rajind_Ruparathna)\
**Post date:** [December 22, 2016, 4:56am UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/5 "2016-12-22T04:56:13Z")

</div>

Thanks. I've read that already.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 22, 2016, 11:38am UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/6 "2016-12-22T11:38:40Z")

</div>

If you are looking for integration tests, you can also try [http://david.pilato.fr/blog/2016/10/18/elasticsearch-real-integration-tests-updated-for-ga/](http://david.pilato.fr/blog/2016/10/18/elasticsearch-real-integration-tests-updated-for-ga/)

You can also read [https://www.elastic.co/guide/en/elasticsearch/reference/5.1/integration-tests.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.1/integration-tests.html) which might help.

---

<div class="post-metadata">

**Author:** ![Rajind\_Ruparathna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajind_ruparathna/32/10545_2.png) [@Rajind\_Ruparathna](https://discuss.elastic.co/u/Rajind_Ruparathna)\
**Post date:** [December 22, 2016, 4:08pm UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/7 "2016-12-22T16:08:28Z")

</div>

@dadoonet Thank you very much for the positive reply. I'll take a look. 🙂

---

<div class="post-metadata">

**Author:** ![Rajind\_Ruparathna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rajind_ruparathna/32/10545_2.png) [@Rajind\_Ruparathna](https://discuss.elastic.co/u/Rajind_Ruparathna)\
**Post date:** [January 9, 2017, 6:24am UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/8 "2017-01-09T06:24:31Z")

</div>

The solution was already [there](https://github.com/elastic/elasticsearch-hadoop/blob/fefcf8b191d287aca93a04144c67b803c6c81db5/mr/src/itest/java/org/elasticsearch/hadoop/EsEmbeddedServer.java) in es-hadoop embedded es implementation.

```
private static class PluginConfigurableNode extends Node {
        public PluginConfigurableNode(Settings settings, Collection<Class<? extends Plugin>> classpathPlugins) {
            super(InternalSettingsPreparer.prepareEnvironment(settings, null), classpathPlugins);
        }
}

```

We can give netty3 as a plugin as follows. Then everything works well.

```
Collection plugins = Arrays.asList(Netty3Plugin.class);
Node node = new PluginConfigurableNode(elasticsearchSetting, plugins).start();

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 6, 2017, 6:25am UTC](https://discuss.elastic.co/t/unsupported-http-type-netty3-when-trying-to-start-embedded-elasticsearch-node/69669/9 "2017-02-06T06:25:06Z")

</div>

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