EmonCMS 11.13.0 Setup → Admin → Shutdown does not work

The Setup → Admin menu item (at the bottom: Pi Control - Shutdown) has no effect.

The front panel pushbutton still works as before.

System Information

System Information

Emoncms

Server

  • CPU: 1 Threads(s) | 4 Core(s) | 1 Sockets(s) | Cortex-A53 | 51.20MIPS |
  • OS: Linux 5.15.76-v7+
  • Host: emonpi | emonpi | (192.168.1.73)
  • Date: 2026-06-06 21:35:45 BST
  • Uptime: 21:35:45 up 0 min, 0 users, load average: 3.04, 0.81, 0.28

Memory

  • RAM: Used: 21.41% | Total: 922.14 MB | Used: 197.45 MB | Free: 724.68 MB
  • Swap: Used: 0.00% | Total: 100 MB | Used: 0 B | Free: 100 MB

Disk

  • /: Used: 41.91% | Total: 2 GB | Used: 2 GB | Free: 2 GB | Read Load: n/a | Write Load: n/a | Load Time: n/a
  • /boot: Used: 19.52% | Total: 254.99 MB | Used: 49.78 MB | Free: 205.21 MB | Read Load: n/a | Write Load: n/a | Load Time: n/a
  • /var/opt/emoncms: Used: 0.17% | Total: 2 GB | Used: 14.25 MB | Free: 2 GB | Read Load: n/a | Write Load: n/a | Load Time: n/a
  • /var/log: Used: 6.88% | Total: 50 MB | Used: 3.44 MB | Free: 46.56 MB | Read Load: n/a | Write Load: n/a | Load Time: n/a

HTTP

  • Server: Apache/2.4.54 (Raspbian) HTTP/1.1 CGI/1.1 80

MySQL

  • Version: 10.5.15-MariaDB-0+deb11u1
  • Host: 127.0.0.1 (127.0.0.1)
  • Date: 2026-06-06 21:35:45 (UTC 01:00)
  • Stats: Uptime: 21 Threads: 6 Questions: 179 Slow queries: 0 Opens: 50 Open tables: 43 Queries per second avg: 8.523

PHP

  • Version: 8.1.12 (Zend Version 4.1.12)
  • Run user: User: www-data Group: www-data video Script Owner: pi
  • Modules: apache2handler , calendar , Core , ctype , curl , date , dom v20031129, exif , FFI , fileinfo , filter , ftp , gd , gettext , hash , iconv , json , libxml , mbstring , mosquitto v0.4.0, mysqli , mysqlnd vmysqlnd 8.1.12, openssl , pcre , PDO , pdo_mysql , Phar , posix , readline , redis v6.0.0-dev, Reflection , session , shmop , SimpleXML , sockets , sodium , SPL , standard , sysvmsg , sysvsem , sysvshm , tokenizer , xml , xmlreader , xmlwriter , xsl , Zend OPcache , zlib

Redis

  • Redis Server: 6.0.16
  • PHP Redis: 6.0.0-dev
  • Host: localhost:6379
  • Uptime: 0 days

MQTT Server

  • Version: Mosquitto 2.0.11
  • Host: localhost:1883 (127.0.0.1)

Pi

  • Model: Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)
  • Serial num.: 31A57E2C
  • GPU Temperature: 48.9°C
  • File-system: read-write
  • emonpiRelease: emonSD-10Nov22
Client Information

Client Information

  • Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0
  • IP: 192.168.1.80
  • Client Hostname: r-IdeaPad-3-15IIL05

Issue also raised by @reedy.

I had no means of knowing that.

Thanks @Robert.Wall @awjlogan
I’ve fixed this in the latest stable release.

Confirmed OK

While reboot seems to work… After an upgrade, reboot etc.

We shouldn’t be getting this “Refresh failed”

Agreed - it’s misleading at best.

v11.15.10 should fix this, I’ve added a is shuttingDown flag that then hides the refresh errors. I guess an alternative could be to change the view completely to some kind of screen wide Emoncms is offline or similar message?

The refresh failed still shows on 11.15.15

I’ve seen that too.

Also, trying to access emonCMS at the wrong instant as it is booting, I can see this MySQL error:

Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/www/emoncms/index.php:74 Stack trace: #0 /var/www/emoncms/index.php(74): mysqli->__construct() #1 {main} thrown in /var/www/emoncms/index.php on line 74

Not a problem when you know that a second or two later, a browser [F5] will give the login page as normal. To the uninitiated, it could well be concerning.

I guess it’s simply that the server is running before the database.