blog-service icon indicating copy to clipboard operation
blog-service copied to clipboard

这是什么错误, 没连上数据库吗?

Open sekihoshi opened this issue 5 years ago • 4 comments

[email protected] dev F:\project\vue\blog-service-nest

cross-env NODE_ENV=dev nodemon --exec 'ts-node' ./src/main.ts

[nodemon] 1.18.4 [nodemon] to restart at any time, enter rs [nodemon] watching: F:\project\vue\blog-service-nest\src/**/* [nodemon] starting ts-node ./src/main.ts [2018-10-18T10:13:19.721] [INFO] BLOG_SERVICE: APP - Starting Nest application... [2018-10-18T10:13:20.138] [INFO] BLOG_SERVICE: APP - AppModule dependencies initialized [2018-10-18T10:13:20.139] [INFO] BLOG_SERVICE: APP - MongooseModule dependencies initialized [2018-10-18T10:13:20.139] [INFO] BLOG_SERVICE: APP - HttpModule dependencies initialized [2018-10-18T10:13:20.140] [INFO] BLOG_SERVICE: APP - CacheModule dependencies initialized (node:11008) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect. [Nest] 11008 - 2018-10-18 10:13:20 [MongooseModule] Unable to connect to the database. Retrying (1)... [Nest] 11008 - 2018-10-18 10:13:23 [MongooseModule] Unable to connect to the database. Retrying (2)... +3019ms [Nest] 11008 - 2018-10-18 10:13:26 [MongooseModule] Unable to connect to the database. Retrying (3)... +3011ms [Nest] 11008 - 2018-10-18 10:13:29 [MongooseModule] Unable to connect to the database. Retrying (4)... +3011ms [Nest] 11008 - 2018-10-18 10:13:32 [MongooseModule] Unable to connect to the database. Retrying (5)... +3011ms [Nest] 11008 - 2018-10-18 10:13:35 [MongooseModule] Unable to connect to the database. Retrying (6)... +3009ms [Nest] 11008 - 2018-10-18 10:13:38 [MongooseModule] Unable to connect to the database. Retrying (7)... +3011ms [Nest] 11008 - 2018-10-18 10:13:41 [MongooseModule] Unable to connect to the database. Retrying (8)... +3011ms [Nest] 11008 - 2018-10-18 10:13:44 [MongooseModule] Unable to connect to the database. Retrying (9)... +3016ms [2018-10-18T10:13:44.596] [ERROR] BLOG_SERVICE: APP - Authentication failed. 1: std::vector<v8::CpuProfileDeoptFrame,std::allocatorv8::CpuProfileDeoptFrame >::vector<v8::CpuProfileDeoptFrame,std::allocatorv8::CpuProfileDeoptFrame > 2: v8::internal::CompilerDispatcherTracer::Estimate 3: v8::internal::CompilerDispatcher::RemoveJob 4: v8::internal::CompilerDispatcher::RemoveJob 5: v8::internal::CompilerDispatcher::RemoveJob 6: 000002E9DDC047A1 [nodemon] app crashed - waiting for file changes before starting...

sekihoshi avatar Oct 18 '18 02:10 sekihoshi

嗯,没连上 db,你可以使用 docker 来启动 db

jkchao avatar Oct 18 '18 04:10 jkchao

嗯,没连上 db,你可以使用 docker 来启动 db

确认下“使用 docker 来启动 db”是docker-compose -f docker-compose.dev.yml up -d这样操作 对么?

nest分支启动 出现了同样的报错

image 使用 Robo 3T 连接时成功的

guchongxi avatar May 21 '19 13:05 guchongxi

image 排查下来发现是 .env.development 配置问题,初始化 db 时并没有设置用户,删除就好了

guchongxi avatar May 21 '19 14:05 guchongxi

我应该是忘记把初始化用户的脚本传上去了…

jkchao avatar May 21 '19 14:05 jkchao