Connecting by means of Java Client and Proxy

All,

I am attempting to make a connection to my 1 node cluster by means of the
Java Client. but when i do i get the following exception:
INFO: [Marvin Flumm] failed to get local cluster state for
[#transport#-1][flatback][inet[hostnamel/ipnumber:80]], disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException:
[][inet[hostnamel/ipnumber:80]][cluster/state] request_id [0] timed out
after [5000ms]
at
org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:356)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)

In my apache log file i see this:
[Thu Apr 24 00:02:59 2014] [error] proxy: HTTP: disabled connection for
(localhost)
[Thu Apr 24 00:25:55 2014] [error] (111)Connection refused: proxy: HTTP:
attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:25:55 2014] [error] ap_proxy_connect_backend disabling
worker for (localhost)
[Thu Apr 24 00:31:38 2014] [error] (111)Connection refused: proxy: HTTP:
attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:31:38 2014] [error] ap_proxy_connect_backend disabling
worker for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for
(localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for
(localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for
(localhost)
[Thu Apr 24 00:40:57 2014] [error] (111)Connection refused: proxy: HTTP:
attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:40:57 2014] [error] ap_proxy_connect_backend disabling
worker for (localhost)

all this spoken, how do i connect with the java client to the elastic
server by means of the Java API with a proxy in place. tools like Marvel
work fine. When looking at the apache log, it seems to mee it is trying to
connect by means of a different port??

any suggestions are appreciated!

Regards,

Pieter

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a511fa31-4e03-4cdf-93e7-b298630fe2d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Just a note: Java client uses Transport Layer (default to 9300 port) and not HTTP layer (default to 9200 port).

I think you are trying to set transport to HTTP layer (80 port).

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 avr. 2014 à 00:59, Pieter van der Meer pieter@elucidator.nl a écrit :

All,

I am attempting to make a connection to my 1 node cluster by means of the Java Client. but when i do i get the following exception:
INFO: [Marvin Flumm] failed to get local cluster state for [#transport#-1][flatback][inet[hostnamel/ipnumber:80]], disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][inet[hostnamel/ipnumber:80]][cluster/state] request_id [0] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:356)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)

In my apache log file i see this:
[Thu Apr 24 00:02:59 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:25:55 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:25:55 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Apr 24 00:31:38 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:31:38 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:40:57 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:40:57 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)

all this spoken, how do i connect with the java client to the elastic server by means of the Java API with a proxy in place. tools like Marvel work fine. When looking at the apache log, it seems to mee it is trying to connect by means of a different port??

any suggestions are appreciated!

Regards,

Pieter

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a511fa31-4e03-4cdf-93e7-b298630fe2d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/C073FB8A-FA92-420D-8092-4603DF7B9A46%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Te si do try and Connect by means of port 80 but thuis is forwarded by my proxy to 9300.

You mean it Ignores the port settings in THE transport client?

Groet,
Pieter

Op 24 apr. 2014 om 04:43 heeft David Pilato david@pilato.fr het volgende geschreven:

Just a note: Java client uses Transport Layer (default to 9300 port) and not HTTP layer (default to 9200 port).

I think you are trying to set transport to HTTP layer (80 port).

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 avr. 2014 à 00:59, Pieter van der Meer pieter@elucidator.nl a écrit :

All,

I am attempting to make a connection to my 1 node cluster by means of the Java Client. but when i do i get the following exception:
INFO: [Marvin Flumm] failed to get local cluster state for [#transport#-1][flatback][inet[hostnamel/ipnumber:80]], disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [inet[hostnamel/ipnumber:80]][cluster/state] request_id [0] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:356)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)

In my apache log file i see this:
[Thu Apr 24 00:02:59 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:25:55 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:25:55 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Apr 24 00:31:38 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:31:38 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:40:57 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:40:57 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)

all this spoken, how do i connect with the java client to the elastic server by means of the Java API with a proxy in place. tools like Marvel work fine. When looking at the apache log, it seems to mee it is trying to connect by means of a different port??

any suggestions are appreciated!

Regards,

Pieter

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a511fa31-4e03-4cdf-93e7-b298630fe2d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/xg1avjyDsG4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/C073FB8A-FA92-420D-8092-4603DF7B9A46%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/EE713C30-120E-456F-B6D2-00726881E5BB%40elucidator.nl.
For more options, visit https://groups.google.com/d/optout.

I think I'm missing something here.
So you have a proxy which redirect queries to port 80 to port 9300, right?

I think this should work.

But if Marvel interface works fine using localhost:80/_plugin/marvel URL, it means to me that you redirected 80 port to 9200 port.

Note that when using Transport Java Client, you need to define the same cluster name as you defined in your nodes.

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 24 avril 2014 à 08:13:56, Pieter@elucidator (pieter@elucidator.nl) a écrit:

Te si do try and Connect by means of port 80 but thuis is forwarded by my proxy to 9300.

You mean it Ignores the port settings in THE transport client?

Groet,
Pieter

Op 24 apr. 2014 om 04:43 heeft David Pilato david@pilato.fr het volgende geschreven:

Just a note: Java client uses Transport Layer (default to 9300 port) and not HTTP layer (default to 9200 port).

I think you are trying to set transport to HTTP layer (80 port).

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 avr. 2014 à 00:59, Pieter van der Meer pieter@elucidator.nl a écrit :

All,

I am attempting to make a connection to my 1 node cluster by means of the Java Client. but when i do i get the following exception:
INFO: [Marvin Flumm] failed to get local cluster state for [#transport#-1][flatback][inet[hostnamel/ipnumber:80]], disconnecting...
org.elasticsearch.transport.ReceiveTimeoutTransportException: [][inet[hostnamel/ipnumber:80]][cluster/state] request_id [0] timed out after [5000ms]
at org.elasticsearch.transport.TransportService$TimeoutHandler.run(TransportService.java:356)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)

In my apache log file i see this:
[Thu Apr 24 00:02:59 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:25:55 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:25:55 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Apr 24 00:31:38 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:31:38 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:31:38 2014] [error] proxy: HTTP: disabled connection for (localhost)
[Thu Apr 24 00:40:57 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:2368 (localhost) failed
[Thu Apr 24 00:40:57 2014] [error] ap_proxy_connect_backend disabling worker for (localhost)

all this spoken, how do i connect with the java client to the elastic server by means of the Java API with a proxy in place. tools like Marvel work fine. When looking at the apache log, it seems to mee it is trying to connect by means of a different port??

any suggestions are appreciated!

Regards,

Pieter

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a511fa31-4e03-4cdf-93e7-b298630fe2d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/xg1avjyDsG4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/C073FB8A-FA92-420D-8092-4603DF7B9A46%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/EE713C30-120E-456F-B6D2-00726881E5BB%40elucidator.nl.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.5358bff6.515f007c.145c1%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

Thus,

calling http://domaina.myHost9200:80/_nodes/ results in:
"cluster_name" : "elasticsearch",
"nodes" : {
"ER0q2vqdSleZpnKdi51_SQ" : {
"name" : "Baron Strucker",
"transport_address" : "inet[hawksbill.local/192.168.1.142:9300]",
"host" : "hawksbill.domainb",
"ip" : "127.0.1.1",
"version" : "1.0.2",
"build" : "4fc0da7",
"http_address" : "inet[/192.168.1.142:9200]",

(note domaina and domainb are not equal)

connecting with:

Settings settings = ImmutableSettings.settingsBuilder()
.put("cluster.name", "Baron Strucker").build();

Client client = new TransportClient(settings)
.addTransportAddress(new InetSocketTransportAddress("domainA.myhost9300", 80))

Should do the tric? Currently i'm working for my boss, but will try this later today.

Pieter

On Thursday, April 24, 2014 9:40:37 AM UTC+2, David Pilato wrote:

I think I'm missing something here.
So you have a proxy which redirect queries to port 80 to port 9300, right?

I think this should work.

But if Marvel interface works fine using localhost:80/_plugin/marvel URL,
it means to me that you redirected 80 port to 9200 port.

Note that when using Transport Java Client, you need to define the same
cluster name as you defined in your nodes.

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e055e190-12e2-4ca6-a32b-4349cb9a7ef6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cluster name is "elasticsearch" here.

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 avr. 2014 à 10:54, Pieter van der Meer pieter@elucidator.nl a écrit :

Thus,

calling http://domaina.myHost9200:80/_nodes/ results in:
"cluster_name" : "elasticsearch",
"nodes" : {
"ER0q2vqdSleZpnKdi51_SQ" : {
"name" : "Baron Strucker",
"transport_address" : "inet[hawksbill.local/192.168.1.142:9300]",
"host" : "hawksbill.domainb",
"ip" : "127.0.1.1",
"version" : "1.0.2",
"build" : "4fc0da7",
"http_address" : "inet[/192.168.1.142:9200]",

(note domaina and domainb are not equal)

connecting with:

Settings settings = ImmutableSettings.settingsBuilder()
.put("cluster.name", "Baron Strucker").build();

Client client = new TransportClient(settings)
.addTransportAddress(new InetSocketTransportAddress("domainA.myhost9300", 80))

Should do the tric? Currently i'm working for my boss, but will try this later today.

Pieter

On Thursday, April 24, 2014 9:40:37 AM UTC+2, David Pilato wrote:
I think I'm missing something here.
So you have a proxy which redirect queries to port 80 to port 9300, right?

I think this should work.

But if Marvel interface works fine using localhost:80/_plugin/marvel URL, it means to me that you redirected 80 port to 9200 port.

Note that when using Transport Java Client, you need to define the same cluster name as you defined in your nodes.

HTH

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e055e190-12e2-4ca6-a32b-4349cb9a7ef6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/C0004CFC-A5FD-4AB4-8B95-80839D133276%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.