gismo141 / homebridge-server

Server plugin for homebridge
https://gismo141.github.io/configure-your-homebridge-2/
152 stars 20 forks source link

no logs #25

Closed hirbod closed 7 years ago

hirbod commented 7 years ago

My bridge is using "systemd", but the logfiles are empty. Well, my 4th issue. Guess this is a big alpha state-plugin, not really working for me, as I still have to do so much on terminal everytime.

gismo141 commented 7 years ago

Hey please check the wiki pages for nearly all your problems, it seems that you have not given the correct rights to your user executing the homebridge!

There is an extra section just for systemd!

hirbod commented 7 years ago

Which wiki? My setup is correct. Also added user "homebridge" and it has correct permissions

gismo141 commented 7 years ago

https://github.com/gismo141/homebridge-server/wiki/Usage

hirbod commented 7 years ago

Thanks. That worked! Didn't see this section.

gismo141 commented 7 years ago

No problem!

I think I should add the link to the projects-README (maybe just for this startup-system-cases.

I'll push an update in half an hour or so for the hotlink-problem.

May I close this one?

rjmcfadd commented 7 years ago

I am having this problem too as well as reboot not doing anything.

I followed the wiki and entered

sudo usermod -a -G systemd-journal homebridge

When I click log it's blank and shows this in the terminal window

[Homebridge Server] Executing: journalctl --no-pager -u homebridge --since yesterday

gismo141 commented 7 years ago

What is the username executing your homebridge-service?

Depending on the way you added the user, you could try to login as this user and issue the same commands.

I'm going to make the log-messages more verbose to help users identify the specific problems.

rjmcfadd commented 7 years ago

Thank you for the help. I think the username is either pi or homebridge.

I figured out the problem with the log. I didn't copy my config file from /home/pi/.homebridge to /var/homebridge.

I'm still having trouble with the rebooting though. When I click reboot, this appears in the log

Jan 13 16:37:01 raspberrypi homebridge[412]: [1/13/2017, 4:37:01 PM] [Homebridge Server] Executing: journalctl --no-pager -u homebridge --since yesterday Jan 13 16:37:26 raspberrypi sudo[1193]: pam_unix(sudo:auth): conversation failed Jan 13 16:37:26 raspberrypi sudo[1193]: pam_unix(sudo:auth): auth could not identify password for [homebridge] Jan 13 16:37:26 raspberrypi homebridge[412]: [1/13/2017, 4:37:26 PM] [Homebridge Server] Executing: sudo systemctl restart homebridge

gismo141 commented 7 years ago

The username is very important for the command you entered.

The sudo usermod -a -G systemd-journal homebridge means basically that the super user modifies the rights of user homebridge adds him to the group systemd-journal grants him the ability to read the systemd logs.

You can see the user in the homebridge.service-file and should adapt the call accordingly. For example if the user you're using to execute is pi then the call should look like:

sudo usermod -a -G systemd-journal pi

As well you need to add the user to the needed sudoers-file according to the wiki because a normal unix-user is not allowed to execute the wanted commands.

rjmcfadd commented 7 years ago

Ok thanks for the reply. The user is homebridge but the problem was with the sudoers file because my systemctl file is located at /bin/systemctl not /usr/bin/systemctl.

gismo141 commented 7 years ago

Ah okay, sorry for that. I'll add that to the wiki ASAP.

Thanks for the reply and I hope everything is working now ;)

rjmcfadd commented 7 years ago

No problem! Thanks for helping me, everything seems to be working great now!