# Transport Client 5.4.1 Failure

**URL:** https://discuss.elastic.co/t/transport-client-5-4-1-failure/89823
**Category:** Elasticsearch
**Created:** [June 18, 2017, 1:39am UTC](https://discuss.elastic.co/t/transport-client-5-4-1-failure/89823 "2017-06-18T01:39:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ed\_Brown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ed_brown/32/19230_2.png) [@Ed\_Brown](https://discuss.elastic.co/u/Ed_Brown)
#### Post date: [June 18, 2017, 1:39am UTC](https://discuss.elastic.co/t/transport-client-5-4-1-failure/89823/1 "2017-06-18T01:39:22Z")

</div>

I can't get the Java API transport client to work with 5.4.1.  
Below is the code snippet:

> ```
> Settings settings = Settings.builder()
> .put("client.transport.sniff", true)
> .put("xpack.security.user", "transport_client_user:changeme")
> .build();
> 
> ```

> ```
> client = new PreBuiltXPackTransportClient(settings);
> client = client.addTransportAddresses(new InetSocketTransportAddress(InetAddress.getByName(host), port));
> 
> ```

Then I get the following error:

> [elasticsearch[_client_][transport\_client\_boss][T#1]] INFO org.elasticsearch.client.transport.TransportClientNodesService - failed to get local cluster state for {#transport#-1}{uJ\_F0oqAT0ucSdpkfkzpCg}{localhost}{127.0.0.1:9300}, disconnecting...  
> [elasticsearch[_client_][transport\_client\_boss][T#2]] INFO org.elasticsearch.client.transport.TransportClientNodesService - failed to get local cluster state for {#transport#-2}{KLVUgCedQLeGMq\_mNa6HpQ}{localhost}{127.0.0.1:9301}, disconnecting...  
> RemoteTransportException[[darkstar-1][127.0.0.1:9300][cluster:monitor/state]]; nested: ElasticsearchSecurityException[unable to authenticate user [transport\_client\_user] for action [cluster:monitor/state]];  
> Caused by: ElasticsearchSecurityException[unable to authenticate user [transport\_client\_user] for action [cluster:monitor/state]]  
> ...

Reading other problems like this, it seemed this was fixed in 5.4.1. I think it isn't. Will I have to take out the X-Pack plug in?

Ed Brown

---

<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: [June 18, 2017, 3:21am UTC](https://discuss.elastic.co/t/transport-client-5-4-1-failure/89823/2 "2017-06-18T03:21:38Z")

</div>

Did you define a transport\_client\_user user?

---

<div class="post-metadata">

### Author: ![Ed\_Brown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ed_brown/32/19230_2.png) [@Ed\_Brown](https://discuss.elastic.co/u/Ed_Brown)
#### Post date: [June 18, 2017, 7:52pm UTC](https://discuss.elastic.co/t/transport-client-5-4-1-failure/89823/3 "2017-06-18T19:52:23Z")

</div>

Thank you for your reply.  
I thought I did, but I fat fingered the user name.  
Thanks.

Ed Brown

---

<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: [July 16, 2017, 7:52pm UTC](https://discuss.elastic.co/t/transport-client-5-4-1-failure/89823/4 "2017-07-16T19:52:44Z")

</div>

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