# Is it needed a paid license to use the Java Transport Client in Elasticsearch 7.4?

**URL:** <https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536>\
**Category:** Elasticsearch\
**Created:** [March 29, 2020, 9:24am UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536 "2020-03-29T09:24:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexmm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexmm/32/65252_2.png) [@alexmm](https://discuss.elastic.co/u/alexmm)\
**Post date:** [March 29, 2020, 9:24am UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536/1 "2020-03-29T09:24:02Z")

</div>

Hi, we are using **[the Java Transport Client](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/java-clients.html)** against an Elasticsearch 6.8.  
But we are going to install a new cluster with an **Elasticsearch 7.4** and are going to connect the application to it.  
We know that _the Java High Level REST Client_ is recommended instead, we will migrate the code, but in a 2nd phase.

As the X-Pack changed I have some important doubts about licenses.  
I have checked [the Elastic subscriptions](https://www.elastic.co/subscriptions) but it is in some cases too general regarding security.  
My questions are the following:

1. Is the Java Transport Client supported in Open Source version?
2. Is the Java Transport Client supported in Basic license version?
3. If it is supported in Open Source version, then what are the `elasticsearch.yml` configuration properties I should configure to enable it?
4. Is there any other more detailed documentation about the options supported by each License/Subscription type and also Open Source?

Thanks

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 29, 2020, 9:27am UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536/2 "2020-03-29T09:27:03Z")

</div>

> [@alexmm](#):
>
> Is the Java Transport Client supported in Open Source version?

Yes, but it is being deprecated. I believe it will no longer be available with Elasticsearch 8.x.

> [@alexmm](#):
>
> Is the Java Transport Client supported in Basic license version?

Yes.

> [@alexmm](#):
>
> If it is supported in Open Source version, then what are the `elasticsearch.yml` configuration properties I should configure to enable it?

It is enabled by default on port 9300 as it is the protocol used by nodes to communicate internally within the cluster.

---

<div class="post-metadata">

**Author:** ![alexmm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexmm/32/65252_2.png) [@alexmm](https://discuss.elastic.co/u/alexmm)\
**Post date:** [March 29, 2020, 11:42am UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536/3 "2020-03-29T11:42:45Z")

</div>

Thanks @Christian_Dahlqvist.

However I found several parts in the documentation that are confusing me.

As far as I know, to be able to use the Java Transport Client, the cluster must have the security enabled.

- In the [_"Enable Elasticsearch security features"_ docu](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/get-started-enable-security.html) there are 2 sentences that confuse me:
  - At the beginning:
    - 

> When you use the basic and trial licenses, the Elasticsearch security features are disabled by default.

  - Regarding setting the property `xpack.security.enabled` to `true` in the `elasticsearch.yml`. This make me doubt if it is supported in Open Source and Basic versions to set the value to `true`:
    - 

> If you have a basic or trial license, the default value for this setting is `false`. If you have a gold or higher license, the default value is `true`. Therefore, it is a good idea to explicitly add this setting to avoid confusion about whether security features are enabled.

- In the [_" Security settings in Elasticsearch"_ docu](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/security-settings.html) I can find similar notes:
  - 

> By default, the Elasticsearch security features are disabled when you have a basic or trial license.

  - 

> If you have gold or higher licenses, the default value is `true`

Maybe all of those sentences are just meaning _"remember to set the `true` value if you are not using a paid license"_ but for me it is confusing not seeing anywhere in the documentation if Transport is supported or not in Open Source and Basic license.

Actually the option **Open Source** does not appear in none of those sentences.  
So:

1. My doubts make sense or the sentences just mean what I say at the end?
2. In 2nd case, what about Open Source? Will it support the Java Transport Client?
3. If it does, would it also support having a different port (actually a profile) for the Java Transport Client? Explained in the [_" Separating node-to-node and client traffic"_ docu](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/separating-node-client-traffic.html).

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 29, 2020, 11:59am UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536/4 "2020-03-29T11:59:37Z")

</div>

It seems you are mixing two concepts, use of transport client and whether the Elasticsearch cluster can be secured or not.

The transport client works against secured and unsecured Elasticsearch clusters. It therefore works against open-source clusters where security features are not included and clusters that use the default distribution where security features are now included and available with the free Basic license.

---

<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:** [March 29, 2020, 12:00pm UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536/5 "2020-03-29T12:00:18Z")

</div>

> [@alexmm](#):
>
> As far as I know, to be able to use the Java Transport Client, the cluster must have the security enabled.

I don't think so.

But anyway. Don't use the TransportClient. Use the rest client.

---

<div class="post-metadata">

**Author:** ![alexmm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexmm/32/65252_2.png) [@alexmm](https://discuss.elastic.co/u/alexmm)\
**Post date:** [March 29, 2020, 1:35pm UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536/6 "2020-03-29T13:35:35Z")

</div>

Thanks both.

We need to keep the Java Transport Client in a 1st phase, then we will migrate the new REST one.  
That is not the point of this question. We know about its deprecation in v8, but we cannot do it now.

@Christian_Dahlqvist, thanks, you are true, in the [_Java Transport Client documentation_](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/java-clients.html) it is described how to connect to an unsecured cluster (without SSL). I didn't remember as we do connect to a secured cluster.

We exactlly connect as it is described [**here in the official docu**](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/java-clients.html#disabling-client-auth), so against a secured cluster but without client authentication.

In this context

1. is it possible to connect the Java Transport Client to a secured cluster that is version Open Source?
  - I understand the answer for this is **NO** , right?

2. and if the cluster has Basic license?
  - I understand the answer for this is **YES** , right?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 29, 2020, 4:21pm UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536/7 "2020-03-29T16:21:04Z")

</div>

> [@alexmm](#):
>
> is it possible to connect the Java Transport Client to a secured cluster that is version Open Source?
> 
> - I understand the answer for this is **NO** , right?

Th transport client can communicate with open-source clusters, but there is no security included in the open-source distribution.

> [@alexmm](#):
>
> and if the cluster has Basic license?
> 
> - I understand the answer for this is **YES** , right?

Yes, that is correct.

---

<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:** [April 26, 2020, 4:21pm UTC](https://discuss.elastic.co/t/is-it-needed-a-paid-license-to-use-the-java-transport-client-in-elasticsearch-7-4/225536/8 "2020-04-26T16:21:05Z")

</div>

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