Trying to setup stunnel for es

I'm running:

Ubuntu 14.04
stunnel4
Elasticsearch 1.3.1

In Elasticsearch.yml I bind ES to localhost only.

network.bind_host: 127.0.0.1

In my stunnel config...
client = no
[elasticsearch]
accept = 9600
connect = 127.0.0.1:9300
cert = /etc/stunnel/stunnel.pem

Then I run elasticsearch. I have not tried to connect a client yet until I
resolve the below exceptions...

[2014-08-21 10:09:17,511][INFO ][node ] [Archenemy]
version[1.3.0], pid[31396], build[1265b14/2014-07-23T13:46:36Z]
[2014-08-21 10:09:17,511][INFO ][node ] [Archenemy]
initializing ...
[2014-08-21 10:09:17,519][INFO ][plugins ] [Archenemy]
loaded [marvel], sites [marvel, HQ]
[2014-08-21 10:09:20,088][INFO ][node ] [Archenemy]
initialized
[2014-08-21 10:09:20,088][INFO ][node ] [Archenemy]
starting ...
[2014-08-21 10:09:20,329][INFO ][transport ] [Archenemy]
bound_address {inet[/127.0.0.1:9300]}, publish_address
{inet[/10.0.0.xxx:9300]}
[2014-08-21 10:09:20,346][INFO ][discovery ] [Archenemy]
esdashboard/OoIM73WsQYmQANs5Z7TlgQ
[2014-08-21 10:09:20,444][WARN ][cluster.service ] [Archenemy]
failed to connect to node
[[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[/10.0.0.xxx:9300]]]
org.elasticsearch.transport.ConnectTransportException:
[Archenemy][inet[/10.0.0.xxx:9300]] connect_timeout[30s]
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:733)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:662)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:630)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:146)
at
org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:424)
at
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153)
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:745)
Caused by: java.net.ConnectException: Connection refused: /10.0.0.xxx:9300
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:712)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
... 3 more
[2014-08-21 10:09:23,357][INFO ][cluster.service ] [Archenemy]
new_master
[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[/10.0.0.xxx:9300]],
reason: zen-disco-join (elected_as_master)
[2014-08-21 10:09:23,481][INFO ][http ] [Archenemy]
bound_address {inet[/127.0.0.1:9200]}, publish_address
{inet[/10.0.0.xxx:9200]}
[2014-08-21 10:09:23,482][INFO ][node ] [Archenemy]
started
[2014-08-21 10:09:24,128][INFO ][gateway ] [Archenemy]
recovered [33] indices into cluster_state
[2014-08-21 10:10:20,158][WARN ][cluster.service ] [Archenemy]
failed to reconnect to node
[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[xxxxxx.xxxxxx.net/10.0.0.xxx:9300]]
org.elasticsearch.transport.ConnectTransportException:
[Archenemy][inet[xxxxxx.xxxxxx.net/10.0.0.xxx:9300]] connect_timeout[30s]
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:733)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:662)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:630)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:146)
at
org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:537)
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:745)
Caused by: java.net.ConnectException: Connection refused:
xxxxxx.xxxxxx.net/10.0.0.xxx:9300

Any config I'm missing?

Thanks

--
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/8eb3d3cf-f8ab-47a0-b754-425b7dada4ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I set network.host: 127.0.0.1

And now both bind and publish host are bound to 127.0.0.1 and there is no
exceptions.

Is that right?

Now theoretically I should be able to stunnel my node client from another
boxing through the 9500 port?

On Thursday, 21 August 2014 10:22:16 UTC-4, John Smith wrote:

I'm running:

Ubuntu 14.04
stunnel4
Elasticsearch 1.3.1

In Elasticsearch.yml I bind ES to localhost only.

network.bind_host: 127.0.0.1

In my stunnel config...
client = no
[elasticsearch]
accept = 9600
connect = 127.0.0.1:9300
cert = /etc/stunnel/stunnel.pem

Then I run elasticsearch. I have not tried to connect a client yet until I
resolve the below exceptions...

[2014-08-21 10:09:17,511][INFO ][node ] [Archenemy]
version[1.3.0], pid[31396], build[1265b14/2014-07-23T13:46:36Z]
[2014-08-21 10:09:17,511][INFO ][node ] [Archenemy]
initializing ...
[2014-08-21 10:09:17,519][INFO ][plugins ] [Archenemy]
loaded [marvel], sites [marvel, HQ]
[2014-08-21 10:09:20,088][INFO ][node ] [Archenemy]
initialized
[2014-08-21 10:09:20,088][INFO ][node ] [Archenemy]
starting ...
[2014-08-21 10:09:20,329][INFO ][transport ] [Archenemy]
bound_address {inet[/127.0.0.1:9300]}, publish_address
{inet[/10.0.0.xxx:9300]}
[2014-08-21 10:09:20,346][INFO ][discovery ] [Archenemy]
esdashboard/OoIM73WsQYmQANs5Z7TlgQ
[2014-08-21 10:09:20,444][WARN ][cluster.service ] [Archenemy]
failed to connect to node
[[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[/10.0.0.xxx:9300]]]
org.elasticsearch.transport.ConnectTransportException:
[Archenemy][inet[/10.0.0.xxx:9300]] connect_timeout[30s]
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:733)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:662)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:630)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:146)
at
org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:424)
at
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153)
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:745)
Caused by: java.net.ConnectException: Connection refused: /10.0.0.xxx:9300
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:712)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
... 3 more
[2014-08-21 10:09:23,357][INFO ][cluster.service ] [Archenemy]
new_master
[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[/10.0.0.xxx:9300]],
reason: zen-disco-join (elected_as_master)
[2014-08-21 10:09:23,481][INFO ][http ] [Archenemy]
bound_address {inet[/127.0.0.1:9200]}, publish_address
{inet[/10.0.0.xxx:9200]}
[2014-08-21 10:09:23,482][INFO ][node ] [Archenemy]
started
[2014-08-21 10:09:24,128][INFO ][gateway ] [Archenemy]
recovered [33] indices into cluster_state
[2014-08-21 10:10:20,158][WARN ][cluster.service ] [Archenemy]
failed to reconnect to node
[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[
xxxxxx.xxxxxx.net/10.0.0.xxx:9300]]
org.elasticsearch.transport.ConnectTransportException: [Archenemy][inet[
xxxxxx.xxxxxx.net/10.0.0.xxx:9300]] connect_timeout[30s]
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:733)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:662)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:630)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:146)
at
org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:537)
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:745)
Caused by: java.net.ConnectException: Connection refused:
xxxxxx.xxxxxx.net/10.0.0.xxx:9300

Any config I'm missing?

Thanks

--
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/5ce54c85-d247-4dc6-aa90-10b4c171121f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ok so i got it work on single node but i can't make it bridge for multinode
using unicast....

On server 1 i have...

Stunnel config...
[es-server-native]
accept = 10.0.0.xx0:9300
connect = 127.0.0.1:9300
cert = stunnel.pem

elasticsearch.yml
network.host: 127.0.0.1
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["what do i put here since now the nodes
are not accessible externally"]

On server 2 i have...

Stunnel config...
[es-server-native]
accept = 10.0.0.xx1:9300
connect = 127.0.0.1:9300
cert = stunnel.pem

elasticsearch.yml
network.host: 127.0.0.1
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["what do i put here since now the nodes
are not accessible externally"]

If I try to make the local es machine a client of itself. And start
Elasticsearch I get bind address error and elasticsearch wont start.

On Server 1
[es-client-native]
client = yes
accept = 127.0.0.1:9300
connect = 10.0.0.xx1:9300

On Server 2
[es-client-native]
client = yes
accept = 127.0.0.1:9300
connect = 10.0.0.xx0:9300

On Thursday, 21 August 2014 10:53:01 UTC-4, John Smith wrote:

I set network.host: 127.0.0.1

And now both bind and publish host are bound to 127.0.0.1 and there is no
exceptions.

Is that right?

Now theoretically I should be able to stunnel my node client from another
boxing through the 9500 port?

On Thursday, 21 August 2014 10:22:16 UTC-4, John Smith wrote:

I'm running:

Ubuntu 14.04
stunnel4
Elasticsearch 1.3.1

In Elasticsearch.yml I bind ES to localhost only.

network.bind_host: 127.0.0.1

In my stunnel config...
client = no
[elasticsearch]
accept = 9600
connect = 127.0.0.1:9300
cert = /etc/stunnel/stunnel.pem

Then I run elasticsearch. I have not tried to connect a client yet until
I resolve the below exceptions...

[2014-08-21 10:09:17,511][INFO ][node ] [Archenemy]
version[1.3.0], pid[31396], build[1265b14/2014-07-23T13:46:36Z]
[2014-08-21 10:09:17,511][INFO ][node ] [Archenemy]
initializing ...
[2014-08-21 10:09:17,519][INFO ][plugins ] [Archenemy]
loaded [marvel], sites [marvel, HQ]
[2014-08-21 10:09:20,088][INFO ][node ] [Archenemy]
initialized
[2014-08-21 10:09:20,088][INFO ][node ] [Archenemy]
starting ...
[2014-08-21 10:09:20,329][INFO ][transport ] [Archenemy]
bound_address {inet[/127.0.0.1:9300]}, publish_address
{inet[/10.0.0.xxx:9300]}
[2014-08-21 10:09:20,346][INFO ][discovery ] [Archenemy]
esdashboard/OoIM73WsQYmQANs5Z7TlgQ
[2014-08-21 10:09:20,444][WARN ][cluster.service ] [Archenemy]
failed to connect to node
[[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[/10.0.0.xxx:9300]]]
org.elasticsearch.transport.ConnectTransportException:
[Archenemy][inet[/10.0.0.xxx:9300]] connect_timeout[30s]
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:733)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:662)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:630)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:146)
at
org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:424)
at
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:153)
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:745)
Caused by: java.net.ConnectException: Connection refused: /10.0.0.xxx:9300
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:712)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)
at
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
... 3 more
[2014-08-21 10:09:23,357][INFO ][cluster.service ] [Archenemy]
new_master
[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[/10.0.0.xxx:9300]],
reason: zen-disco-join (elected_as_master)
[2014-08-21 10:09:23,481][INFO ][http ] [Archenemy]
bound_address {inet[/127.0.0.1:9200]}, publish_address
{inet[/10.0.0.xxx:9200]}
[2014-08-21 10:09:23,482][INFO ][node ] [Archenemy]
started
[2014-08-21 10:09:24,128][INFO ][gateway ] [Archenemy]
recovered [33] indices into cluster_state
[2014-08-21 10:10:20,158][WARN ][cluster.service ] [Archenemy]
failed to reconnect to node
[Archenemy][OoIM73WsQYmQANs5Z7TlgQ][xxxxxx][inet[
xxxxxx.xxxxxx.net/10.0.0.xxx:9300]]
org.elasticsearch.transport.ConnectTransportException: [Archenemy][inet[
xxxxxx.xxxxxx.net/10.0.0.xxx:9300]] connect_timeout[30s]
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:733)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:662)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:630)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:146)
at
org.elasticsearch.cluster.service.InternalClusterService$ReconnectToNodes.run(InternalClusterService.java:537)
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:745)
Caused by: java.net.ConnectException: Connection refused:
xxxxxx.xxxxxx.net/10.0.0.xxx:9300

Any config I'm missing?

Thanks

--
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/c07e5c64-bad8-42ef-920f-88096528b937%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.