Question

Running a second ghost service fails at running CHDIR /usr/bin/npm, finding no directory?

I’ve been configuring my Ubuntu 16.04 droplet to run two ghosts blogs on two separate nginx server blocks. I’ve got the second ngnix server block running correctly and the second domain is pointing to the correct port and not the first server block. However I am getting a 502 error indicating Ghost isn’t running for that domain.

I’ve run a status check and here is the output from service ghost 2 status

ghost2.service: Failed at step CHDIR spawning /usr/bin/npm: No such file or directory ghost2.service: Main process exited, code=exited, status 200/CHDIR ghost2.service: Failed at step CHDIR spawning /usr/bin/npm: No such file or directory ghost2.service: Control process exited, code exited=status=200 ghost2.service: Unit entered failed state. ghost2.service: Failed with result ‘exit-code’. ghost2.service: Service hold-off time over, scheduling restart. Stopped ghost ghost2.service: Start request repeated too quickly. Failed to start ghost.

The first ghost service runs fine using the same /usr/bin/npm directory in the start up script. However, the directory doesn’t seem to exist.

I’m wondering what the issue might be and how I can get the second instance of ghost running.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This is a bit confusing. I would recommend double-checking your configuration. A CHDIR to /usr/bin/npm would be likely to fail as npm is a binary, not a folder. Can you share the steps you took in setting up the second site?