投票系统报错 - Error performing query: error: relation "votes" does not exist
来源:6-5 部署一个复杂的投票应用
caijility_dev
2020-06-09
- 已经更新最新代码 - 慕课网下载区下载的
- 删除所有镜像后,docker-compose build 成功
- 运行 docker-compose up 报错 - “votes” does not exist
result 容器 报错log 信息:
docker logs example-voting-app_result-app_1
Tue, 09 Jun 2020 03:01:23 GMT body-parser deprecated bodyParser: use individual json/urlencoded middlewares at server.js:60:9
Tue, 09 Jun 2020 03:01:23 GMT body-parser deprecated undefined extended: provide extended option at ../node_modules/body-parser/index.js:105:29
App running on port 80
Failed to connect to db
Failed to connect to db
Failed to connect to db
Failed to connect to db
Connected to db
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Tue, 09 Jun 2020 03:02:56 GMT body-parser deprecated bodyParser: use individual json/urlencoded middlewares at server.js:60:9
Tue, 09 Jun 2020 03:02:56 GMT body-parser deprecated undefined extended: provide extended option at ../node_modules/body-parser/index.js:105:29
App running on port 80
Connected to db
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
Error performing query: error: relation "votes" does not exist
写回答
2回答
-
麦兜搞IT
2020-06-19
docker-compose ps 看看几个容器都起来了么,然后docker ps找到database的容器,docker log看一下数据库容器的log有没有什么报错信息呢?感觉是数据库问题。
如果您用的是最新代码,那就应该没问题,至少我这边本地刚测试过了,没有问题。
00 -
麦兜搞IT
2020-06-11
您说的”慕课网下载区下载的“是说的慕课网的git么https://git1.imooc.com/unknown 我先确认下您的代码是否最新。
012020-06-17
相似问题