使用StorageClient scanVertex报错Execute failed: no parts succeed, error message: Pool not open

docker配置

version: '3.4'
services:
  metad0:
    image: vesoft/nebula-metad:v3.2.0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559
      - --local_ip=metad0
      - --ws_ip=metad0
      - --port=9559
      - --ws_http_port=19559
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://metad0:19559/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - "9559:9559"
      - 19559
      - 19560
    volumes:
      - ./data/meta0:/data/meta
      - ./logs/meta0:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  storaged0:
    image: vesoft/nebula-storaged:v3.2.0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559
      - --local_ip=storaged0
      - --ws_ip=storaged0
      - --port=9779
      - --ws_http_port=19779
      - --data_path=/data/storage
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    depends_on:
      - metad0
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://storaged0:19779/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - "9779:9779"
      - 19779
      - 19780
    volumes:
      - ./data/storage0:/data/storage
      - ./logs/storage0:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  graphd:
    image: vesoft/nebula-graphd:v3.2.0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559
      - --port=9669
      - --local_ip=graphd
      - --ws_ip=graphd
      - --ws_http_port=19669
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    depends_on:
      - storaged0
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://graphd:19669/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - "9669:9669"
      - 19669
      - 19670
    volumes:
      - ./logs/graph:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE
  
  console:
    image: vesoft/nebula-console:v3.0.0
    entrypoint: ""
    command: 
      - sh
      - -c
      - |
        sleep 3 &&
        nebula-console -addr graphd -port 9669 -u root -p nebula -e 'ADD HOSTS "storaged0":9779 &&
        sleep 36000
    depends_on:
      - graphd
    networks:
      - nebula-net

networks:
  nebula-net:

错误信息如下

2022-11-24 19:42:24.137 [ERROR] [] pool-13-thread-1 ScanVertexResultIterator - get storage client error, 
java.lang.IllegalStateException: Pool not open
	at org.apache.commons.pool2.impl.BaseGenericObjectPool.assertOpen(BaseGenericObjectPool.java:759) ~[commons-pool2-2.7.0.jar:2.7.0]
	at org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:325) ~[commons-pool2-2.7.0.jar:2.7.0]
	at org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:265) ~[commons-pool2-2.7.0.jar:2.7.0]
	at com.vesoft.nebula.client.storage.StorageConnPool.getStorageConnection(StorageConnPool.java:43) ~[client-3.3.0.jar:?]
	at com.vesoft.nebula.client.storage.scan.ScanVertexResultIterator.lambda$next$0(ScanVertexResultIterator.java:88) ~[client-3.3.0.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
2022-11-24 19:42:24.138 [ERROR] [0E97F5BD077B0D3A8702E02AE264C680] http-nio-9670-exec-4 NebulaDaoImpl - scan vertex error.
com.vesoft.nebula.client.meta.exception.ExecuteFailedException: Execute failed: no parts succeed, error message: Pool not open
	at com.vesoft.nebula.client.storage.scan.ScanResultIterator.throwExceptions(ScanResultIterator.java:100) ~[client-3.3.0.jar:?]
	at com.vesoft.nebula.client.storage.scan.ScanVertexResultIterator.next(ScanVertexResultIterator.java:152) ~[client-3.3.0.jar:?]

Nebula各项服务中的addrs 配置我也改成宿主机的ip了,改完我没有重新新建space,难道跟这个有关?

你是docker安装的服务? 你的storaged 的host不是可访问的ip,是storaged0. 这个storaged0:9779的服务地址是客户端无法访问的

嗯,这个storaged的host在哪里配置成可访问的ip呢? 是把host删了,使用ADD HOSTS 192.168.10.100:9779命令重新添加一遍就行了吗?

还有个问题请教下大佬,我用SessionPool,前几天测试晚上程序一直开着,第二天接着请求执行nGQL没有问题,今天早上突然又报错“connect reset”了,我看了下我服务器的磁盘占用超过95%了,是不是磁盘占用过高,导致nebula服务不稳定了?

这个你在配置文件里面要改storaged地址,不要用storaged0, 配置成外部可访问的地址。Add host 添加一下。

你清一下磁盘吧,磁盘占满了 storage可能会不可用

参考 本地 NebulaGraph 上做 spark, java, python 应用开发推荐实践

配置一下 docker host 上的 /etc/hosts 让域名可以被解析