kelvin
kelvin copied to clipboard
Fail to start/install in Raspi
Hi there, I am a beginner with the Raspi and unix. I got some stuff working by simply following step-by-step instructions. I followed the exact instructions for installing kelvin, but unfortunately it won't run, and I have no idea how to fix it.
When checking of the process is running it says:
● kelvin.service - Kelvin
Loaded: loaded (/etc/systemd/system/kelvin.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2019-08-14 19:02:31 CEST; 1s ago
Process: 1548 ExecStart=/home/pi/kelvin/kelvin (code=exited, status=210/CHROOT)
Main PID: 1548 (code=exited, status=210/CHROOT)
Aug 14 19:02:31 raspberrypi systemd[1]: kelvin.service: Failed with result 'exit-code'.
Any suggestions?
Thx
Hey,
could you paste the output of
journalctl -fu kelvin.service
This should give us a hint what exactly went wrong here.
Hi, I was actually going to post the same thing. I am able to get Kelvin working fine on my rasberry pi zero W running raspbian when I open the file manually through the command line.
However, I have followed the instructions in your readme file twice and both times I get the same error as what Sarcas666 posted. I do see raspbian loading Kelvin.service when it starts, but it's not able to do anything like download an update, make a config file, or find a location.
I think it has something to do with the permissions. Maybe from setting up a new user? But I'm also a Linux noob and really have no idea what I'm doing.
Unfortunately, I'm formatting my rasberry pi again to try and figure something out again so can't give you logs, but if it'll help, I'll go through the steps to install Kelvin as a system process again and share the output with you.
Thanks!
Otherwise, really awesome program and the reason I filled my house with ambience lights! Thanks so much for your work!
Havent forgotten about this, but some of my hardware died and I am still slowly rebuilding/reconfiguring stuff. I'll be back :)
Ok thank you! Good luck!
On Oct 5, 2019, at 10:35 AM, Sarcas666 [email protected] wrote:
Havent forgotten about this, but some of my hardware died and I am still slowly rebuilding/reconfiguring stuff. I'll be back :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I had the same problem (code=exited, status=210/CHROOT
);
was able to fix it by following these steps:
Fetch latest release v1.3.2
wget https://github.com/stefanwichmann/kelvin/releases/download/v1.3.2/kelvin-linux-arm-v1.3.2.tar.gz -O /tmp/kelvin-arm.tar.gz
Create directory
sudo mkdir -p /opt/kelvin
Create user to run as
sudo adduser --system --group --shell /bin/nologin --no-create-home --home /opt/kelvin kelvin
Install
cd /opt/kelvin
sudo tar -xvzf /tmp/kelvin-arm.tar.gz
sudo mv kelvin-linux-arm*/* .
sudo rmdir kelvin-linux-arm*
sudo rm /tmp/kelvin-arm.tar.gz
Set permissions
sudo chown -R kelvin:kelvin /opt/kelvin
Start the service and look into log
sudo systemctl start kelvin
journalctl -fu kelvin.service
(close log by pressing CTRL+C)
I noticed the error (code=exited, status=210/CHROOT
) was gone now,
but kelvin was unable to discover my bridge, so I stopped the service
sudo systemctl start kelvin
and edited config.json
to explicitly state the (fixed) IP of my HUE bridge
sudo nano /opt/kelvin/config.json
"bridge": {
"ip": "192.168.xxx.xxx",
"username": ""
},
I started the service again and looked into the log:
sudo systemctl start kelvin
journalctl -fu kelvin.service
At this point, it finally asked to press the physical button on the bridge. After pressing the button, it registered and took control over the lights.
After this, I got back to scheduling the service like normal:
Start on boot
sudo systemctl enable kelvin
Confirm status
sudo systemctl status kelvin
This worked great. Thank you so much!
On Tue, Oct 22, 2019 at 6:23 AM c0sm0t0pian [email protected] wrote:
I had the same problem (code=exited, status=210/CHROOT); was able to fix it by following these steps: Fetch latest release v1.3.2
wget https://github.com/stefanwichmann/kelvin/releases/download/v1.3.2/kelvin-linux-arm-v1.3.2.tar.gz -O /tmp/kelvin-arm.tar.gz Create directory
sudo mkdir -p /opt/kelvin Create user to run as
sudo adduser --system --group --shell /bin/nologin --no-create-home --home /opt/kelvin kelvin Install
cd /opt/kelvin sudo tar -xvzf /tmp/kelvin-arm.tar.gz sudo mv kelvin-linux-arm*/* . sudo rmdir kelvin-linux-arm* sudo rm /tmp/kelvin-arm.tar.gz Set permissions
sudo chown -R kelvin:kelvin /opt/kelvin Start the service and look into log
sudo systemctl start kelvin journalctl -fu kelvin.service (close log by pressing CTRL+C)
I noticed the error (code=exited, status=210/CHROOT) was gone now, but kelvin was unable to discover my bridge, so I stopped the service sudo systemctl start kelvin and edited config.json to explicitly state the (fixed) IP of my HUE bridge sudo nano /opt/kelvin/config.json
"bridge": { "ip": "192.168.xxx.xxx", "username": "" },
I started the service again and looked into the log: sudo systemctl start kelvin journalctl -fu kelvin.service
At this point, it finally asked to press the physical button on the bridge. After pressing the button, it registered and took control over the lights.
After this, I got back to scheduling the service like normal: Start on boot
sudo systemctl enable kelvin Confirm status
sudo systemctl status kelvin
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stefanwichmann/kelvin/issues/69?email_source=notifications&email_token=AMXQZUSKSVCYKTOEQHKZYS3QP3IAJA5CNFSM4ILXCUU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB5HPTQ#issuecomment-544896974, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMXQZUR33V4VHARKXARBMOLQP3IAJANCNFSM4ILXCUUQ .
Tried it again, with the latest version as described by c0sm0t0pian above, but still have the same problem.
Running on an rPi3 with buster, everything updated & upgraded. Tried a second time, removed everything from the previous attempt, removed the user kelvin, but no success. Then I noticed the kelvin.service file in /etc/systemd/system was different then the one in /opt/kelvin/etc/ , username and workingdir for example were different. I deleted the one in /etc/systemd/system and copied the one from /opt/kelvin/etc/ . It still did not work, until I manually added the ip of my hue bridge in /etc/systemd/system/kelvin.service .
Now it seems to work...
Aug 17 15:44:29 raspberrypi systemd[1]: Started Kelvin. Aug 17 15:44:29 raspberrypi systemd[17746]: kelvin.service: Changing to the requested working directory failed: No such file or directory Aug 17 15:44:29 raspberrypi systemd[17746]: kelvin.service: Failed at step CHDIR spawning /home/pi/kelvin/kelvin: No such file or directory Aug 17 15:44:29 raspberrypi systemd[1]: kelvin.service: Main process exited, code=exited, status=200/CHDIR Aug 17 15:44:29 raspberrypi systemd[1]: kelvin.service: Failed with result 'exit-code'. Aug 17 15:44:35 raspberrypi systemd[1]: kelvin.service: Service RestartSec=5s expired, scheduling restart. Aug 17 15:44:35 raspberrypi systemd[1]: kelvin.service: Scheduled restart job, restart counter is at 1. Aug 17 15:44:35 raspberrypi systemd[1]: Stopped Kelvin. Aug 17 15:44:35 raspberrypi systemd[1]: Started Kelvin. Aug 17 15:44:35 raspberrypi systemd[17756]: kelvin.service: Changing to the requested working directory failed: No such file or directory Aug 17 15:44:35 raspberrypi systemd[17756]: kelvin.service: Failed at step CHDIR spawning /home/pi/kelvin/kelvin: No such file or directory Aug 17 15:44:35 raspberrypi systemd[1]: kelvin.service: Main process exited, code=exited, status=200/CHDIR Aug 17 15:44:35 raspberrypi systemd[1]: kelvin.service: Failed with result 'exit-code'.
@Sarcas666 you either did not update to https://github.com/stefanwichmann/kelvin/releases/download/v1.3.2/kelvin-linux-arm-v1.3.2.tar.gz -O /tmp/kelvin-arm.tar.gz or you haven't reloaded you systemctl config sudo systemctl daemon-reload