Ghost-CLI version: 1.9.1
Ghost Version (at /var/www/ghost): 2.0.3
when do ghost start is an endless waiting,
so I try ghost run
and get Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
at this point I can access my web. But again when stop it and using ghost start, process can’t been finished and my blog isn’t started.
[2018-08-23 12:05:55] WARN Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2018-08-23 12:05:55] WARN Tries: 0
[2018-08-23 12:05:55] WARN Retrying…
[2018-08-23 12:05:55] WARN Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2018-08-23 12:05:55] WARN Tries: 1
[2018-08-23 12:05:55] WARN Retrying…
[2018-08-23 12:05:55] WARN Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2018-08-23 12:05:55] WARN Tries: 2
[2018-08-23 12:05:55] WARN Retrying…
[2018-08-23 12:05:55] WARN Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2018-08-23 12:05:55] INFO Ghost boot 2.306s
Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSEDINFO [2018-08-23 12:06:30] “GET /” 301 8ms
INFO [2018-08-23 12:06:33] “GET /favicon.ico” 200 5ms
INFO [2018-08-23 12:06:33] “GET /” 200 413ms
INFO [2018-08-23 12:06:34] “POST /subscribe/” 301 1ms
INFO [2018-08-23 12:06:37] “GET /subscribe/” 200 27ms
INFO [2018-08-23 12:06:46] “GET /robots.txt” 200 2ms
INFO [2018-08-23 12:06:49] “GET /favicon.ico” 200 2ms
is there anything what should I do to successfully use ghost start ?
That is currently expected. ghost run does not open a bootstrap socket. I agree it’s confusing. We should reconsider logging this when running ghost run - need to figure out how.
when do ghost start is an endless waiting,
Hm that is weird, might be a bug. You could run watch --interval 0.5 netstat -tulnp in a second shell window and look which ports show up when executing ghost start.
then got this message after I try use
nohup ghost run &
[2018-08-27 14:35:40] ERROR
NAME: InternalServerError
MESSAGE: (EADDRINUSE) Cannot start Ghost.
level: normal
Port 2368 is already in use by another program.
Is another Ghost instance already running?
InternalServerError: (EADDRINUSE) Cannot start Ghost.
at new GhostError (/var/www/ghost/versions/2.0.3/core/server/lib/common/errors.js:9:26)
at Server.<anonymous> (/var/www/ghost/versions/2.0.3/core/server/ghost-server.js:79:30)
at emitOne (events.js:116:13)
at Server.emit (events.js:211:7)
at emitErrorNT (net.js:1375:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
[2018-08-27 14:35:40] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2018-08-27 14:35:40] WARN Tries: 0
[2018-08-27 14:35:40] WARN Retrying...
[2018-08-27 14:35:40] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2018-08-27 14:35:40] WARN Tries: 1
[2018-08-27 14:35:40] WARN Retrying...
[2018-08-27 14:35:40] ERROR "GET /" 503 46ms
NAME: MaintenanceError
MESSAGE: Site is starting up, please wait a moment then retry.
level: normal
MaintenanceError: Site is starting up, please wait a moment then retry.
at new MaintenanceError (/var/www/ghost/versions/2.0.3/node_modules/ghost-ignition/lib/errors/index.js:136:23)
at maintenance (/var/www/ghost/versions/2.0.3/core/server/web/middleware/maintenance.js:13:21)
at Layer.handle [as handle_request] (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:317:13)
at /var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:335:12)
at next (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:275:10)
at filterPrivateRoutes (/var/www/ghost/versions/2.0.3/core/server/apps/private-blogging/lib/middleware.js:44:20)
at Layer.handle [as handle_request] (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:317:13)
at /var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:335:12)
at next (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:275:10)
at checkIsPrivate (/var/www/ghost/versions/2.0.3/core/server/apps/private-blogging/lib/middleware.js:31:20)
at Layer.handle [as handle_request] (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:317:13)
[2018-08-27 14:35:40] INFO "GET /assets/built/screen.css?v=a70d710117" 200 6ms
[2018-08-27 14:35:40] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2018-08-27 14:35:40] WARN Tries: 2
[2018-08-27 14:35:40] WARN Retrying...
[2018-08-27 14:35:40] ERROR "GET /" 503 4ms
NAME: MaintenanceError
MESSAGE: Site is starting up, please wait a moment then retry.
level: normal
MaintenanceError: Site is starting up, please wait a moment then retry.
at new MaintenanceError (/var/www/ghost/versions/2.0.3/node_modules/ghost-ignition/lib/errors/index.js:136:23)
at maintenance (/var/www/ghost/versions/2.0.3/core/server/web/middleware/maintenance.js:13:21)
at Layer.handle [as handle_request] (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:317:13)
at /var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:335:12)
at next (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:275:10)
at filterPrivateRoutes (/var/www/ghost/versions/2.0.3/core/server/apps/private-blogging/lib/middleware.js:44:20)
at Layer.handle [as handle_request] (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:317:13)
at /var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:335:12)
at next (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:275:10)
at checkIsPrivate (/var/www/ghost/versions/2.0.3/core/server/apps/private-blogging/lib/middleware.js:31:20)
at Layer.handle [as handle_request] (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/var/www/ghost/versions/2.0.3/node_modules/express/lib/router/index.js:317:13)
[2018-08-27 14:35:40] WARN Can't connect to the bootstrap socket (localhost 8000) ECONNREFUSED
[2018-08-27 14:35:40] INFO Ghost boot 5.129s
Hm you probably got the “port is running” error, because ghost start did start the instance, but somehow the CLI wasn’t informed about it.
The screenshot you have shared does not show the bit when Ghost is stopped and started (triggered by ghost restart). Can you share again and show this bit? Thanks!
It looks like you somehow have 2 Ghost instances running on your server. Can you pls double check? It’s hard to diagnose without having access to the server.