pelias / dashboard

Pelias dashboard built with the Dashing framework
7 stars 12 forks source link

scheduler caught exception #13

Closed Binternet closed 4 years ago

Binternet commented 6 years ago

After firing docker-compose up :

pelias-dashboard | undefined method `[]' for nil:NilClass
pelias-dashboard | /opt/pelias/dashboard/jobs/counts.rb:26:in `block in <top (required)>'
pelias-dashboard | /usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `trigger_block'
pelias-dashboard | /usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in `block in trigger'
pelias-dashboard | /usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
pelias-dashboard | ================================================================================
pelias-dashboard | /opt/pelias/dashboard/jobs/es_metrics.rb:38:in `block in <top (required)>'
pelias-dashboard | /usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `trigger_block'
pelias-dashboard | /usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in `block in trigger'
pelias-dashboard | /usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
theobolo commented 6 years ago

Same here +1

jdstone-loansnap commented 5 years ago

Same here +1

Dashboard is also not working. Not showing any data or the Elasticsearch version.

In addition to the above, I'm also seeing:

================================================================================
scheduler caught exception:
undefined method `[]' for nil:NilClass
/opt/pelias/dashboard/jobs/es_metrics.rb:25:in `block in <top (required)>'
/usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `trigger_block'
/usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in `block in trigger'
/usr/local/bundle/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
================================================================================
NickStallman commented 5 years ago

After some poking, it doesn't like the ES index not being "pelias". Has everyone renamed the index? Tried tracing through the code and setting ES_INDEX however there seems to be an issue where somewhere "pelias" is stuck on to the front of whatever ES_INDEX is set to.

jdstone-loansnap commented 5 years ago

My ES index name is "pelias".

NickStallman commented 5 years ago

After some mucking around, I got it working perfectly with: AUTH_TOKEN=something ES_INDEX=pelias201812 dashing start Which isn't the recommended start command. My index is pelias201812

These commands failed: AUTH_TOKEN=something ES_ENDPOINT=http://127.0.0.1:9200/pelias201812 dashing start AUTH_TOKEN=something ES_ENDPOINT=http://127.0.0.1:9200/ dashing start

Also this did work: AUTH_TOKEN=something ES_ENDPOINT=http://127.0.0.1:9200/ ES_INDEX=pelias201812 dashing start

Looks like the docs need some tweaks, and additional error checking code needs to be added to catch this issue.

jdstone-loansnap commented 5 years ago

Of course none of the above helps when doing this with a Docker image in a Kubernetes environment as any changes will just be overwritten when and if the pod restarts. But correct me if I'm wrong.

jgoering commented 5 years ago

I had a similar issue while using docker-compose and solved it by removing 'pelias' from the ES_ENDPOINT in docker-compose.yml:

version: '2' services: dashboard: image: pelias/dashboard:latest build: context: . ports:

  • 3030:3030 hostname: pelias-dashboard container_name: pelias-dashboard environment: AUTH_TOKEN: something ES_ENDPOINT: http://192.168.43.146:9200/
orangejulius commented 4 years ago

As with #12, I think this error is caused by failures to reach Elasticsearch for whatever reason. As it's been a while, if anyone is seeing this problem, please open a new issue.