boyney123 / garie-lighthouse

Lighthouse Garie plugin. Polls websites to checkout performance metrics also supports webhooks.
MIT License
50 stars 24 forks source link

Failed to initialise influx #25

Open MarcoFaul opened 4 years ago

MarcoFaul commented 4 years ago

Relevant code or config

 influxdb:
    image: "influxdb:latest"
    ports:
      - 8086:8086
    environment:
      - INFLUXDB_ADMIN_USER=<USER>
      - INFLUXDB_ADMIN_PASSWORD=<PASSWORD>
    volumes:
      - ./influxdb:/var/lib/influxdb

  garie-lighthouse:
    image: "garie/lighthouse"
    ports:
      - 3003:3000
    environment:
      - HOST=influxdb
    volumes:
      - ./garie-config.json:/usr/src/garie-lighthouse/config.json
      - ./plugins/garie-lighthouse/reports:/usr/src/garie-lighthouse/reports
      - ./plugins/garie-lighthouse/logs:/usr/src/garie-lighthouse/logs
    depends_on:
      - influxdb

  garie-browsertime:
    image: "garie/browsertime"
    ports:
      - 3001:3000
    environment:
      - HOST=influxdb
      - REPORT_DIR=./plugins/garie-browsertime
    volumes:
      - ./garie-config.json:/usr/src/garie-browsertime/config.json
      - ./plugins/garie-browsertime/reports:/usr/src/garie-browsertime/reports
      - ./plugins/garie-browsertime/logs:/usr/src/garie-browsertime/logs
      - /var/run/docker.sock:/run/docker.sock

    depends_on:
      - influxdb

What you did:

What happened:

`root@Grafana-1:~/grafana/docker# docker logs docker_garie-lighthouse_1

garie-lighthouse@0.0.1 start /usr/src/garie-lighthouse node ./src/index.js

Application listening on port 3000 (node:27) UnhandledPromiseRejectionWarning: Failed to initialise influx (node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:27) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

garie-lighthouse@0.0.1 start /usr/src/garie-lighthouse node ./src/index.js

Application listening on port 3000 (node:17) UnhandledPromiseRejectionWarning: Failed to initialise influx (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. root@Grafana-1:~/grafana/docker#`

Reproduction repository:

Problem description: I saw that the Grafana dashboard has no data since 30days… The Connection from Grafana to the influx db is successful. Would be awesome if someone can give me a hint

dirsta4p commented 4 years ago

I get the same error, did you find any solution?

GerardSmit commented 4 years ago

This is because the function is async and returns a promise. For more information see my comment in issue https://github.com/boyney123/garie-lighthouse/issues/24#issuecomment-578078026.