简体   繁体   English

我无法使用 grafana 和本地 Dbeaver 连接到 CateDB 的原因是什么?

[英]What can be the reason why I can't connect to CateDB with grafana and locally with Dbeaver?

Cheers I am currently trying to reproduce the tutorial to develop an application / solution with Fiware seen in: Desarrolla tu primer aplicación en Fiware and I am having difficulty connecting Grafana with the Crate database (recommended by Fiware).干杯我目前正在尝试重现教程以使用 Fiware 开发应用程序/解决方案,参见: Desarrolla tu prime aplicación en Fiware ,并且我在将 Grafana 与 Crate 数据库连接时遇到困难(由 Fiware 推荐)。

My docker-compose file configuration is:我的 docker-compose 文件配置为:

version: "3.5"

services:

  orion:
    image: fiware/orion
    hostname: orion
    container_name: fiware-orion
    networks:
      - fiware_network
    depends_on:
      - mongo-db
    ports:
      - "1026:1026"
    command: -dbhost mongo-db -logLevel DEBUG -noCache

  mongo-db:
    image: mongo:3.6
    hostname: mongo-db
    container_name: db-mongo
    networks:
      - fiware_network
    ports:
      - "27017:27017" 
    command: --bind_ip_all --smallfiles
    volumes:
      - mongo-db:/data

  grafana:
    image: grafana/grafana:8.2.6
    container_name: fiware-grafana
    networks:
      - fiware_network
    ports:
      - "3000:3000"
    depends_on:
      - crate

  quantumleap:
    image: fiware/quantum-leap
    container_name: fiware-quantumleap
    networks:
      - fiware_network
    ports:
      - "8668:8668"
    depends_on:
      - mongo-db
      - orion
      - crate
    environment:
      - CRATE_HOST=crate

  crate:
    image: crate:1.0.5
    networks:
      - fiware_network
    ports:
      # Admin UI
      - "4200:4200"
      # Transport protocol
      - "4300:4300"
    command: -Ccluster.name=democluster -Chttp.cors.enabled=true -Chttp.cors.allow-origin="*"
    volumes:
      - cratedata:/data

volumes:
  mongo-db:
  cratedata:

networks:                                
  fiware_network:                               
    driver: bridge    

After starting the containers, I have a positive response from OCB (Orion), from Quantumleap and even after creating the subscription between Orion and quantumleap, in the Crate database, the data is stored and updated correctly.启动容器后,我得到了 OCB(Orion)、Quantumleap 的积极响应,甚至在创建 Orion 和 quantumleap 之间的订阅之后,在 Crate 数据库中,数据被正确存储和更新。

Unfortunately I am not able to get the visualization of the data in grafana.不幸的是,我无法在 grafana 中获得数据的可视化。

I thought that the reason was the fact that crateDB was removed as a grafana plugin versions ago, but after researching how to connect crateDB with grafana, through a postgres data source (I read on: Visualizing time series data with Grafana and CrateDB ), I'm still having difficulty getting the connection, getting in grafana "Query error dbquery error: EOF"我认为原因是 crateDB 在之前作为 grafana 插件版本被删除,但是在研究了如何通过 postgres 数据源将 crateDB 与 grafana 连接之后(我继续阅读: Visualizing time series data with Grafana and CrateDB ),我'我仍然难以获得连接,进入 grafana “查询错误 dbquery 错误:EOF”

grafana settings img grafana设置img

The difference with respect to the guide is the listening port, since with input port 5432 I get a response indicating that it is not possible to connect to the server.与指南的区别在于侦听端口,因为使用输入端口 5432 我得到一个响应,表明无法连接到服务器。 I'm using port 4300.我正在使用端口 4300。

After configuring, and trying to query from grafana, I get the mentioned EOF error配置后,尝试从 grafana 查询,我得到提到的 EOF 错误

EOF error in grafana img grafana img 中的 EOF 错误

I tried to connect from a database IDE (Dbeaver) and I get exactly the same problem.我尝试从数据库 IDE (Dbeaver) 进行连接,但遇到了完全相同的问题。

EOF error in Dbeaver img Dbeaver img 中的 EOF 错误

Is there something I am missing?有什么我想念的吗? What should I change in my docker configuration, or ports, or anything else to fix this?我应该在我的 docker 配置、端口或其他任何东西中更改什么来解决这个问题?

I think it is worth mentioning that I am studying this because I am being asked in a project to visualize context switches in real time with Fiware and grafana.我认为值得一提的是我正在研究这个,因为我在一个项目中被要求使用 Fiware 和 grafana 实时可视化上下文切换。

Thanks in advance提前致谢

The PostgreSQL port 5432 must be exposed as well by the CrateDB docker image. CrateDB docker 映像也必须公开 PostgreSQL 端口5432

Additionally, I highly recommend to use a recent (or just the latest) CrateDB version, current stable is 5.0.0 , your used version 1.0.5 is very old and not maintained anymore.此外,我强烈建议使用最新的(或只是最新的)CrateDB 版本,当前稳定版是5.0.0 ,您使用的1.0.5版本非常旧,不再维护。

Full example entry:完整示例条目:

  crate:
    image: crate:latest
    networks:
      - fiware_network
    ports:
      # Admin UI
      - "4200:4200"
      # Transport protocol
      - "4300:4300"
      # PostgreSQL protocol
      - "5432:5432"
    command: -Ccluster.name=democluster -Chttp.cors.enabled=true -Chttp.cors.allow-origin="*"
    volumes:
      - cratedata:/data

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM