Getting 404 Not Found error while sending data to Elasticsearch via port 80


(Rahul Jagad) #1

Hi,

I have installed elasticsearch and Kibana in my local (centOS) system.
I am using default port for elasticsearch(9200) and kibana(5601) .

My requirement is to send data from another server to my local server using http rest via 80 port.
I have neither configured any security nor SSL for this.
I am getting 404 "not found" response when I do rest call to elasticseach to send data via port 80.

Help me if you have any idea!

Thanks in advance :slight_smile:


(David Pilato) #2

What is running on port 80?


(Rahul Jagad) #3

hi @dadoonet, nothing is running currently on port 80. it is free to use.


(David Pilato) #4

How could you get a 404 answer on localhost:80 if nothing is running at all?


(Rahul Jagad) #5

Hi @dadoonet,

80 is default port and i am getting below when I browse with port 80:

"This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page it means that this site is working properly. This server is powered by CentOS."

That means port is working fine but when I try to send data with rest http call, hostname:80, I am getting 404. Not sure why so?


(David Pilato) #6

Because you started an Apache server on that port, no?

I have absolutely no idea about what you are doing...


(Rahul Jagad) #7

Hi @dadoonet,
My question is simple:
I want to send data with rest http call via port 80 to elasticsearch and getting 404 (not found) error, where nothing is running on port 80.

It is also mentioned in documentation that you can use 80 port to send data:

"The port number to use for this host. Note the default of 9200 is only true if the params are passed as an object. If a string, then default port is evaluated based on the protocol (80 for http, 443 for https)."

https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/host-reference.html


(Christian Dahlqvist) #8

Elasticsearch does by default not listen to port 80, so if you want to use this you will need to forward traffic from port 80 to 9200. You can do this through port forwarding or by e.g. placing a proxy in front of Elasticsearch.


(Rahul Jagad) #9

Thank you very much @Christian_Dahlqvist!!
It worked.

But now I have another issue. I am able to see index in kibana but I am not able to create the same index pattern.

Eg: I have sent data to index testing1. But when I am trying to click on "create Index" button, It is not creating the index.
I restarted Kibana service also but no luck :frowning:


(system) #10

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.