Hi all.
I am new to Elastic and I have been reading many of the possible solutions to the problem I am experiencing without any success. May be I could help some more direct help here.
Scenario:
- Lenovo machine running Ubuntu 18.04.3 and VirtualBox 6.0 as a host.
- 2 VMs running Ubuntu 18.04.3 with bridged adapter network connections each (they get their IPs from the WIFI Router). Both are running on the same host.
- VM1 (Elasticsearch running, Metricbeat running and getting data OK) IP=10.0.0.19
- VM2 (Metricbeat running) IP=10.0.0.106
They ping each other OK.
From Metricbeat VM2 I keep getting...
VM2~$ sudo metricbeat test output
elasticsearch: http://10.0.0.19:9200...
parse url... OK
connection...
parse host... OK
dns lookup... OK
addresses: 10.0.0.19
dial up... ERROR dial tcp 10.0.0.19:9200: connect: connection refused.
VM2~$ sudo metricbeat -e
2019-08-30T11:37:53.747-0700 ERROR pipeline/output.go:100 Failed to connect to backoff(elasticsearch(http://10.0.0.19:9200)): Get http://10.0.0.19:9200: dial tcp 10.0.0.19:9200: connect: connection refused
2019-08-30T11:37:53.747-0700 INFO pipeline/output.go:93 Attempting to reconnect to backoff(elasticsearch(http://10.0.0.19:9200)) with 54 reconnect attempt(s)
2019-08-30T11:37:53.748-0700 INFO [publisher] pipeline/retry.go:189 retryer: send unwait-signal to consumer
2019-08-30T11:37:53.748-0700 INFO [publisher] pipeline/retry.go:191 done
2019-08-30T11:37:53.748-0700 INFO [publisher] pipeline/retry.go:166 retryer: send wait signal to consumer
2019-08-30T11:37:53.748-0700 INFO [publisher] pipeline/retry.go:168 done
Configurations:
VM1 configuration for elasticseach.yml file:
network.host: ["localhost"]
http.port: 9200
VM2 configuration for metricbeat.yml file:
output.elasticsearch:
hosts: ["10.0.0.19:9200"]
Configuration seems to be pretty straight forward so I would assume it is a network or FW issue.
VM1~$ sudo ufw status
Status: active
To Action From
Anywhere ALLOW 10.0.0.0/24
VM2~$ sudo ufw status
Status: inactive
VM1~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 100 0 0 enp0s3
10.0.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s3
VM2~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default _gateway 0.0.0.0 UG 100 0 0 enp0s3
10.0.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3
link-local 0.0.0.0 255.255.0.0 U 1000 0 0 enp0s3
VM1~$ curl 10.0.0.19:9200
curl: (7) Failed to connect to 10.0.0.19 port 9200: Connection refused
VM1~$ curl 0.0.0.0:9200
{
"name" : "VirtualBox",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "DsgGfrrHTmeptq0aQeanDQ",
"version" : {
"number" : "7.3.1",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "4749ba6",
"build_date" : "2019-08-19T20:19:25.651794Z",
"build_snapshot" : false,
"lucene_version" : "8.1.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
VM1~$ curl localhost:9200
{
"name" : "VirtualBox",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "DsgGfrrHTmeptq0aQeanDQ",
"version" : {
"number" : "7.3.1",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "4749ba6",
"build_date" : "2019-08-19T20:19:25.651794Z",
"build_snapshot" : false,
"lucene_version" : "8.1.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
VM2~$ curl 10.0.0.19:9200
curl: (7) Failed to connect to 10.0.0.19 port 9200: Connection refused
I have read plenty of answers and docs and tried different things by changing parameters and configurations and still the same results. I have also tried installing and running Metricbeat from a different machine in the same subnet and same results. Is there any other configuration I am missing?
Any help or hint is much appreciated.