Hi @borpin, thanks for your reply.
This system has been running this version for a couple of years.
I have now found the update.log in ~/data/emonpiupdate.log and so update the post to add the log below.
I did get feedwriter running in my 2nd post, and service-runner process was always running.
Output from the requested command:
pi@Pi3(ro):log$ sudo systemctl status {emonhub.service,feedwriter.service,mqtt_input.service,service_runner.service}
● emonhub.service - LSB: Start/stop emonHub
Loaded: loaded (/etc/init.d/emonhub)
Active: active (exited) since Wed 2019-12-11 22:27:43 GMT; 24h ago
Dec 11 22:27:42 Pi3 systemd[1]: Starting LSB: Start/stop emonHub...
Dec 11 22:27:43 Pi3 sudo[3214]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/mkdir -p /var/log/emonhub
Dec 11 22:27:43 Pi3 sudo[3214]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 11 22:27:43 Pi3 sudo[3214]: pam_unix(sudo:session): session closed for user root
Dec 11 22:27:43 Pi3 sudo[3224]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/touch /var/log/emonhub/emonhub.log
Dec 11 22:27:43 Pi3 sudo[3224]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 11 22:27:43 Pi3 sudo[3224]: pam_unix(sudo:session): session closed for user root
Dec 11 22:27:43 Pi3 sudo[3237]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/chown -R emonhub /var/log/emonhub
Dec 11 22:27:43 Pi3 sudo[3237]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 11 22:27:43 Pi3 sudo[3237]: pam_unix(sudo:session): session closed for user root
Dec 11 22:27:43 Pi3 sudo[3249]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/chown -R emonhub /var/log/emonhub
Dec 11 22:27:43 Pi3 sudo[3249]: pam_unix(sudo:session): session opened for user root by (uid=0)
Dec 11 22:27:43 Pi3 sudo[3249]: pam_unix(sudo:session): session closed for user root
Dec 11 22:27:43 Pi3 emonhub[3210]: Starting OpenEnergyMonitor emonHub: emonhub has been started ok.
Dec 11 22:27:43 Pi3 systemd[1]: Started LSB: Start/stop emonHub.
Dec 11 23:15:33 Pi3 systemd[1]: Started LSB: Start/stop emonHub.
● feedwriter.service - LSB: feedwriter script daemon
Loaded: loaded (/etc/init.d/feedwriter)
Active: active (running) since Wed 2019-12-11 23:34:39 GMT; 23h ago
Process: 11141 ExecStop=/etc/init.d/feedwriter stop (code=exited, status=0/SUCCESS)
Process: 11159 ExecStart=/etc/init.d/feedwriter start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/feedwriter.service
└─11293 /usr/bin/php -f /var/www/emoncms/scripts/feedwriter.php
Dec 11 23:34:32 Pi3 feedwriter[11159]: Log is turned off
Dec 11 23:34:32 Pi3 feedwriter[11159]: Starting RPI
Dec 11 23:34:39 Pi3 systemd[1]: Started LSB: feedwriter script daemon.
● mqtt_input.service - Emoncms MQTT Input Script
Loaded: loaded (/etc/systemd/system/mqtt_input.service; enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2019-12-12 23:12:56 GMT; 40s ago
Docs: https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
Process: 4943 ExecStart=/usr/bin/php /var/www/emoncms/scripts/phpmqtt_input.php (code=exited, status=255)
Main PID: 4943 (code=exited, status=255)
Dec 12 23:12:56 Pi3 systemd[1]: mqtt_input.service: main process exited, code=exited, status=255/n/a
Dec 12 23:12:56 Pi3 systemd[1]: Unit mqtt_input.service entered failed state.
● service_runner.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
As service_runner was not found, but ps-ef shows there is a service-runner, I tried the command on that:
pi@Pi3(ro):log$ ps -ef |grep -i service
pi 7223 7219 0 Dec11 ? 00:00:00 /bin/sh -c /home/pi/emonpi/service-runner >> /var/log/service-runner.log 2>&1
pi 7224 7223 2 Dec11 ? 00:31:03 /bin/bash /home/pi/emonpi/service-runner
pi 10247 341 0 23:17 pts/0 00:00:00 grep --color=auto -i service
pi@Pi3(ro):log$ sudo systemctl status {service-runner.service}
● \x7bservice-runner.service\x7d.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
emonpiupdate.log - which shows more errors than appeared in the log window at the time of the update.
Starting emonPi Update >
via service-runner-update.sh
Service Runner update script V1.1.1
EUID: 1000
Argument:
Wed 11 Dec 22:28:23 GMT 2019
#############################################################
emonSD version: emonSD-07Nov16
emonSD base image check passed...continue update
#############################################################
I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
Filesystem is unlocked - Write access
type ' rpi-ro ' to lock
git pull /home/pi/emonpi
* master
wifiap
On branch master
Your branch is behind 'origin/master' by 270 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: rc.local_jessieminimal
no changes added to commit (use "git add" and/or "git commit -a")
error: Your local changes to the following files would be overwritten by merge:
rc.local_jessieminimal
Please, commit your changes or stash them before you can merge.
Aborting
Updating d2be4f4..0cbdb5a
git pull /home/pi/RFM2Pi
* master
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Already up-to-date.
git pull /home/pi/emonhub
K0den-wibeee_interface
* emon-pi
hmm01i-syslogging
On branch emon-pi
Your branch is up-to-date with 'origin/emon-pi'.
nothing to commit, working directory clean
Already up-to-date.
git pull /home/pi/oem_openHab
* master
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Already up-to-date.
git pull /home/pi/usefulscripts
* master
On branch master
Your branch is behind 'origin/master' by 40 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: update_emoncms.sh
no changes added to commit (use "git add" and/or "git commit -a")
error: Your local changes to the following files would be overwritten by merge:
update_emoncms.sh
Please, commit your changes or stash them before you can merge.
Aborting
Updating 7f1ac2a..ea00787
git pull /home/pi/huawei-hilink-status
* master
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
error: cannot open .git/FETCH_HEAD: Permission denied
Start emonPi Atmega328 firmware update:
=================================
EmonPi update started
=================================
EUID: 1000
Requirement already up-to-date: paho-mqtt in /usr/local/lib/python2.7/dist-packages
You are using pip version 8.1.2, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Stopping OpenEnergyMonitor emonHub: emonhub has been stopped ok.
Start ATmega328 serial upload using avrdude with latest.hex
Discrete Sampling
avrdude -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 115200 -U flash:w:/home/pi/emonpi/firmware/compiled/latest.hex
avrdude-original: Using autoreset DTR on GPIO Pin 7
avrdude-original: stk500_getsync() attempt 1 of 10: not in sync: resp=0xfc
avrdude-original: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
avrdude-original: stk500_getsync() attempt 3 of 10: not in sync: resp=0x8e
avrdude-original: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1c
avrdude-original: stk500_getsync() attempt 5 of 10: not in sync: resp=0x8e
avrdude-original: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe0
avrdude-original: stk500_getsync() attempt 7 of 10: not in sync: resp=0x0e
avrdude-original: stk500_getsync() attempt 8 of 10: not in sync: resp=0xf8
avrdude-original: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
avrdude-original: stk500_getsync() attempt 10 of 10: not in sync: resp=0xf0
avrdude-original done. Thank you.
strace: |autoreset: Broken pipe
Starting OpenEnergyMonitor emonHub: emonhub has been started ok.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
+ [email protected]
updated 1 package and audited 1031 packages in 21.286s
found 2 vulnerabilities (1 moderate, 1 high)
run `npm audit fix` to fix them, or `npm audit` for details
npm WARN checkPermissions Missing write access to /home/pi/data/node-red/node_modules/node-red-node-emoncms
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! path /home/pi/data/node-red/node_modules/node-red-node-emoncms
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/home/pi/data/node-red/node_modules/node-red-node-emoncms'
npm ERR! { Error: EACCES: permission denied, access '/home/pi/data/node-red/node_modules/node-red-node-emoncms'
npm ERR! stack: 'Error: EACCES: permission denied, access \'/home/pi/data/node-red/node_modules/node-red-node-emoncms\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/home/pi/data/node-red/node_modules/node-red-node-emoncms' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-12-11T22_29_16_210Z-debug.log
Start emonhub update script:
=================================
EmonPi update started
=================================
Running emonhub automatic node addition script
EUID: 1000
emonhub location does not exist
Start emoncms update:
=================================
Emoncms update started
Emoncms update script V1.2.0
Wed 11 Dec 22:29:16 GMT 2019
#############################################################
emonSD version: emonSD-07Nov16
emonSD base image check pass...continue update
#############################################################
EUID: 1000
Checking cron tab for service runner entry...
service runner crontab entry already installed
current settings.php md5: 59e80f731935867f5f93753d49c0fe86
Default settings.php md5: 59e80f731935867f5f93753d49c0fe86
git pull /var/www/emoncms
dev-mosquitto-php
master
* stable
symlinked_modules
On branch stable
Your branch is up-to-date with 'origin/stable'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
settings.php_7-11-2016
nothing added to commit but untracked files present (use "git add" to track)
Already up-to-date.
NEW default settings.php md5: 59e80f731935867f5f93753d49c0fe86
settings.php has NOT been user modifed
settings.php not updated
git pull /var/www/emoncms/Modules/app
9.0
* stable
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean
Already up-to-date.
Already on 'stable'
Your branch is up-to-date with 'origin/stable'.
git pull /var/www/emoncms/Modules/config
9.0
* stable
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean
Already up-to-date.
Already on 'stable'
Your branch is up-to-date with 'origin/stable'.
git pull /var/www/emoncms/Modules/wifi
9.0
* stable
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean
Already up-to-date.
Already on 'stable'
Your branch is up-to-date with 'origin/stable'.
git pull /var/www/emoncms/Modules/dashboard
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean
Already up-to-date.
Already on 'stable'
Your branch is up-to-date with 'origin/stable'.
git pull /var/www/emoncms/Modules/graph
master
* stable
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean
Already up-to-date.
Already on 'stable'
Your branch is up-to-date with 'origin/stable'.
git pull /home/pi/postprocess
Already on 'emonpi'
Your branch is up-to-date with 'remotes/origin/emonpi'.
Already up-to-date.
git pull /home/pi/sync
Already on 'master'
Your branch is up-to-date with 'origin/master'.
Already up-to-date.
git pull /home/pi/backup
master
* stable
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean
Already up-to-date.
Already on 'stable'
Your branch is up-to-date with 'origin/stable'.
update mqtt_input systemd unit file
Update Emoncms database
[]
Restarting Services...
Restarting OpenEnergyMonitor emonHub: emonhub has been restarted ok.
Log is turned off
Restarting feedwriter
Restarting openhab (via systemctl): openhab.service.
set log rotate config owner to root
Restarting Services...
Starting emonPi LCD service..
Filesystem is locked - Read Only access
type ' rpi-rw ' to unlock
Wed 11 Dec 22:30:04 GMT 2019
...................
emonPi update done
restarting service-runner\n
I managed to get emonhub started. Although using the ‘service’ command would display emonhub as active/exited, using ps -ef, I could see emonhub was running.I tried using /etc/init.d/emonhub stop to stop emonhub, as well as sudo service emonhub stop, and then started it just using sudo service emonhub start and this time it worked, and the admin page showed emonhub working.
That left mqtt, and I tried the fix mentioned in Mqtt_input service down: ‘activating (auto-restart)’ of updating line 46, and thenwaiting for the next auto-restart, and then mqtt was active.
I still didn’t have any data appearing on the inputs page, so I stopped and restarted emonhub service, and then the inputs re-appeared, as well as the feeds.
It’s quite possible this installation is getting a bit creaky, but it’s odd/interesting that the fix sugested by @fcattaneo seems to have solved the problem for me as well.