Community
OpenEnergyMonitor

Community

Unable to connect EmonCMS


(N Wyrsch) #1

Today, I temptatively upgraded my raspery pi and EmonCMS (within the application using the dedicated upgrade buttons). A subsequent check of the database check resulted in an error (I forgot the details). After a few login out an reboot of the raspberry, I am in a situation where I cannot log anymore: getting the error mesage Can’t connect to MySQL server on ‘127.0.0.1’. The issue seems to be related to the MySQL service that does not start. I tried to start manually bit it immediately fails. Ath this point I would like to know if

  1. what are the possible reason for MySQL service not starting
  2. possible solutions to solve the proble
  3. a way to backup the MySQL database (and later recover the data) without having the service running.

May thanks for pointers and help


(Trystan Lea) #2

Hello @nwyrsch

What do you see if you type:

sudo service mysql status

could you also copy the output of Administration > Server Information (see copy to clipboard).


(N Wyrsch) #3

Here is the output

● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql)
   Active: failed (Result: exit-code) since Mon 2019-01-14 16:29:22 CET; 1h 40min ago
  Process: 1722 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

Jan 14 16:29:22 emonpi mysql[1722]: /etc/init.d/mysql: ERROR: The partition...d!
Jan 14 16:29:22 emonpi systemd[1]: mysql.service: control process exited, c...=1
Jan 14 16:29:22 emonpi systemd[1]: Failed to start LSB: Start and stop the ...n.
Jan 14 16:29:22 emonpi systemd[1]: Unit mysql.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

(Brian Orpin) #4

@TrystanLea @glyn.hudson second one this week.

Might be a trend. Help: "Fatal error: . . . " after emonPi update looks very similar.


(Brian Orpin) #5

There is a very similar thread I have linked to.

Have you tried the button again? If not, can you please post the contents of /home/pi/data/emonpiupdate.log

If you have used the button more than once then the file will be less useful as it is cleared (I think) each time.

Could you do this please (use -l switch).

When you post the output, please put 3 backticks (top left of keyboard) on a line before the pasted output and then 3 more on a line below the pasted output (if you edit your post above, you will see what I have done).


(Brian Orpin) #6

@TrystanLea sadly @nwyrsch can’t.

Does this update process do an apt-update & apt-upgrade?


(Glyn Hudson) #7

Sorry to hear, we will do our best to help. Do you know what version emonSD you are running?

It’s displayed on the Emoncms admin page or can be found with:

$ ls /boot | grep emonSD


(N Wyrsch) #8

I finally found the origin of my problem. I run out of SD card space! I am using a hard drive but I did not properly set the use of the latter. I have now to see if I can restart the MySQL service when the partition is increases and get access to the my data.