UPDATE - If stop and start ghost using ghost run it works.Using it with ghost start causes the same error
I am on Ghost Version 2.37.0 hosted on a Digital Ocean droplet
I’m not sure when the problem started occurring but whenever I try to upload an image I get the following error on the admin
And below is the latest log file contents. I was on Version 2.36.0 when this log was generated. So I upgraded to 2.37.0 but there was no new log generated. So posting whatever was the last one generated
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:24384,“level”:50,“req”:{“meta”:{“requestId”:“abdac19a-b22f-41cd-a5bc-06221382719b”,“userId”:null},“url”:“/images/upload/”,“method”:“POST”,“originalUrl”:“/ghost/api/canary/admin/images/upload/”,“params”:{},“headers”:{“x-forwarded-for”:“45.114.62.79”,“x-forwarded-proto”:“https”,“x-real-ip”:“45.114.62.79”,“host”:“shantesh.com”,“connection”:“close”,“content-length”:“2255132”,“origin”:“https://shantesh.com”,“app-pragma”:“no-cache”,“user-agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3936.0 Safari/537.36 Edg/79.0.301.2”,“content-type”:“multipart/form-data; boundary=----WebKitFormBoundaryAkF6b5gmeIf8BuSF”,“accept”:“text/plain, /; q=0.01”,“x-requested-with”:“XMLHttpRequest”,“x-ghost-version”:“2.36”,“sec-fetch-site”:“same-origin”,“sec-fetch-mode”:“cors”,“referer”:“Ghost Admin, deflate, br”,“accept-language”:“en-US,en;q=0.9”,“cookie”:“REDACTED”},“query”:{}},“res”:{“_headers”:{“x-powered-by”:“Express”,“cache-control”:“no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0”,“content-type”:“application/json; charset=utf-8”,“content-length”:“220”,“etag”:“W/"dc-PlmTrAe72Ucl4SaFuUMnM4aBAqI"”,“vary”:“Accept-Encoding”},“statusCode”:503,“responseTime”:“15ms”},“err”:{“id”:“c250e680-f2f2-11e9-87ec-9f1a6be4e0c0”,“domain”:“https://shantesh.com”,“code”:null,“name”:“MaintenanceError”,“statusCode”:503,“level”:“normal”,“message”:“Site is starting up, please wait a moment then retry.”,“stack”:“MaintenanceError: Site is starting up, please wait a moment then retry.\n at new MaintenanceError (/var/www/ghost/versions/2.36.0/node_modules/ghost-ignition/lib/errors/index.js:142:23)\n at maintenance (/var/www/ghost/versions/2.36.0/core/server/web/shared/middlewares/maintenance.js:13:21)\n at Layer.handle [as handle_request] (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/layer.js:95:5)\n at trim_prefix (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:317:13)\n at /var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:284:7\n at Function.process_params (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:335:12)\n at next (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:275:10)\n at /var/www/ghost/versions/2.36.0/node_modules/express-query-boolean/index.js:6:5\n at Layer.handle [as handle_request] (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/layer.js:95:5)\n at trim_prefix (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:317:13)\n at /var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:284:7\n at Function.process_params (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:335:12)\n at next (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:275:10)\n at urlencodedParser (/var/www/ghost/versions/2.36.0/node_modules/body-parser/lib/types/urlencoded.js:100:7)\n at Layer.handle [as handle_request] (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/layer.js:95:5)\n at trim_prefix (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:317:13)\n at /var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:284:7\n at Function.process_params (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:335:12)\n at next (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:275:10)\n at jsonParser (/var/www/ghost/versions/2.36.0/node_modules/body-parser/lib/types/json.js:119:7)\n at Layer.handle [as handle_request] (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/layer.js:95:5)\n at trim_prefix (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/index.js:317:13)”},“msg”:“Site is starting up, please wait a moment then retry.”,“time”:“2019-10-20T04:33:26.776Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:24384,“level”:50,“req”:{“meta”:{“requestId”:“e2715545-002d-4667-850b-8b1a878f9d0c”,“userId”:null},“url”:“/users/me/?include=roles”,“method”:“GET”,“originalUrl”:“/ghost/api/canary/admin/users/me/?include=roles”,“params”:{},“headers”:{“x-forwarded-for”:“45.114.62.79”,“x-forwarded-proto”:“https”,“x-real-ip”:“45.114.62.79”,“host”:“shantesh.com”,“connection”:“close”,“accept”:“application/json, text/javascript, /; q=0.01”,“x-requested-with”:“XMLHttpRequest”,“x-ghost-version”:“2.36”,“app-pragma”:“no-cache”,“user-agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3936.0 Safari/537.36 Edg/79.0.301.2”,“content-type”:“application/json; charset=UTF-8”,“sec-fetch-site”:“same-origin”,“sec-fetch-mode”:“cors”,“referer”:“Ghost Admin, deflate, br”,“accept-language”:“en-US,en;q=0.9”,“cookie”:“REDACTED”},“query”:{“include”:“roles”}},“res”:{“_headers”:{“x-powered-by”:“Express”,“cache-control”:“no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0”,“content-type”:“application/json; charset=utf-8”,“content-length”:“321”,“etag”:“W/"141-7Mi9ktlhVbqxKII0y0w48QDu7VM"”,“vary”:“Accept-Encoding”},“statusCode”:403,“responseTime”:“14ms”},“err”:{“id”:“25852bd0-f2f3-11e9-87ec-9f1a6be4e0c0”,“domain”:“https://shantesh.com”,“code”:null,“name”:“NoPermissionError”,“statusCode”:403,“level”:“normal”,“message”:“Authorization failed”,“context”:“"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication."”,“stack”:“NoPermissionError: Authorization failed\n at new NoPermissionError (/var/www/ghost/versions/2.36.0/node_modules/ghost-ignition/lib/errors/index.js:114:23)\n at authorizeAdminApi (/var/www/ghost/versions/2.36.0/core/server/services/auth/authorize.js:76:25)\n at Layer.handle [as handle_request] (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/layer.js:95:5)\n at next (/var/www/ghost/versions/2.36.0/node_modules/express/lib/router/route.js:137:13)\n at /var/www/ghost/versions/2.36.0/core/server/services/auth/session/middleware.js:119:20\n at /var/www/ghost/versions/2.36.0/node_modules/express-session/index.js:495:7\n at Child.SessionModel.findOne.then (/var/www/ghost/versions/2.36.0/core/server/services/auth/session/store.js:24:28)\n at Child.tryCatcher (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/util.js:16:23)\n at Promise._settlePromiseFromHandler (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/promise.js:547:31)\n at Promise._settlePromise (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/promise.js:604:18)\n at Promise._settlePromise0 (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/promise.js:649:10)\n at Promise._settlePromises (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/promise.js:729:18)\n at _drainQueueStep (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/async.js:93:12)\n at _drainQueue (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/async.js:86:9)\n at Async._drainQueues (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/async.js:102:5)\n at Immediate.Async.drainQueues [as _onImmediate] (/var/www/ghost/versions/2.36.0/node_modules/bluebird/js/release/async.js:15:14)\n at runCallback (timers.js:794:20)\n at tryOnImmediate (timers.js:752:5)\n at processImmediate [as _immediateCallback] (timers.js:729:5)”},“msg”:“Authorization failed”,“time”:“2019-10-20T04:36:13.205Z”,“v”:0}
Another log is now generated
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:30,“msg”:“Ghost is running in production…”,“time”:“2019-10-20T05:15:28.446Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:30,“msg”:“Your site is now available on https://shantesh.com/",“time”:“2019-10-20T05:15:28.449Z”,"v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:30,“msg”:“Ctrl+C to shut down”,“time”:“2019-10-20T05:15:28.450Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED”,“time”:“2019-10-20T05:15:28.461Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Tries: 0”,“time”:“2019-10-20T05:15:28.463Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Retrying…”,“time”:“2019-10-20T05:15:28.463Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED”,“time”:“2019-10-20T05:15:28.616Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Tries: 1”,“time”:“2019-10-20T05:15:28.618Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Retrying…”,“time”:“2019-10-20T05:15:28.620Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED”,“time”:“2019-10-20T05:15:28.772Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Tries: 2”,“time”:“2019-10-20T05:15:28.774Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Retrying…”,“time”:“2019-10-20T05:15:28.775Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:40,“msg”:“Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED”,“time”:“2019-10-20T05:15:28.929Z”,“v”:0}
{“name”:“Log”,“hostname”:“ghost-droplet”,“pid”:26640,“level”:30,“msg”:“Ghost boot 5.39s”,“time”:“2019-10-20T05:15:28.931Z”,“v”:0}