elastalert-kibana-plugin icon indicating copy to clipboard operation
elastalert-kibana-plugin copied to clipboard

ECONNREFUSED 127.0.0.1:3030

Open Gayathri91 opened this issue 7 years ago • 7 comments

Added elastalert-kibana-plugin.serverHost: "127.0.0.1" elastalert-kibana-plugin.serverPort: 3030 in kibana.yml file as mentioned by other users.

I installed elastalert server from https://github.com/bitsensor/elastalert.git and did make build command.

But still I couldn't resolve 502-Bad getaway issue in elastalert-kibana-plugin. Please help.

Gayathri91 avatar Nov 20 '18 14:11 Gayathri91

I'm stuck on this also. In my case I have installed the plugin in my own container.

I have env ELASTALERT_KIBANA_PLUGIN_SERVERHOST set, ~but in the logs the plugin is still trying to use localhost.~ Actually the logs don't seem to have anything related to accessing the api. I just get the app message

502 - Bad Gateway
connect ECONNREFUSED 127.0.0.1:3030```

...
I've tried a bunch of different env keys
- ELASTALERT_KIBANA_PLUGIN_SERVERHOST
- ELASTALERT-KIBANA-PLUGIN_SERVERHOST
- elastalert-kibana-plugin.serverHost
- ELASTALERT_SERVERHOST
- SERVERHOST

But always localhost is used.

memelet avatar Dec 09 '18 05:12 memelet

I added

elastalert-kibana-plugin.serverHost: elastalert
elastalert-kibana-plugin.serverPort: 3030

to kibana.yml and that works. So I guess environment variables can only override, but not introduce new keys.

memelet avatar Dec 09 '18 06:12 memelet

as all of you mentioned above. I added most of keywords (such as elastalert, localhost and 127.0.0.1) for the configuration. but still I got "ECONNREFUSED 127.0.0.1:3030".

my Kibina version : 6.4.2 elastalert version : 1.0.1

elastalert-kibana-plugin.serverHost: elastalert # already tried localhost, 127.0.0.1 
elastalert-kibana-plugin.serverPort: 3030 

need your useful advices.

jin-dev avatar Dec 12 '18 09:12 jin-dev

I got rid of this error using my IPv4 address in kibana.yml

elastalert-kibana-plugin.serverHost: 192.168.1.36
elastalert-kibana-plugin.serverPort: 3030

pihlajus avatar Dec 13 '18 14:12 pihlajus

I also tried for my personal IP starts with 192.168... unfortunately in my case, it didn't work need another way to do this.

jin-dev avatar Dec 14 '18 01:12 jin-dev

If you are running the elastalert server as a container on docker, then you must use this command

elastalert-kibana-plugin.serverHost: elastalert elastalert-kibana-plugin.serverPort: 3030

otherwise replace the 3030 with whatever port your Elastalert server is running on. This is defined in docker-compose.yml under elastalert under ports

Your elastalert in docker-compose should look something like this

elastalert: links: - elasticsearch image: bitsensor/elastalert container_name: elastalert environment: ELASTALERT_USER: "elastalert" ELASTALERT_PWD: "changeme" ELASTICSEARCH_HOST: "YOUR ELASTICSEARCH HOST" ELASTICSEARCH_PORT: "YOUR ELASTICSEARCH PORT" volumes: - ./elastalert/config/elastalert.yaml:/opt/elastalert/config.yaml:ro - ./elastalert/config/config.json:/opt/elastalert-server/config/config.json:ro - ./elastalert/rules/:/opt/elastalert/rules/ - ./elastalert/rule_templates/:/opt/elastalert/rule_templates/ ports: - 3030:3030 #logging: # driver: syslog # options: # syslog-address: "tcp://:5000" networks: - YOURNETWORKNAME

Subash-Chandra avatar Jan 04 '19 18:01 Subash-Chandra

thanks, i have used as @pihlajus suggested its worked @jin-dev

qakart avatar Mar 19 '19 17:03 qakart