服务端镜像启动报错-无法加载 duckdb extension httpfs
mdllly opened this issue · 4 comments
在离线环境下运行服务端镜像,报错如下:
init logger, level: INFO, format: json
all_in_one-csghub_server-1 | {"time":"2024-04-27T06:49:16.456842199Z","level":"INFO","msg":"FIFOScheduler run started"}
all_in_one-csghub_server-1 | {"time":"2024-04-27T06:49:16.457924209Z","level":"ERROR","msg":"refresh status all failed","error":"Get "http://localhost:8082/status-all\": dial tcp [::1]:8082: connect: connection refused"}
all_in_one-csghub_server-1 | Error: failed to init router: error creating dataset viewer handler:failed to create parquet reader,cause:failed to setup s3 for duckdb, cause:IO Error: Failed to download extension "httpfs" at URL "http://extensions.duckdb.org/v0.9.2/linux_amd64/httpfs.duckdb_extension.gz"
能否解决上述问题后,更新下镜像,谢谢!
all_in_one-csghub_server-1 | Error: failed to init router: error creating dataset viewer handler:failed to create parquet reader,cause:failed to setup s3 for duckdb, cause:IO Error: Failed to download extension "httpfs" at URL "http://extensions.duckdb.org/v0.9.2/linux_amd64/httpfs.duckdb_extension.gz"
这个错误是因为在离线环境下无法下载 duckdb 的一个扩展包,可以通过手动下载到宿主机,然后 mount 到容器中。请参考以下步骤:
- 宿主机创建文件夹:
~/.duckdb/extensions/v0.9.2/linux_amd64
mkdir -p ~/.duckdb/extensions/v0.9.2/linux_amd64
- 从错误信息中的链接下载 扩展包,并解压到步骤1创建的文件夹中
.duckdb/
└── extensions
└── v0.9.2
└── linux_amd64
└── httpfs.duckdb_extension
- 修改docker-compose 配置文件中
csghub_server
的配置,将宿主机文件夹~/.duckdb/extensions
mount 到容器中。修改的配置文件如下:
csghub_server:
image: opencsg/csghub-server:latest
...
networks:
- opencsg
volumes:
- ~/.duckdb/extensions:/root/.duckdb/extensions
fixed in v0.7