incubator-hugegraph-toolchain icon indicating copy to clipboard operation
incubator-hugegraph-toolchain copied to clipboard

[Bug] hubble can't use localhost/0.0.0.0 in docker env

Open DoodleBears opened this issue 1 year ago • 2 comments

Bug Type (问题类型)

dashboard render (前端渲染问题)

Before submit

  • [X] I had searched in the issues and found no similar issues.

Environment (环境信息)

  • Server Version: v1.0.0:latest [Docker]
  • Hubble Version: v1.6.0:latest [Docker]
  • Data Size: 2 vertices, 1 edges

Expected & Actual behavior (期望与实际表现)

hubble shows error

服务 localhost:8080 不可用

when I

  1. use docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph to run the hugegraph server.
  2. use docker run -itd --name=fe -p 8088:8088 hugegraph/hubble to run the hubble frontend
  3. In hubble click '创建图'
  4. input localhost as host address.
  5. click create

By the way, is '创建图' in this case should be called as '连接图' ? Since I need to use HTTP request to create graph (with backend setting... in request body) first. Then I can connect this graph in hubble (frontend).

can be fixed by using local IP address like docker run -itd --name=graph -p 192.168.1.204:8080:8080/tcp

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

DoodleBears avatar Jul 10 '23 12:07 DoodleBears

The backend of hubble tried to connect to the localhost:8080, but the backend was in the docker container and the localhost was the container. If you want to use localhost directly, you can use sudo docker run -itd --name graph --network host hugegraph/hugegraph and sudo docker run -itd --name fe --network host hugegraph/hubble. With host mode, the container will share the network with the host machine.

aroundabout avatar Jul 15 '23 16:07 aroundabout

The backend of hubble tried to connect to the localhost:8080, but the backend was in the docker container and the localhost was the container. If you want to use localhost directly, you can use sudo docker run -itd --name graph --network host hugegraph/hugegraph and sudo docker run -itd --name fe --network host hugegraph/hubble. With host mode, the container will share the network with the host machine.

Thanks.

DoodleBears avatar Jul 15 '23 17:07 DoodleBears