Closed GG2002 closed 6 months ago
因为 storaged client 需要从 meta 获取 host list,这个host list 在docker 部署情况下,是内部的域名,外部无法访问,可以把 python 跑在同一个容器网络哈
因为 storaged client 需要从 meta 获取 host list,这个host list 在docker 部署情况下,是内部的域名,外部无法访问,可以把 python 跑在同一个容器网络哈
我猜测也是这样
General Question
我的 nebula 是使用 docker-compose 部署的,我刚刚尝试了使用 python client 连接 nebula。需要事先声明的是,按照 https://www.siwei.io/nebula-python-storage-docker-guide/ 中在 docker 里开一个 Jupyter Notebook 的方法我成功执行了以下代码,但是在外部访问 docker 就会出现下列的错。
实际上我也尝试过了 Rust client https://github.com/vesoft-inc/nebula-rust/issues/18 ,这些问题在两个 client 上都出现让我怀疑是我访问的方式不对.
这个过程中出现了两个错误:
the metad servers's address
meta_cache = MetaCache([('192.168.1.156', 54923), ('192.168.1.156', 54970), ('192.168.1.156', 54926)], 50000)
option 1 metad usually discover the storage address automatically
graph_storage_client = GraphStorageClient(meta_cache)
socket error connecting to host metad1, port 9559 (None): gaierror(11001, 'getaddrinfo failed') Update meta data failed: Transport not open Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\site-packages\nebula3\mclient__init.py", line 305, in _load_all spaces = self._meta_client.list_spaces() File "C:\Program Files\Anaconda3\lib\site-packages\nebula3\mclient__init__.py", line 142, in list_spaces resp = self._connection.listSpaces(req) File "C:\Program Files\Anaconda3\lib\site-packages\nebula3\meta\MetaService.py", line 17615, in listSpaces self.send_listSpaces(req) File "C:\Program Files\Anaconda3\lib\site-packages\nebula3\meta\MetaService.py", line 17624, in send_listSpaces self._oprot.trans.flush() File "C:\Program Files\Anaconda3\lib\site-packages\nebula3\fbthrift\transport\TTransport.py", line 193, in flush self.trans.write(out) File "C:\Program Files\Anaconda3\lib\site-packages\nebula3\fbthrift\transport\TSocket.py", line 323, in write raise TTransportException(TTransportException.NOT_OPEN, nebula3.fbthrift.transport.TTransport.TTransportException: Transport not open
File C:\Program Files\Anaconda3\lib\site-packages\nebula3\sclient\GraphStorageClient.py:45, in GraphStorageClient.init(self, meta_cache, storage_addrs, time_out) 43 self._time_out = time_out 44 self._connections = [] ---> 45 self._create_connection()
File C:\Program Files\Anaconda3\lib\site-packages\nebula3\sclient\GraphStorageClient.py:84, in GraphStorageClient._create_connection(self) 82 self._storage_addrs = self._meta_cache.get_all_storage_addrs() 83 if len(self._storage_addrs) == 0: ---> 84 raise RuntimeError('Get storage address from meta cache is empty') 85 try: 86 for addr in self._storage_addrs:
RuntimeError: Get storage address from meta cache is empty
取而代之的是和我使用rust连接时一样的错:
下面是我的 docker 信息:
我的部署方式完全按照 https://docs.nebula-graph.io/3.6.0/2.quick-start/1.quick-start-workflow/ 这个进行,我想知道的是我的部署方式或者访问方式有什么问题吗?