Elasticsearch connection refused - elasticsearch

I'm trying to access elasticsearch, not from the host machine, however I get connection refused error.
What I tried:
telnet ip_address 9200
result was:
connect to address ip_address: Connection refused
telnet: Unable to connect to remote host
changing the elasticsearch.yml file. I changed host field to 0.0.0.0 and also tried the actual ip of the host machine, but it didn't help, I still got the error that connenction was refused.
Can you suggest what else can I try to solve this problem?

Related

Vagrant Homestead is not connecting with PostgresSql

While connecting psql in Vagrant Homestead I am getting the following error:
psql: error: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and
accepting TCP/IP connections on port 5432?
Can anyone please share some pointers on where to look for errors?
Connection refused means that the port you are trying to connect to is not actually open.
Just have re-read on documents https://laravel.com/docs/6.x/homestead#ports
so I think to try 54320 port in your local machin.

What port does elasticsearch listen on when installed via homebrew?

I'm using Mac 10.13.6. I just installed elasticsearch via homebrew and launched it ...
brew services start elasticsearch
Service `elasticsearch` already started, use `brew services restart elasticsearch` to restart.
In my /usr/local/etc/elasticsearch/elasticsearch.yml configuration file, I have
http.port: 9200
However, when I attempt to see if that port is available, I get a connection refused ...
localhost:tmp davea$ telnet localhost 9200
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
What port is elasticsearch getting launched on and how can I change that?
That may be the problem of Mac firewall? Edit elasticsearch.yml file in elasticsearch/config folder. Change the localhost to 127.0.0.1 to take a try?
network.host: 127.0.0.1
#
# Set a custom port for HTTP:
#
http.port: 9200
#

can't connect to postgres on windows10

I am setting up project on my windows PC and I have a problem with postgres.
Project is set on docker.
when I run docker-compose up I receive error
: *** Failed to connect to database dev; trying to create database
/usr/local/bundle/gems/sequel-4.48.0/lib/sequel/adapters/postgres.rb:224:in `initialize': PG::ConnectionBad: could not connect to server: Connection refused (Sequel::DatabaseConnectionError)
Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
I don't know what to do. I have already installed microsoft easy-fix for TCP-IP, shut down windows firewall, changed all connection in pg_hba.conf to trust. Nothing helps. I don't have any antivirus software installed.
nmap report:
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0027s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 995 closed ports
PORT STATE SERVICE
135/tcp open msrpc
445/tcp open microsoft-ds
2068/tcp open avocentkvm
2179/tcp open vmrdp
5432/tcp open postgresql
edit:
I run psql -h localhost and received
psql: CATASTROPHIC: role "Kamil" does not exist
Kamil is my PC name.
edit2:
is it possible that docker doesn't have access to postgres on localhost?
problem solved
I had to set environment var to DB_HOST=docker.for.win.localhost

Connection refused with ElasticSearch on Digital Ocean

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

localhost on MacOSX connection refused

I've had my app running on localhost port 80 via nginx on my mac for quite awhile. Recently I did some software updates and was trying to run other apps on different ports and now I can't run my first app on localhost:80.
I've very confused on where to start but think this is a firewall issue based on the following:
Tims-MacBook-Pro-2:html TimPeterson$ telnet localhost 80
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
pointing the browser to http://localhost gives this Oops! Google Chrome could not connect to localhost
thoughts?
you may want to run
apachectl configtest
first.
My problem was specific, but might help another user. On Mac OS go to system preferences/sharing and check your computer name/localhost name (click edit to see the localhost name). My computer was reset by Apple in a non-English speaking country. They stuck some of their language in my computer name (great idea!) and it broke the Cisco login to localhost
What worked for me was uncommenting the following line in my /etc/hosts file:
::1 localhost

Resources