$ docker-compose exec delos node scripts/init
Unable to connect to the database: ConnectionError [SequelizeConnectionError]: getaddrinfo EAI_AGAIN mysql
at /app/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:133:19
at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/app/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/app/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:464:21) {
parent: Error: getaddrinfo EAI_AGAIN mysql
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'mysql',
fatal: true
},
original: Error: getaddrinfo EAI_AGAIN mysql
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26) {
errno: -3001,
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'mysql',
fatal: true
}
}
(node:147) UnhandledPromiseRejectionWarning: SequelizeConnectionError: getaddrinfo EAI_AGAIN mysql
at /app/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:133:19
at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:725:18)
at _drainQueueStep (/app/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/app/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:464:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:147) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on
unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:147) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
期望结果
实际结果
截图
环境
是否是自建服务器?如果为自建,请提供操作系统版本
如果是前端错误,请提供浏览器版本
其它可能帮助我们排查问题的环境信息
附加信息
rap 2.2.3 版本
> docker --version
Docker version 20.10.11, build dea9396
> docker-compose --version
Docker Compose version v2.2.1
BUG描述 初始化mysql错误,mysql容器无法运行
复现步骤
期望结果
实际结果
截图
环境
附加信息 rap 2.2.3 版本