Ghost update -> stdout maxBuffer exceeded


#1

I have been trying to update Ghost to 2.0 on my self-hosted installation. (It was originally a Digital Ocean created ghost droplet.) After some trial & error, I followed feedback from the ghost-cli to update permissions and software.

Unfortunatley, I have stalled. ghost doctor reports a ‘file permission’ error, and the log shows the following:

Debug Information:

  • OS: Ubuntu, v16.04
  • Node Version: v8.9.4
  • Ghost -CLI Version: 1.9.1
  • Environment: production
  • Command: ‘ghost doctor’

Message: stdout maxBuffer exceeded

Any suggestions to resolve this buffer issue? Thanks!


#2

That sounds like a bug with the CLI :grimacing: I’ve opened an issue outlining the information.

You’re going to have to manually run doctor :upside_down_face: Please run the following commands to fix any broken permissions and then run ghost doctor to ensure everything is going well.

(check-permissions)

  1. sudo chown -R ghost:ghost ./content
  2. sudo find ./ -type d -exec chmod 00775 {} \\;
  3. sudo find ./ ! -path "./versions/*" -type f -exec chmod 664 {} \\;

#3

Thanks, @vikaspotluri123!

I was able to manually correct the permissions with your commands, and this has allowed ghost doctor to complete with no errors.

However, ghost required me to update to the latest version (1.25.5) before it would install 2.0. When I atttempted the install with ghost-cli, it errored. I rolled-back the install, and now ghost will not start. This is the latest log file, as I manually tried to start

Debug Information:
    OS: Ubuntu, v16.04
    Node Version: v8.9.4
    Ghost-CLI Version: 1.9.1
    Environment: production
    Command: 'ghost start'
Message: Ghost did not start.
Suggestion: journalctl -u ghost_localhost -n 50
Stack: Error: Ghost did not start.
    at connectToGhostSocket.then.catch (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:153:32)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Original Error Message:
Message: connect ECONNREFUSED 127.0.0.1:2368
Stack: Error: connect ECONNREFUSED 127.0.0.1:2368
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)

When I ran, journalctl -u ghost_localhost -n 50 the error stated, “I didn’t have sufficient permissions to open journal files.”


#4

No worries - run sudo journalctl -u ghost_localhost -n 50 to get the log


#5

Thanks! Does this provide any clues?

– Logs begin at Fri 2018-08-24 16:05:01 EDT, end at Fri 2018-08-24 21:32:58 EDT. –
Aug 24 20:38:35 bedawson-Ghost nodejs[389]: at Module._compile (module.js:409:26)
Aug 24 20:38:35 bedawson-Ghost nodejs[389]: at Object.Module._extensions…js (module.js:416:10)
Aug 24 20:38:35 bedawson-Ghost systemd[1]: ghost_localhost.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 20:38:35 bedawson-Ghost systemd[1]: ghost_localhost.service: Unit entered failed state.
Aug 24 20:38:35 bedawson-Ghost systemd[1]: ghost_localhost.service: Failed with result ‘exit-code’.
Aug 24 20:38:36 bedawson-Ghost systemd[1]: ghost_localhost.service: Service hold-off time over, scheduling restart.
Aug 24 20:38:36 bedawson-Ghost systemd[1]: Stopped Ghost systemd service for blog: localhost.
Aug 24 20:38:36 bedawson-Ghost systemd[1]: Started Ghost systemd service for blog: localhost.
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: /usr/lib/node_modules/ghost-cli/node_modules/fs-extra/lib/fs/index.js:93
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: exports.write = function (fd, buffer, …args) {
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: ^^^
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: SyntaxError: Unexpected token …
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at exports.runInThisContext (vm.js:53:16)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at Module._compile (module.js:373:25)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at Object.Module._extensions…js (module.js:416:10)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at Module.load (module.js:343:32)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at Function.Module._load (module.js:300:12)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at Module.require (module.js:353:17)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at require (internal/module.js:12:17)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at Object. (/usr/lib/node_modules/ghost-cli/node_modules/fs-extra/lib/index.js:6:3)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at Module._compile (module.js:409:26)
Aug 24 20:38:36 bedawson-Ghost nodejs[396]: at Object.Module._extensions…js (module.js:416:10)
Aug 24 20:38:36 bedawson-Ghost systemd[1]: ghost_localhost.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 20:38:36 bedawson-Ghost systemd[1]: ghost_localhost.service: Unit entered failed state.
Aug 24 20:38:36 bedawson-Ghost systemd[1]: ghost_localhost.service: Failed with result ‘exit-code’.
Aug 24 20:38:36 bedawson-Ghost systemd[1]: ghost_localhost.service: Service hold-off time over, scheduling restart.
Aug 24 20:38:36 bedawson-Ghost systemd[1]: Stopped Ghost systemd service for blog: localhost.
Aug 24 20:38:36 bedawson-Ghost systemd[1]: Started Ghost systemd service for blog: localhost.
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: /usr/lib/node_modules/ghost-cli/node_modules/fs-extra/lib/fs/index.js:93
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: exports.write = function (fd, buffer, …args) {
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: ^^^
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: SyntaxError: Unexpected token …
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at exports.runInThisContext (vm.js:53:16)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at Module._compile (module.js:373:25)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at Object.Module._extensions…js (module.js:416:10)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at Module.load (module.js:343:32)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at Function.Module._load (module.js:300:12)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at Module.require (module.js:353:17)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at require (internal/module.js:12:17)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at Object. (/usr/lib/node_modules/ghost-cli/node_modules/fs-extra/lib/index.js:6:3)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at Module._compile (module.js:409:26)
Aug 24 20:38:36 bedawson-Ghost nodejs[403]: at Object.Module._extensions…js (module.js:416:10)
Aug 24 20:38:36 bedawson-Ghost systemd[1]: ghost_localhost.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 20:38:36 bedawson-Ghost systemd[1]: ghost_localhost.service: Unit entered failed state.
Aug 24 20:38:36 bedawson-Ghost systemd[1]: ghost_localhost.service: Failed with result ‘exit-code’.
Aug 24 20:38:37 bedawson-Ghost systemd[1]: ghost_localhost.service: Service hold-off time over, scheduling restart.
Aug 24 20:38:37 bedawson-Ghost systemd[1]: Stopped Ghost systemd service for blog: localhost.
Aug 24 20:38:37 bedawson-Ghost systemd[1]: ghost_localhost.service: Start request repeated too quickly.
Aug 24 20:38:37 bedawson-Ghost systemd[1]: Failed to start Ghost systemd service for blog: localhost.
Aug 24 20:39:14 bedawson-Ghost systemd[1]: Stopped Ghost systemd service for blog: localhost.


#6

hmm, it has some info, but instead of parsing it, let’s try something else - does ghost run work without any errors?


#7

if it does, what does sudo -u ghost node -v output?


#8

ghost run

Starts ghost successfully! It dies when I close SSH, anyway yo get it running in background?

sudo -u ghost node -v

bedawson-Ghost:/var/www/ghost$ sudo -u ghost node -v
v8.9.4


#9

Okay, that’s good, Ghost is installed properly, and node is running an acceptable version. It looks like something’s goofy w/ systemd, which is what’s used to make run Ghost in the background.

The reason I asked you to check the Ghost node version is because of this line:

SyntaxError: Unexpected token …

makes me think the node version is incorrect

Can you try running ghost restart one more time just to be sure it’s still broken?


#10

ghost restart

Debug Information:
OS: Ubuntu, v16.04
Node Version: v8.9.4
Ghost-CLI Version: 1.9.1
Environment: production
Command: ‘ghost restart’
Message: Ghost did not start.
Suggestion: journalctl -u ghost_localhost -n 50
Stack: Error: Ghost did not start.
at connectToGhostSocket.then.catch (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:153:32)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

Original Error Message:
Message: connect ECONNREFUSED 127.0.0.1:2368
Stack: Error: connect ECONNREFUSED 127.0.0.1:2368
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)


#11

Coincidentally, I upgraded to this version node in my first attempt to install Ghost 2.0. Originally, I was running a 6.* version. Maybe this contributed to the issues?


#12

That shouldn’t be an issue since v6 is currently supported. You can try reinstalling ghost v1 latest by running ghost update --v1 --force to see if that fixes the issue


#13

Debug Information:
OS: Ubuntu, v16.04
Node Version: v8.9.4
Ghost-CLI Version: 1.9.1
Environment: production
Command: ‘ghost update --v1 --force’
Message: Ghost did not start.
Suggestion: journalctl -u ghost_localhost -n 50
Stack: Error: Ghost did not start.
at connectToGhostSocket.then.catch (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:153:32)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

Original Error Message:
Message: connect ECONNREFUSED 127.0.0.1:2368
Stack: Error: connect ECONNREFUSED 127.0.0.1:2368
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)


#14

If I “wipe the slate clean,” will I encounter the same issues?


#15

Hey! I’m not entirely sure, since I’m having trouble determining the root cause of the problem :confused:

You can try doing that, but be sure to back up your content and database so nothing gets lost!

FYI, an update to the CLI was released yesterday with a fix to your original problem, but nothing was released regarding the current problem - we haven’t figured out if the problem is related to Ghost, the CLI, your system, or bad luck!


#16

I installed the ghost-cli and Ghost updates. They ran without errors, but neither the installation or ghost start complete or run successfully.

When I run ghost run I get the following error:

Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED

My only other clue… when ghost run is executed, my blog loads, but the admin dashboard shows an announcement that “Ghost 2.0 has been released” – even after successful installation.

Does any of that help?


#17

That’s expected, once you close it it shouldn’t pop up again

Given Upgrading to 2.0 Error - Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED is really similar to this issue, and you’ve already started working with Kate, I suggest you continue over there - Kate works for Ghost and wrote amost of the logic :slight_smile:


#18

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.