在运行gcloud app deploy (我之前已经成功运行过它)之后,我现在无法正确启动我的Strapi服务器。如果我尝试访问/admin,我会得到一个500错误,如果我用gcloud app logs tail -s default监控日志,我会得到以下结果:
2020-11-10 15:16:52 default[20201110t151110] "GET /favicon.ico HTTP/1.1" 204
2020-11-10 15:25:47 default[20200930t185305] "GET /admin/settings/webhooks HTTP/1.1" 200
2020-11-10 15:25:47 default[20200930t185305] [2020-11-10T15:25:47.357Z] debug GET webhooks (6 ms) 200
2020-11-10 15:25:47 default[20200930t185305] "GET /admin/main.e0941b93.chunk.js HTTP/1.1" 200
2020-11-10 15:25:47 default[20200930t185305] "GET /admin/runtime~main.9c90e73e.js HTTP/1.1" 200
2020-11-10 15:25:47 default[20200930t185305] [2020-11-10T15:25:47.426Z] debug GET runtime~main.9c90e73e.js (6 ms) 200
2020-11-10 15:25:47 default[20200930t185305] [2020-11-10T15:25:47.449Z] debug GET main.e0941b93.chunk.js (12 ms) 200
2020-11-10 15:25:49 default[20200930t185305] "GET /users-permissions/init HTTP/1.1" 200
2020-11-10 15:25:49 default[20200930t185305] "GET /favicon.ico HTTP/1.1" 204
2020-11-10 15:25:49 default[20200930t185305] [2020-11-10T15:25:49.237Z] debug GET /users-permissions/init (204 ms) 200
2020-11-10 15:25:49 default[20200930t185305] "GET /admin/init HTTP/1.1" 200
2020-11-10 15:25:49 default[20200930t185305] [2020-11-10T15:25:49.288Z] debug GET /admin/init (3 ms) 200
2020-11-10 15:25:49 default[20200930t185305] "GET /content-manager/content-types HTTP/1.1" 200
2020-11-10 15:25:49 default[20200930t185305] [2020-11-10T15:25:49.369Z] debug GET /content-manager/content-types (23 ms) 200
2020-11-10 15:25:49 default[20200930t185305] "GET /content-manager/content-types HTTP/1.1" 200
2020-11-10 15:25:49 default[20200930t185305] [2020-11-10T15:25:49.432Z] debug GET /content-manager/content-types (25 ms) 200
2020-11-10 15:25:49 default[20200930t185305] "GET /admin/webhooks HTTP/1.1" 200
2020-11-10 15:25:49 default[20200930t185305] "GET /admin/cc1d824d8f006f0a47c72638f4ce0376.png HTTP/1.1" 200
2020-11-10 15:25:49 default[20200930t185305] "GET /admin/e631d2735799aa943d93d301abf423d2.ttf HTTP/1.1" 500
2020-11-10 15:25:49 default[20200930t185305] "GET /admin/57d69e1d4ce0cc10ace9264b4af92cf1.ttf HTTP/1.1" 500
2020-11-10 15:25:49 default[20200930t185305] "GET /admin/2d36b1a925432bae7f3c53a340868c6e.ttf HTTP/1.1" 500
2020-11-10 15:25:49 default[20200930t185305] "GET /admin/85d339d916479f729938d2911b85bf1f.ttf HTTP/1.1" 200
2020-11-10 15:25:49 default[20200930t185305] [2020-11-10T15:25:49.581Z] debug GET cc1d824d8f006f0a47c72638f4ce0376.png (6 ms) 200
2020-11-10 15:25:49 default[20200930t185305] [2020-11-10T15:25:49.612Z] debug GET /admin/webhooks (43 ms) 200
2020-11-10 15:25:49 default[20200930t185305] [2020-11-10T15:25:49.658Z] debug GET 85d339d916479f729938d2911b85bf1f.ttf (43 ms) 200
2020-11-10 15:25:49 default[20200930t185305] "GET /admin/55071ae1abc18726e23174192ebc0b68.woff2 HTTP/1.1" 200
2020-11-10 15:25:49 default[20200930t185305] [2020-11-10T15:25:49.743Z] debug GET 55071ae1abc18726e23174192ebc0b68.woff2 (10 ms) 200
2020-11-10 15:25:58 default[20200930t185305] [2020-11-10T15:25:58.401Z] debug ?? Server wasn't able to start properly.
2020-11-10 15:25:58 default[20200930t185305] [2020-11-10T15:25:58.402Z] debug ?? Server wasn't able to start properly.
2020-11-10 15:25:58 default[20200930t185305] [2020-11-10T15:25:58.404Z] error error: remaining connection slots are reserved for non-replication superuser connections
2020-11-10 15:25:58 default[20200930t185305] at Parser.parseErrorMessage (/workspace/node_modules/pg-protocol/dist/parser.js:278:15)
2020-11-10 15:25:58 default[20200930t185305] at Parser.handlePacket (/workspace/node_modules/pg-protocol/dist/parser.js:126:29)
2020-11-10 15:25:58 default[20200930t185305] at Parser.parse (/workspace/node_modules/pg-protocol/dist/parser.js:39:38)
2020-11-10 15:25:58 default[20200930t185305] at Socket.stream.on (/workspace/node_modules/pg-protocol/dist/index.js:8:42)
2020-11-10 15:25:58 default[20200930t185305] at Socket.emit (events.js:198:13)
2020-11-10 15:25:58 default[20200930t185305] [2020-11-10T15:25:58.406Z] error error: remaining connection slots are reserved for non-replication superuser connections
2020-11-10 15:25:58 default[20200930t185305] at Parser.parseErrorMessage (/workspace/node_modules/pg-protocol/dist/parser.js:278:15)
2020-11-10 15:25:58 default[20200930t185305] at Parser.handlePacket (/workspace/node_modules/pg-protocol/dist/parser.js:126:29)
2020-11-10 15:25:58 default[20200930t185305] at Parser.parse (/workspace/node_modules/pg-protocol/dist/parser.js:39:38)
2020-11-10 15:25:58 default[20200930t185305] at Socket.stream.on (/workspace/node_modules/pg-protocol/dist/index.js:8:42)
2020-11-10 15:25:58 default[20200930t185305] at Socket.emit (events.js:198:13)
2020-11-10 15:25:58 default[20200930t185305] at addChunk (_stream_readable.js:288:12)
2020-11-10 15:25:58 default[20200930t185305] at readableAddChunk (_stream_readable.js:269:11)
2020-11-10 15:25:58 default[20200930t185305] at Socket.Readable.push (_stream_readable.js:224:10)
2020-11-10 15:25:58 default[20200930t185305] at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2020-11-10 15:25:58 default[20200930t185305] [2020-11-10T15:25:58.418Z] debug ?? Server wasn't able to start properly.
2020-11-10 15:25:58 default[20200930t185305] [2020-11-10T15:25:58.420Z] error error: sorry, too many clients already :: proc.c:364
2020-11-10 15:25:58 default[20200930t185305] at Parser.parseErrorMessage (/workspace/node_modules/pg-protocol/dist/parser.js:278:15)
2020-11-10 15:25:58 default[20200930t185305] at Parser.handlePacket (/workspace/node_modules/pg-protocol/dist/parser.js:126:29)
2020-11-10 15:25:58 default[20200930t185305] at Parser.parse (/workspace/node_modules/pg-protocol/dist/parser.js:39:38)
2020-11-10 15:25:58 default[20200930t185305] at Socket.stream.on (/workspace/node_modules/pg-protocol/dist/index.js:8:42)
2020-11-10 15:25:58 default[20200930t185305] at Socket.emit (events.js:198:13)
2020-11-10 15:25:58 default[20200930t185305] at addChunk (_stream_readable.js:288:12)
2020-11-10 15:25:58 default[20200930t185305] at readableAddChunk (_stream_readable.js:269:11)
2020-11-10 15:25:58 default[20200930t185305] at Socket.Readable.push (_stream_readable.js:224:10)
2020-11-10 15:25:58 default[20200930t185305] at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2020-11-10 15:39:29 default[20201110t153157] "GET /admin/settings/webhooks HTTP/1.1" 500
2020-11-10 15:39:33 default[20201110t153157] Error while running command start: EROFS: read-only file system, open '/workspace/.strapi-updater.json.1249708791'
2020-11-10 15:39:34 default[20201110t153157] "GET /favicon.ico HTTP/1.1" 204
2020-11-10 15:43:34 default[20200930t185305] "GET /admin/settings/webhooks HTTP/1.1" 200
2020-11-10 15:43:41 default[20200930t185305]
2020-11-10 15:43:41 default[20200930t185305] Project information
2020-11-10 15:43:41 default[20200930t185305]
2020-11-10 15:43:41 default[20200930t185305] ?????????????????????????????????????????????????????????????????????????
2020-11-10 15:43:41 default[20200930t185305] ? Time ? Tue Nov 10 2020 15:43:41 GMT+0000 (Coordinated ? ?
2020-11-10 15:43:41 default[20200930t185305] ? Launched in ? 4366 ms ?
2020-11-10 15:43:41 default[20200930t185305] ? Environment ? production ?
2020-11-10 15:43:41 default[20200930t185305] ? Process PID ? 10 ?
2020-11-10 15:43:41 default[20200930t185305] ? Version ? 3.0.1 (node v10.22.1) ?
2020-11-10 15:43:41 default[20200930t185305] ?????????????????????????????????????????????????????????????????????????
2020-11-10 15:43:41 default[20200930t185305]
2020-11-10 15:43:41 default[20200930t185305] Actions available
2020-11-10 15:43:41 default[20200930t185305]
2020-11-10 15:43:41 default[20200930t185305] Welcome back!
2020-11-10 15:43:41 default[20200930t185305] To manage your project ?, go to the administration panel at:
2020-11-10 15:43:41 default[20200930t185305] http://0.0.0.0:8081/admin
2020-11-10 15:43:41 default[20200930t185305]
2020-11-10 15:43:41 default[20200930t185305] To access the server ??, go to:
2020-11-10 15:43:41 default[20200930t185305] http://0.0.0.0:8081
2020-11-10 15:43:41 default[20200930t185305]
2020-11-10 15:43:41 default[20200930t185305] [2020-11-10T15:43:41.906Z] debug GET webhooks (73 ms) 200
2020-11-10 15:43:42 default[20200930t185305] "GET /admin/main.e0941b93.chunk.js HTTP/1.1" 200
2020-11-10 15:43:42 default[20200930t185305] "GET /admin/runtime~main.9c90e73e.js HTTP/1.1" 500
2020-11-10 15:43:42 default[20200930t185305] [2020-11-10T15:43:42.048Z] debug GET main.e0941b93.chunk.js (7 ms) 200
2020-11-10 15:43:48 default[20200930t185305] [2020-11-10T15:43:48.275Z] debug ?? Server wasn't able to start properly.
2020-11-10 15:43:48 default[20200930t185305] [2020-11-10T15:43:48.277Z] error error: remaining connection slots are reserved for non-replication superuser connections
2020-11-10 15:43:48 default[20200930t185305] at Parser.parseErrorMessage (/workspace/node_modules/pg-protocol/dist/parser.js:278:15)
2020-11-10 15:43:48 default[20200930t185305] at Parser.handlePacket (/workspace/node_modules/pg-protocol/dist/parser.js:126:29)
2020-11-10 15:43:48 default[20200930t185305] at Parser.parse (/workspace/node_modules/pg-protocol/dist/parser.js:39:38)
2020-11-10 15:43:48 default[20200930t185305] at Socket.stream.on (/workspace/node_modules/pg-protocol/dist/index.js:8:42)
2020-11-10 15:43:48 default[20200930t185305] at Socket.emit (events.js:198:13)
2020-11-10 15:43:48 default[20200930t185305] at addChunk (_stream_readable.js:288:12)
2020-11-10 15:43:48 default[20200930t185305] at readableAddChunk (_stream_readable.js:269:11)
2020-11-10 15:43:48 default[20200930t185305] at Socket.Readable.push (_stream_readable.js:224:10)
2020-11-10 15:43:48 default[20200930t185305] at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
2020-11-10 15:43:48 default[20200930t185305] "GET /favicon.ico HTTP/1.1" 204
2020-11-10 15:48:31 default[20201110t154254] "POST /auth/local/register HTTP/1.1" 500
2020-11-10 15:48:37 default[20201110t154254] Error while running command start: EROFS: read-only file system, open '/workspace/.strapi-updater.json.2714151597'
2020-11-10 15:48:41 default[20201110t154254] "GET /admin/ HTTP/1.1" 500我可以看到一些提到的“连接槽”,但在检查我的SQL服务器状态时,我可以看到没有太多连接-这毕竟是一个测试服务器。
我还可以看到'EROFS: read-only file system‘错误,这表明Strapi正在尝试写入磁盘。然而,我不明白为什么自从我上次部署后,这种情况就会改变。我甚至尝试回滚到上一个版本(工作正常)并部署那个版本,但仍然没有成功!
如有任何帮助,我们将不胜感激,谢谢!
发布于 2020-11-11 00:25:08
像往常一样,我先解决自己的问题,然后其他人才能回答:)
我按照这里的说明降级到了Strapi v3.2.4:https://strapi.io/documentation/v3.x/guides/update-version.html#upgrade-your-dependencies
在执行完所有这些步骤并再次运行gcloud app deploy之后,一切都正常了!
https://stackoverflow.com/questions/64772407
复制相似问题