Hi everyone !
I did a very simple installation (from digital ocean tutorial) of an ELK server on CentOS and i get this "bad gateway" error (after sending htpasswd credentials).
More information here :
Checking local 5601 port :
$ sudo netstat -laputen | grep 5601
tcp 0 0 127.0.0.1:5601 0.0.0.0:* LISTEN 994 67656 12070/node
$ ps -eaf | grep 12070
kibana 12070 1 1 09:08 ? 00:01:23 /opt/kibana/bin/../node/bin/node /opt/kibana/bin/../src/cli
Verifying http accesibility :
$ curl -i localhost:5601
HTTP/1.1 200 OK
kbn-name: kibana
kbn-version: 4.4.2
Checking nginx configuration :
$ cat /etc/nginx/conf.d/kibana.conf
server {
listen 80;
server_name ELK;
auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/htpasswd.users;
location / {
proxy_pass http://localhost:5601;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Verifying hostname :
$ hostname
ELK
Checking kibana logs :
$ cat /var/log/kibana/kibana.stderr
*empty file*
$ cat /var/log/kibana/kibana.stdout
*no error message*
Commentary :
I found something weird,
When i do :
$ systemctl start kibana
=> It start kibana service
$ service kibana start
=> it start another kibana service and i get two exact same services !!! (so here i use only one of this)
Someone have any idea about this ?
Cause i dont know where to find after all this stuff !
Thanks for all and have a good day