将 mern 应用程序部署到 heroku,构建成功但显示应用程序错误。查看 heroku 日志

时间:2021-06-26 05:40:05

标签: heroku

我在 heroku 中部署了 mern 应用程序并且构建成功但显示应用程序错误,请检查您的日志以获取详细信息。它在我的本地机器上工作,但奇怪的是它使我的数据的顺序与部署构建之前的顺序不同。它在 heroku logs --tail 中说 MongoDB 连接失败,状态从开始变为崩溃。 以下是使用 heroku logs --tail 的错误

$ heroku logs --tail
2021-06-25T14:48:19.832972+00:00 app[web.1]: 
2021-06-25T14:48:19.832991+00:00 app[web.1]: > mern-shop-v1@1.0.0 start        
2021-06-25T14:48:19.832992+00:00 app[web.1]: > node server.js
2021-06-25T14:48:19.832992+00:00 app[web.1]:
2021-06-25T14:48:20.476180+00:00 app[web.1]: Server running on port 45389      
2021-06-25T14:48:20.477305+00:00 app[web.1]: MongoDB connection FAIL
2021-06-25T14:48:20.557653+00:00 heroku[web.1]: Process exited with status 1   
2021-06-25T14:48:20.903603+00:00 heroku[web.1]: State changed from starting to 
crashed
2021-06-25T14:48:31.694887+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mern-shop-v1-justjd04.herokuapp.com request_id=26c6f6cf-0c3b-4194-bc4f-49b92f1f29ca fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:48:32.396113+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mern-shop-v1-justjd04.herokuapp.com 
request_id=3ddf718c-2906-4890-a77c-36b61b0a2a98 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:48:41.437205+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mern-shop-v1-justjd04.herokuapp.com request_id=a41a1ef4-a12e-4c72-a6f3-1f48fce5ea3d fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:48:42.042823+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mern-shop-v1-justjd04.herokuapp.com 
request_id=5255fece-5242-4eb1-bb60-4fa4b9d278a2 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:50:03.028850+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mern-shop-v1-justjd04.herokuapp.com request_id=2c6e0a4d-2c1a-4e03-a890-81ac12a280e7 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:50:03.377842+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mern-shop-v1-justjd04.herokuapp.com 
request_id=060117e5-c901-40df-8b06-6043fbc749ff fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:51:29.339525+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mern-shop-v1-justjd04.herokuapp.com request_id=46852734-33ed-44fc-bf56-8a6ebc7811f3 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:51:29.716341+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mern-shop-v1-justjd04.herokuapp.com 
request_id=3c49e69e-e107-4326-974f-6bf601a88148 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:54:43.000000+00:00 app[api]: Build started by user janreydohinog@gmail.com
2021-06-25T14:54:46.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/69ba082d-142e-44ed-9ed7-ccd71ddc4b74/activity/builds/df3803e3-1e88-4c02-ae33-917fd5440f70
2021-06-25T14:55:46.370581+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mern-shop-v1-justjd04.herokuapp.com request_id=ecc4f74c-7712-4e4c-8853-e03ff7bd78e3 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:55:46.825556+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mern-shop-v1-justjd04.herokuapp.com 
request_id=544762e8-6bbb-4619-9d20-1f910a88b626 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:55:48.784853+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mern-shop-v1-justjd04.herokuapp.com request_id=fa2ce19e-1d7d-48aa-8ee1-47a06d3a43b8 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:55:49.355599+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mern-shop-v1-justjd04.herokuapp.com 
request_id=7967e838-fa9d-4868-b436-8c465d049a9f fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T14:56:49.000000+00:00 app[api]: Build started by user janreydohinog@gmail.com
2021-06-25T14:58:47.313161+00:00 app[api]: Deploy 6b9f4976 by user janreydohinog@gmail.com
2021-06-25T14:58:47.313161+00:00 app[api]: Release v4 created by user janreydohinog@gmail.com
2021-06-25T14:58:47.680921+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-25T14:58:48.000000+00:00 app[api]: Build succeeded
2021-06-25T14:58:59.195528+00:00 heroku[web.1]: Starting process with command `npm start`
2021-06-25T14:59:02.178736+00:00 app[web.1]:
2021-06-25T14:59:02.178767+00:00 app[web.1]: > mern-shop-v1@1.0.0 start        
2021-06-25T14:59:02.178767+00:00 app[web.1]: > node server.js
2021-06-25T14:59:02.178768+00:00 app[web.1]:
2021-06-25T14:59:03.051126+00:00 app[web.1]: Server running on port 9910       
2021-06-25T14:59:03.052293+00:00 app[web.1]: MongoDB connection FAIL
2021-06-25T14:59:03.136509+00:00 heroku[web.1]: Process exited with status 1   
2021-06-25T14:59:03.239245+00:00 heroku[web.1]: State changed from starting to 
crashed
2021-06-25T15:12:54.253722+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-25T15:13:08.105938+00:00 heroku[web.1]: Starting process with command `npm start`
2021-06-25T15:13:12.222543+00:00 app[web.1]:
2021-06-25T15:13:12.222594+00:00 app[web.1]: > mern-shop-v1@1.0.0 start        
2021-06-25T15:13:12.222595+00:00 app[web.1]: > node server.js
2021-06-25T15:13:12.222595+00:00 app[web.1]:
2021-06-25T15:13:14.006014+00:00 app[web.1]: Server running on port 14296      
2021-06-25T15:13:14.007413+00:00 app[web.1]: MongoDB connection FAIL
2021-06-25T15:13:14.119570+00:00 heroku[web.1]: Process exited with status 1   
2021-06-25T15:13:14.189091+00:00 heroku[web.1]: State changed from starting to 
crashed
2021-06-25T16:00:55.745693+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-25T16:01:09.920078+00:00 heroku[web.1]: Starting process with command `npm start`
2021-06-25T16:01:14.641645+00:00 app[web.1]:
2021-06-25T16:01:14.641663+00:00 app[web.1]: > mern-shop-v1@1.0.0 start        
2021-06-25T16:01:14.641663+00:00 app[web.1]: > node server.js
2021-06-25T16:01:14.641663+00:00 app[web.1]:
2021-06-25T16:01:15.788089+00:00 app[web.1]: Server running on port 14182      
2021-06-25T16:01:15.789719+00:00 app[web.1]: MongoDB connection FAIL
2021-06-25T16:01:15.887283+00:00 heroku[web.1]: Process exited with status 1   
2021-06-25T16:01:15.972141+00:00 heroku[web.1]: State changed from starting to 
crashed
2021-06-25T16:27:12.502697+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mern-shop-v1-justjd04.herokuapp.com request_id=5d36bc7e-cd8a-4e44-ba0d-eba2615fc313 fwd="122.2.175.246" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T16:27:12.893092+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mern-shop-v1-justjd04.herokuapp.com 
request_id=9de8cec6-129a-4273-8b08-50ff38621157 fwd="122.2.175.246" dyno= connect= service= status=503 bytes= protocol=https
2021-06-25T17:00:25.531233+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-25T17:00:39.695782+00:00 heroku[web.1]: Starting process with command `npm start`
2021-06-25T17:00:48.158294+00:00 app[web.1]:
2021-06-25T17:00:48.158328+00:00 app[web.1]: > mern-shop-v1@1.0.0 start        
2021-06-25T17:00:48.158328+00:00 app[web.1]: > node server.js
2021-06-25T17:00:48.158328+00:00 app[web.1]:
2021-06-25T17:00:49.811482+00:00 app[web.1]: Server running on port 18384      
2021-06-25T17:00:49.812786+00:00 app[web.1]: MongoDB connection FAIL
2021-06-25T17:00:49.951213+00:00 heroku[web.1]: Process exited with status 1   
2021-06-25T17:00:50.035558+00:00 heroku[web.1]: State changed from starting to 
crashed
2021-06-25T18:30:36.531864+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-25T18:30:49.904442+00:00 heroku[web.1]: Starting process with command `npm start`
2021-06-25T18:30:53.402758+00:00 app[web.1]:
2021-06-25T18:30:53.402778+00:00 app[web.1]: > mern-shop-v1@1.0.0 start        
2021-06-25T18:30:53.402778+00:00 app[web.1]: > node server.js
2021-06-25T18:30:53.402778+00:00 app[web.1]:
2021-06-25T18:30:54.299011+00:00 app[web.1]: Server running on port 6423       
2021-06-25T18:30:54.300405+00:00 app[web.1]: MongoDB connection FAIL
2021-06-25T18:30:54.425731+00:00 heroku[web.1]: Process exited with status 1   
2021-06-25T18:30:54.506121+00:00 heroku[web.1]: State changed from starting to 
crashed
2021-06-25T21:27:33.166300+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-25T21:27:47.414003+00:00 heroku[web.1]: Starting process with command `npm start`
2021-06-25T21:27:50.811579+00:00 app[web.1]:
2021-06-25T21:27:50.811622+00:00 app[web.1]: > mern-shop-v1@1.0.0 start
2021-06-25T21:27:50.811623+00:00 app[web.1]: > node server.js
2021-06-25T21:27:50.811623+00:00 app[web.1]:
2021-06-25T21:27:51.380313+00:00 app[web.1]: Server running on port 34391      
2021-06-25T21:27:51.381119+00:00 app[web.1]: MongoDB connection FAIL
2021-06-25T21:27:51.452709+00:00 heroku[web.1]: Process exited with status 1   
2021-06-25T21:27:51.528638+00:00 heroku[web.1]: State changed from starting to 
crashed
2021-06-26T03:14:20.793968+00:00 heroku[web.1]: State changed from crashed to starting
2021-06-26T03:14:31.940919+00:00 heroku[web.1]: Starting process with command `npm start`
2021-06-26T03:14:35.085179+00:00 app[web.1]:
2021-06-26T03:14:35.085195+00:00 app[web.1]: > mern-shop-v1@1.0.0 start        
2021-06-26T03:14:35.085196+00:00 app[web.1]: > node server.js
2021-06-26T03:14:35.085196+00:00 app[web.1]:
2021-06-26T03:14:35.842726+00:00 app[web.1]: Server running on port 48838      
2021-06-26T03:14:35.843737+00:00 app[web.1]: MongoDB connection FAIL
2021-06-26T03:14:35.923537+00:00 heroku[web.1]: Process exited with status 1   
2021-06-26T03:14:36.088669+00:00 heroku[web.1]: State changed from starting to 
crashed
2021-06-26T05:21:39.583702+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mern-shop-v1-justjd04.herokuapp.com request_id=9d503ed1-02fa-4286-af0d-b951574e11be fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https
2021-06-26T05:21:40.107755+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mern-shop-v1-justjd04.herokuapp.com 
request_id=3f348eca-1985-44d4-b23d-5d9d1574a240 fwd="175.176.68.215" dyno= connect= service= status=503 bytes= protocol=https

0 个答案:

没有答案