If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:
-
What’s your URL? https://stories.jkbaseer.com/
-
What version of Ghost are you using?
OS: Ubuntu, v20.04.3 LTS
Node Version: v14.18.1
Ghost Version: 4.22.4
Ghost-CLI Version: 1.18.0
Environment: production -
What configuration?
Used Digitalocean one click installation with cloudflare -
What browser? Chrome
-
What errors or information do you see in the console?
ghost-mgr@ghost2:/var/www/ghost$ ghost doctor
✔ Checking system Node.js version - found v14.18.1
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking system compatibility
Local MySQL install was not found or is stopped. You can ignore this if you are using a remote MySQL host.
Alternatively you could:
a) install/start MySQL locally
b) run `ghost install --db=sqlite3` to use sqlite
c) run `ghost install local` to get a development install using sqlite3.
? Continue anyway? No
✖ Checking for a MySQL installation
+ sudo systemctl is-active ghost_stories-jkbaseer-com
✔ Validating config
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v14.18.1
One or more errors occurred.
1) Checking for a MySQL installation
Message: MySQL check failed.
Debug Information:
OS: Ubuntu, v20.04.3 LTS
Node Version: v14.18.1
Ghost Version: 4.22.4
Ghost-CLI Version: 1.18.0
Environment: production
Command: 'ghost doctor'
- What steps could someone else take to reproduce the issue you’re having?
Ghost Status:
I do not know but I can share what I have tried from read other post on 502 Topic here.
Background:
The site has been running for a year. And never touched anything on the configuration.
Attempt1: Ghost restart
ghost-mgr@ghost2:/var/www/ghost$ ghost restart
+ sudo systemctl is-active ghost_stories-jkbaseer-com
Ghost instance is not running! Starting...
+ sudo systemctl start ghost_stories-jkbaseer-com
+ sudo systemctl stop ghost_stories-jkbaseer-com
✖ Starting Ghost
A GhostError occurred.
Message: Ghost was able to start, but errored during boot with: connect ECONNREFUSED 127.0.0.1:3306
Help: Unknown database error
Suggestion: journalctl -u ghost_stories-jkbaseer-com -n 50
Debug Information:
OS: Ubuntu, v20.04.3 LTS
Node Version: v14.18.1
Ghost Version: 4.22.4
Ghost-CLI Version: 1.18.0
Environment: production
Command: 'ghost restart'
Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2022-11-15T05_53_42_972Z.log
Try running ghost doctor to check your system for known issues.
You can always refer to https://ghost.org/docs/ghost-cli/ for troubleshooting.
Attemp2: Ghost Doctor and the result is shown on the first
As per it, it ask me to install mysql. But I already had one and it’s running. So not sure why it’s not running.
Attempt3: “systemctl status mysql.service”
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor pr>
Active: failed (Result: exit-code) since Tue 2022-11-15 05:38:33 UTC;>
Process: 143964 ExecStartPre=/usr/share/mysql/mysql-system-start pre >
Process: 143972 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAIL>
Main PID: 143972 (code=exited, status=1/FAILURE)
Status: "Server shutdown complete"
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Main process exited, cod>
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Failed with result 'exit>
Nov 15 05:38:33 ghost2 systemd[1]: Failed to start MySQL Community Server.
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Scheduled restart job, r>
Nov 15 05:38:33 ghost2 systemd[1]: Stopped MySQL Community Server.
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Start request repeated t>
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Failed with result 'exit>
Nov 15 05:38:33 ghost2 systemd[1]: Failed to start MySQL Community Server.
set mark: ...skipping...
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor pr>
Active: failed (Result: exit-code) since Tue 2022-11-15 05:38:33 UTC;>
Process: 143964 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre >
Process: 143972 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAIL>
Main PID: 143972 (code=exited, status=1/FAILURE)
Status: "Server shutdown complete"
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Main process exited, cod>
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Failed with result 'exit>
Nov 15 05:38:33 ghost2 systemd[1]: Failed to start MySQL Community Server.
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Scheduled restart job, r>
Nov 15 05:38:33 ghost2 systemd[1]: Stopped MySQL Community Server.
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Start request repeated t>
Nov 15 05:38:33 ghost2 systemd[1]: mysql.service: Failed with result 'exit>
Nov 15 05:38:33 ghost2 systemd[1]: Failed to start MySQL Community Server.
and also restarting mysql leads
Attempt4: sudo service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
Attempt5: Change in cloudflare setup
Switching off proxy in cloudflare and also making the TTL to 1Minute as per another topic in the forum. It doesn’t change as well. I see it’s not due to cloudflare but just wanted to try.
##Attemp5: Using official troubleshooting for Mysql
I used this to debug the MYSQL. I have few question adding to the above setup
- If this error occurred after using
ghost install
, once resolved, re-run the setup phase usingghost setup
If i re run ghost install, will it affect my existing content (critical) and it’s stored configuration?