* 描述问题
就是使用docker环境配置了,本机以外的数据库然后发现,我使用Navicat 等工具连接是正常的,但是使用nocobase是连不上,我测试之间的网络是通
* 运行环境
- NocoBase 版本:1.9.0-alpha.2
- 数据库种类与版本: image: postgres:15
- 操作系统: Ubuntu Windows
-浏览器及版本
- 部署方式:docker-compose
- Docker 镜像版本:1.9.0-alpha.2
- NodeJS 版本:
如何重现
预期行为
截图
日志
root@lavm-ka9wkt4xbk:/xp/www/.com# docker-compose up -d
Creating network “startuptdcktzcom_nocobase” with driver “bridge”
Creating startuptdcktzcom_app_1 … done
root@lavm-ka9wkt4xbk:/xp/www/.com# docker logs --tail=100 -f nocobase_app_1
cat: /app/commit_hash.txt: No such file or directory
COMMIT_HASH:
copying…
yarn run v1.22.22
$ nocobase create-nginx-conf
Done in 0.43s.
yarn run v1.22.22
$ nocobase generate-instance-id
Generating InstanceID…
[Error: Get environment error: GenericFailure, GenericFailure, Get postgres configuration error: error connecting to server: Connection timed out (os error 110)] {
code: ‘GenericFailure’
}
Done in 130.38s.
nginx started
yarn run v1.22.22
$ nocobase start --quickstart
$ nocobase pkg download-pro
2025-07-17T22:44:08: PM2 log: Launching in no daemon mode
2025-07-17T22:44:08: PM2 log: App [index:0] starting in -fork mode-
2025-07-17T22:44:08: PM2 log: App [index:0] online
Gateway IPC Server running at /root/.nocobase/gateway.sock
Gateway HTTP Server running at http://0.0.0.0:13000/
{“level”:“info”,“message”:“add app main into supervisor”,“meta”:{},“module”:“application”,“submodule”:“supervisor”,“method”:“addApp”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:44:11”}
{“level”:“warn”,“message”:“attempt 1/9: Unable to connect to the database: connect ETIMEDOUT 124.xxx.xxx.xxx:5432”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:46:22”}
{“level”:“warn”,“message”:“will retry in 50ms…”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:46:22”}
{“level”:“warn”,“message”:“attempt 2/9: Unable to connect to the database: connect ETIMEDOUT 124.xxx.xxx.xxx:5432”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:48:33”}
{“level”:“warn”,“message”:“will retry in 100ms…”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:48:33”}
{“level”:“warn”,“message”:“attempt 3/9: Unable to connect to the database: connect ETIMEDOUT 124.xxx.xxx.xxx:5432”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:50:44”}
{“level”:“warn”,“message”:“will retry in 200ms…”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:50:44”}
{“level”:“warn”,“message”:“attempt 4/9: Unable to connect to the database: connect ETIMEDOUT 124.xxx.xxx.xxx:5432”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:52:55”}
{“level”:“warn”,“message”:“will retry in 400ms…”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:52:55”}
{“level”:“warn”,“message”:“attempt 5/9: Unable to connect to the database: connect ETIMEDOUT 124.xxx.xxx.xxx:5432”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:55:06”}
{“level”:“warn”,“message”:“will retry in 800ms…”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:55:06”}
{“level”:“warn”,“message”:“attempt 6/9: Unable to connect to the database: connect ETIMEDOUT 124.xxx.xxx.xxx:5432”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:57:17”}
{“level”:“warn”,“message”:“will retry in 1600ms…”,“meta”:{},“module”:“database”,“submodule”:“”,“method”:“auth”,“app”:“main”,“reqId”:“21507747-fd7d-4c15-9746-4ce74db1e42a”,“dataSourceKey”:“main”,“timestamp”:“2025-07-17 22:57:17”}
new client connected oNx7FdxQ8U7in9eq6QRen
client tags: app#main