I'm trying to start elasticsearch 2.4.6 on my Mac (HighSierra).
Using: Docker Kitematic 0.17.2, Docker for Mac 18.06.1
After I download and run selected image in container I have
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
dc5e1f90ce24 elasticsearch:2.4.6 "/docker-entrypoint.…" 13 hours ago Up 3 minutes 0.0.0.0:32782->9200/tcp, 0.0.0.0:32781->9300/tcp elasticsearch
But Elastic cannot be reached out on 9200, 9300
curl 'http://localhost:9200/?pretty'
curl: (7) Failed to connect to localhost port 9200: Connection refused
curl 'http://0.0.0.0:9200/?pretty'
curl: (7) Failed to connect to 0.0.0.0 port 9200: Connection refused
Isn't 0.0.0.0 should be available?
The answer was pretty clear, thanks Val. But to make it easier I changed in Kitematic mapping ports to 9200, 9300, so now I have
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a817c85926dc elasticsearch:2.4.6 "/docker-entrypoint.…" 4 minutes ago Up 4 minutes 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp elasticsearch
As I expected
Related
After setting up elasticsearch and kibana, I installed curl.
I tried running this command on terminal:
curl -X GET https://localhost:9200
And it is giving this error.
curl: (7) Failed to connect to localhost port 9200 after 6 ms: Couldn't connect to server
Does anyone know how to resolve this issue?
We are using AWS Lambda runtime interface emulator to run our app locally inside Docker using lite-server
I start my docker container with:
docker run -p 9000:8080 image-name
The curl http://localhost:9000 command is returning
curl: (7) Failed to connect to localhost port 9000 after 0 ms: Connection refused
I am a newbie to Docker, can anyone please suggest how to fix it?
I am trying to check if elasticsearch is properly working on Ubuntu 14.04. So for that, I am running following commands:
$ sudo service elasticsearch start
$ curl -X GET 'http://localhost:9200'
Error:
curl: (7) Failed to connect to localhost port 9200: Connection refused
I am attaching screenshot of my /etc/elasticsearch/elasticsearch.yml file here and also attaching my-application.log
The problem is pretty evident from the log file
org.elasticsearch.ElasticsearchException: X-Pack is not supported and Machine Learning is not available for [linux-x86]; you can use the other X-Pack features (unsupported) by setting xpack.ml.enabled: false in elasticsearch.yml
Simply add this to your elasticsearch.yml config file and restart the service
xpack.ml.enabled: false
I install Elastic Search using this tutorial changing only version by Elastic Search.
Set network.host: 127.0.0.1 to access by terminal. But show this error when try connect:
curl: (7) Failed to connect to localhost port 9200: Connection refused
Check your port 9200 is open or not, then check if you're not using the UFW firewall.
In case of you are using the UFW firewall :
sudo ufw allow 9200
I started to play around with docker for a while and got stuck with the below:
Here's my Environment:
Windows 10
boot2docker/Docker version 1.12.0
Virtual box 5.0.24
this is what i'm trying to do:
$ docker run -itp 8090:8090 lamp
root#8ebc390337be:/# service apache2 start
* Starting web server apache2 *
root#8ebc390337be:/# service mysql start
* Starting MySQL database server mysqld [ OK ]
root#8ebc390337be:/#
deattached from container and then
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8ebc390337be lamp "/bin/bash" 13 minutes ago Up 13 minutes 0.0.0.0:8090->8090/tcp happy_brown
$ docker inspect $(docker ps -q) | grep IPA
"SecondaryIPAddresses": null,
"IPAddress": "172.17.0.2",
"IPAMConfig": null,
"IPAddress": "172.17.0.2",
now when i try to run
$ curl 172.17.0.2:8090
curl: (7) Failed to connect to 172.17.0.2 port 8090: Timed out
then i tried
$ docker-machine ip default
192.168.99.100
$ curl 192.168.99.100:8090
curl: (7) Failed to connect to 192.168.99.100 port 8090: Connection refused
i did go through this accessing-a-docker-container-url-on-windows-host but it didn't help me.
i should be able to access the url from inside and outside the docker.
Could someone help me to troubleshoot
This is the ip address you should be using 192.168.99.100
I expect the problem is that your apache server is on port 80 inside the container, not 8090, i.e. your docker command should be:
$ docker run -itp 8090:80 linode/lamp
Which means map port 8090 on the outside host (192.168.99.100) to port 80 inside the container.