Can't access Kibana after reload, and enabled & started kibana service. HTTP 302 Error

Hi there,

I installed elasticSearch (7.4.1) on Ubuntu 18.04.1 server in Virtualbox, and it is working fine. I could create mapping, indexes, and use all the cmds(XPUT, XPOST, XGET ...).

After installing Kibana(7.5.2) in the same server as ES, and updated the Kibana.yml for the following line ONLY:

server.host: "0.0.0.0"

Kibana server is up and running but it returns HTTP 302. Here are the cmds I used to install and test this issue.

sudo apt-get install kibana
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable kibana.service
sudo /bin/systemctl start kibana.service

//Wait for a few mins and check the kibana log
journalctl -u kibana.service

//Once I could see the kibana is up and running as below
"tags":["info","http","server","Kibana"],"pid":3388,"message":"http server running at http://0.0.0.0:5601"}

// I curl the url and it returns HTTP 302 Error
curl -I localhost:5601

//here is the kibana log
"head","statusCode":302,"req":{"url":"/","method":"head","headers":{"host":"localhost:5601","user-agent":"curl/7.58.0"," ........

How can I fix this 302 error? I have tried to restart the services, Ubuntu server, and reinstall Kibana, same error.

302 is not an error - it's just a HTTP redirect. Nothing is wrong here, if you really need to query Kibana root URL for some reason you can tell curl to follow redirect with L flag: curl -IL localhost:5601.

Best,
Oleg

Hi azasypkin,

Thank you for your reply. I have tried your curl cmd, I got 503 ERROR. When I check the kibana, it is running ...

//cmd to check log
journalctl -u kibana.service

Jan 25 22:24:32 es7 kibana[3929]: {"type":"log","@timestamp":"2020-01-25T22:24:32Z","tags":["info","http","server","Kibana"],"pid":3929,"message":"http server running at http://0.0.0.0:5601"}


curl -IL http://localhost:5601/

HTTP/1.1 503 Service Unavailable
content-security-policy: script-src 'unsafe-eval' 'self'; worker-src blob:; child-src blob:; style-src 'unsafe-inline' 'self'
kbn-name: kibana
kbn-xpack-sig: 5bee86142c1bf0336ae0cbb335dce798
cache-control: no-cache
content-type: text/html; charset=utf-8
content-length: 84905
vary: accept-encoding
Date: Sat, 25 Jan 2020 22:20:08 GMT
Connection: keep-alive

What do you see when you just open Kibana in browser? It can take some time for Kibana to fully start up and until then it may be returning 503.

I am still running the Virtualbox in my macbook all day & all week ... when I go to browser or postman in my macbook to point to http://localhost:5601, I got "This site can't be reached" or " Could not get any response". If I curl the ubuntu server through SSH terminal, I still got 302 & 503.


kelvin@es7:/usr/share/elasticsearch$ curl -IL localhost:5601
HTTP/1.1 302 Found
location: /spaces/enter
kbn-name: kibana
kbn-xpack-sig: 5bee86142c1bf0336ae0cbb335dce798
cache-control: no-cache
content-length: 0
Date: Mon, 27 Jan 2020 14:21:25 GMT
Connection: keep-alive

HTTP/1.1 302 Found
location: /app/kibana
kbn-name: kibana
kbn-xpack-sig: 5bee86142c1bf0336ae0cbb335dce798
content-type: text/html; charset=utf-8
cache-control: no-cache
content-length: 0
Date: Mon, 27 Jan 2020 14:21:25 GMT
Connection: keep-alive

HTTP/1.1 503 Service Unavailable
content-security-policy: script-src 'unsafe-eval' 'self'; worker-src blob:; child-src blob:; style-src 'unsafe-inline' 'self'
kbn-name: kibana
kbn-xpack-sig: 5bee86142c1bf0336ae0cbb335dce798
cache-control: no-cache
content-type: text/html; charset=utf-8
content-length: 84905
vary: accept-encoding
Date: Mon, 27 Jan 2020 14:21:25 GMT
Connection: keep-alive

1 Like

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