@vikaspotluri123 Yeah that sounds like a good idea
I am having similar issues. When I run watch --interval 0.5 netstat -tulnp
the only port that shows is 8000.
Which OS are you using?
Im using Ubuntu 16.04
Can you pls define “endless” - how long did you wait?
Could you also please open two shell windows.
The first will run ghost restart
. The second window will run ghost log -f
. Please share the log here. THanks
I got nothing when doing the ghost restart,
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
Looks like Ghost is already running, that would explain it.
Can you run ps aux | grep node
?
But i wonder why the CLI does not get the error message back from Ghost. I’ll test that.
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!
ubuntu@ip-172-31-24-59:~$ ps aux | grep node
root 13865 0.0 0.3 55740 3196 ? S Aug27 0:00 sudo -E -u ghost /usr/local/bin/node current/index.js
ghost 13867 0.0 10.4 1280516 105932 ? Sl Aug27 1:40 /usr/local/bin/node current/index.js
ubuntu 21795 0.0 0.0 12944 988 pts/0 S+ 08:24 0:00 grep --color=auto node
ubuntu@ip-172-31-24-59:~$
I have restarted the ghost restart
few times, but no additional log is adding
Ubuntu 16.04.5
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.
ghost restart
ran for 3.5 minutes without resolution.
bedawson-Ghost:/var/www/ghost$ ghost restart
Running sudo command: systemctl is-active ghost_localhost
? Sudo Password [hidden]
Ghost instance is not running! Starting…
Running sudo command: systemctl is-active ghost_localhost
Ensuring user is not logged in as ghost user
Checking if logged in user is directory owner
Checking current folder permissions
Running sudo command: systemctl is-active ghost_localhost
Validating config
Checking folder permissions
Checking file permissions
Checking content folder ownership
Running sudo command: systemctl start ghost_localhost
☴ Starting Ghost
ghost log -f
displayed the following:
bedawson-Ghost:/var/www/ghost$ ghost log -f
Running sudo command: systemctl is-active ghost_localhost
? Sudo Password [hidden]
[2018-08-31 22:15:06] INFO “GET /public/ghost-sdk.min.js?v=a52f56447b” 200 35ms
[2018-08-31 22:15:06] INFO “GET /assets/js/jquery.fitvids.js?v=a52f56447b” 200 40ms
[2018-08-31 22:15:06] INFO “GET /content/images/2018/06/D3FB4120-D301-454B-8035-C0E3B0722F85.png” 200 56ms
[2018-08-31 22:15:06] INFO “GET /content/images/2017/07/header.png” 200 32ms
[2018-08-31 22:15:06] INFO “GET /content/images/2015/05/IMG_2345.jpg” 200 14ms
[2018-08-31 22:15:17] INFO “GET /ghost/” 200 250ms
[2018-08-31 22:15:17] INFO “GET /ghost/assets/vendor.min-e71cb5c677f51d517625c8c87005a74a.css” 200 58ms
[2018-08-31 22:15:17] INFO “GET /ghost/assets/ghost.min-e78ed0a8c988f402a4326fbfb5014d10.css” 200 115ms
[2018-08-31 22:15:17] INFO “GET /ghost/assets/ghost.min-a3b388879732732b560639ae0770746f.js” 200 164ms
[2018-08-31 22:15:17] INFO “GET /ghost/api/v0.1/configuration/” 200 42ms
[2018-08-31 22:15:18] INFO “GET /ghost/api/v0.1/configuration/private/” 200 200ms
[2018-08-31 22:15:18] INFO “GET /ghost/api/v0.1/settings/?type=blog%2Ctheme%2Cprivate” 200 352ms
[2018-08-31 22:15:18] INFO “GET /ghost/api/v0.1/users/me/?include=roles” 200 404ms
[2018-08-31 22:15:18] INFO “POST /ghost/api/v0.1/authentication/token” 200 665ms
[2018-08-31 22:15:18] INFO “GET /ghost/api/v0.1/notifications/” 200 128ms
[2018-08-31 22:15:18] INFO “GET /ghost/assets/ghost-dark-78550990732cff9cfa02386a30478da8.css” 200 138ms
[2018-08-31 22:15:19] INFO “GET /ghost/api/v0.1/posts/?limit=30&page=1&filter=status%3A%5Bdraft%2Cscheduled%2Cpublished%5D%2Bpage%3A%5Btrue%2Cfalse%5D&formats=mobiledoc%2Cplaintext&include=authors%2Ctags%2Cauthors.roles” 200 439ms
[2018-08-31 22:15:19] INFO “GET /content/images/2018/04/Bowtie—ghost-1.png?t=1535768119176” 200 4ms
[2018-08-31 22:15:19] INFO “GET /ghost/api/v0.1/users/?limit=all&include=roles” 200 167ms
[2018-08-31 22:15:19] INFO “GET /ghost/api/v0.1/tags/?limit=all” 200 191ms
Yeah the blog log shows that your instance wasn’t even restarted.
Anything I can do to get it running? ghost run
works, but obviously not a solution.
If you run ghost stop
on your folder, can you serve your blog still?
Here are the steps I took:
- Execute
ghost run
- Execute
ghost stop
(in another command line) - Verify the blog is running.
Yes, the blog is still running. The ghost stop
command returned
Ghost is already stopped! Nothing to do here.
Do you have a second installation on your server?