kumy / Automatic-Chicken-Coop-Door-Opener

Automatic Chicken Coop Door Opener with direct control button, a simple web interface with camera support and can be controlled via `MQTT` protocol.
GNU General Public License v3.0
11 stars 0 forks source link

Redis #6

Closed kazanjig closed 3 years ago

kazanjig commented 3 years ago

Hi kumy,

In your instructions should it be 'redis-server' instead of 'redis'? I'm getting "E: Unable to locate package redis".

Thanks.

kazanjig

kumy commented 3 years ago

yes and no :)

On Debian package redis depends on redis-server, so in this case it's fine. I'll however update the README so there will be no confusion in the future.

Thanks!

$ dpkg -l redis*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version           Architecture Description
+++-==============-=================-============-=======================================================
ii  redis          5:5.0.3-4+deb10u3 all          Persistent key-value database with network interface (m
ii  redis-server   5:5.0.3-4+deb10u3 armhf        Persistent key-value database with network interface
ii  redis-tools    5:5.0.3-4+deb10u3 armhf        Persistent key-value database with network interface (c

$ dpkg -L redis
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/redis
/usr/share/doc/redis/NEWS.Debian.gz
/usr/share/doc/redis/changelog.Debian.gz
/usr/share/doc/redis/changelog.gz
/usr/share/doc/redis/copyright
/usr/share/doc/redis/00-RELEASENOTES.gz

$ apt-cache show redis
Package: redis
Version: 5:5.0.3-4+deb10u3
Installed-Size: 55
Maintainer: Chris Lamb <lamby@debian.org>
Architecture: all
Depends: redis-server (<< 5:5.0.3-4+deb10u3.1~), redis-server (>= 5:5.0.3-4+deb10u3)
Size: 45256
SHA256: c10eaab8ed0e661298247c4e8e19ec37f031d8699843ade2e6a01f8eca65756b
SHA1: 0adbe645d1a88cf3b4c7c144e89860b365cefec8
MD5sum: a741640bd30476bfef24631ec5e063d3
Description: Persistent key-value database with network interface (metapackage)
 Redis is a key-value database in a similar vein to memcache but the dataset
 is non-volatile. Redis additionally provides native support for atomically
 manipulating and querying data structures such as lists and sets.
 .
 The dataset is stored entirely in memory and periodically flushed to disk.
 .
 This package depends on the redis-server package.
Description-md5: 78a6a1a27b35b2a9388a817f91f05f71
Homepage: https://redis.io/
Section: database
Priority: optional
Filename: pool/main/r/redis/redis_5.0.3-4+deb10u3_all.deb
kumy commented 3 years ago

Done!

BTW did you plan/manage to build one "Automatic Chicken Coop Door Opener" on your side?

kazanjig commented 3 years ago

Working on it, thanks for sharing your work and for the quick response.

On Fri, Oct 29, 2021 at 1:24 PM kumy @.***> wrote:

Done!

BTW did you plan/manage to build one "Automatic Chicken Coop Door Opener" on your side?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kumy/Automatic-Chicken-Coop-Door-Opener/issues/6#issuecomment-954915247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAT6KDXOX3RS5G6CQ5QSPLUJLRGRANCNFSM5G7ZEBMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

kazanjig commented 3 years ago

Quick question (hopefully). The service won't start, automagically or manually. If I try manually I get

Failed to start chicken-coop.service: Unit chicken-coop.service is not loaded properly: Invalid argument. See system logs and 'systemctl status chicken-coop.service' for details.

Checking the logs I see

Oct 29 13:49:11 supercoop systemd[1]: [/etc/systemd/system/chicken-coop.service:14] Executable path is not absolute, ignoring: authbind gunicorn3 -b [::]:80 -w1 'app:create_app()' --pid /run/chicken-coop/chicken-coop.pid Oct 29 13:49:11 supercoop systemd[1]: chicken-coop.service: Service has no ExecStart= setting, which is only allowed for RemainAfterExit=yes services. Refusing.

It appears the first error is causing the second. This is outside the scope of my understanding. Thoughts?

On Fri, Oct 29, 2021 at 1:40 PM Jerry Kazanjian @.***> wrote:

Working on it, thanks for sharing your work and for the quick response.

On Fri, Oct 29, 2021 at 1:24 PM kumy @.***> wrote:

Done!

BTW did you plan/manage to build one "Automatic Chicken Coop Door Opener" on your side?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kumy/Automatic-Chicken-Coop-Door-Opener/issues/6#issuecomment-954915247, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAT6KDXOX3RS5G6CQ5QSPLUJLRGRANCNFSM5G7ZEBMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

kumy commented 3 years ago

Odd, I do not have this error Executable path is not absolute

What is the distribution running on your raspberry?

# Mine
$ lsb_release  -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster

https://github.com/kumy/Automatic-Chicken-Coop-Door-Opener/blob/f19d298ffe2f0fccbf147f80e7a2b5d1b8f3b568/other/chicken-coop.service#L14

You can try to replace authbind L14 by it's absolute path /usr/bin/authbind as requested. Don't forget to reload systemd daemon when making changes to this file (sudo systemctl daemon-reload)

kazanjig commented 3 years ago

I'm running Stretch 9.13. Let me try upgrading to Buster and see what happens.

On Fri, Oct 29, 2021 at 2:14 PM kumy @.***> wrote:

Odd, I do not have this error Executable path is not absolute

What is the distribution running on your raspberry?

Mine

$ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster

https://github.com/kumy/Automatic-Chicken-Coop-Door-Opener/blob/f19d298ffe2f0fccbf147f80e7a2b5d1b8f3b568/other/chicken-coop.service#L14

You can try to replace authbind L14 by it's absolute path /usr/bin/authbind as requested. Don't forget to reload systemd daemon when making changes to this file (sudo systemctl daemon-reload)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kumy/Automatic-Chicken-Coop-Door-Opener/issues/6#issuecomment-954948471, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAT6KFVRTFEZUYBPGD4FETUJLW65ANCNFSM5G7ZEBMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

kazanjig commented 3 years ago

New errors now.

@.***:~ $ systemctl status chicken-coop.service ● chicken-coop.service - Automatic Chicken Coop Door Opener Loaded: loaded (/etc/systemd/system/chicken-coop.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Fri 2021-10-29 16:27:57 EDT; 4s ago Process: 3155 ExecStartPre=/bin/mkdir /run/chicken-coop (code=exited, status=200/CHDIR) Process: 3156 ExecStopPost=/bin/rm -rf /run/chicken-coop (code=exited, status=200/CHDIR)

@.***:~ $ journalctl -xe -- The job identifier is 8485. Oct 29 16:29:21 supercoop systemd[3273]: chicken-coop.service: Changing to the requested working directory failed: No such Oct 29 16:29:21 supercoop systemd[3273]: chicken-coop.service: Failed at step CHDIR spawning /bin/mkdir: No such file or d -- Subject: Process /bin/mkdir could not be executed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The process /bin/mkdir could not be executed and failed. -- -- The error number returned by this process is ERRNO. Oct 29 16:29:21 supercoop systemd[1]: chicken-coop.service: Control process exited, code=exited, status=200/CHDIR -- Subject: Unit process exited -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- An ExecStartPre= process belonging to unit chicken-coop.service has exited. -- -- The process' exit code is 'exited' and its exit status is 200. Oct 29 16:29:21 supercoop systemd[3274]: chicken-coop.service: Changing to the requested working directory failed: No such Oct 29 16:29:21 supercoop systemd[3274]: chicken-coop.service: Failed at step CHDIR spawning /bin/rm: No such file or dire -- Subject: Process /bin/rm could not be executed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The process /bin/rm could not be executed and failed. -- -- The error number returned by this process is ERRNO. Oct 29 16:29:21 supercoop systemd[1]: chicken-coop.service: Control process exited, code=exited, status=200/CHDIR -- Subject: Unit process exited -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- An ExecStopPost= process belonging to unit chicken-coop.service has exited. -- -- The process' exit code is 'exited' and its exit status is 200. Oct 29 16:29:21 supercoop systemd[1]: chicken-coop.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The unit chicken-coop.service has entered the 'failed' state with result 'exit-code'. Oct 29 16:29:21 supercoop systemd[1]: Failed to start Automatic Chicken Coop Door Opener. -- Subject: A start job for unit chicken-coop.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit chicken-coop.service has finished with a failure. -- -- The job identifier is 8485 and the job result is failed. lines 5693-5741/5741 (END) -- The job identifier is 8485. Oct 29 16:29:21 supercoop systemd[3273]: chicken-coop.service: Changing to the requested working directory failed: No such file or directory Oct 29 16:29:21 supercoop systemd[3273]: chicken-coop.service: Failed at step CHDIR spawning /bin/mkdir: No such file or directory -- Subject: Process /bin/mkdir could not be executed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The process /bin/mkdir could not be executed and failed. -- -- The error number returned by this process is ERRNO. Oct 29 16:29:21 supercoop systemd[1]: chicken-coop.service: Control process exited, code=exited, status=200/CHDIR -- Subject: Unit process exited -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- An ExecStartPre= process belonging to unit chicken-coop.service has exited. -- -- The process' exit code is 'exited' and its exit status is 200. Oct 29 16:29:21 supercoop systemd[3274]: chicken-coop.service: Changing to the requested working directory failed: No such file or directory Oct 29 16:29:21 supercoop systemd[3274]: chicken-coop.service: Failed at step CHDIR spawning /bin/rm: No such file or directory -- Subject: Process /bin/rm could not be executed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The process /bin/rm could not be executed and failed. -- -- The error number returned by this process is ERRNO. Oct 29 16:29:21 supercoop systemd[1]: chicken-coop.service: Control process exited, code=exited, status=200/CHDIR -- Subject: Unit process exited -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- An ExecStopPost= process belonging to unit chicken-coop.service has exited. -- -- The process' exit code is 'exited' and its exit status is 200. Oct 29 16:29:21 supercoop systemd[1]: chicken-coop.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- The unit chicken-coop.service has entered the 'failed' state with result 'exit-code'. Oct 29 16:29:21 supercoop systemd[1]: Failed to start Automatic Chicken Coop Door Opener. -- Subject: A start job for unit chicken-coop.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support -- -- A start job for unit chicken-coop.service has finished with a failure. -- -- The job identifier is 8485 and the job result is failed. lines 5693-5741/5741 (END)

On Fri, Oct 29, 2021 at 2:16 PM Jerry Kazanjian @.***> wrote:

I'm running Stretch 9.13. Let me try upgrading to Buster and see what happens.

On Fri, Oct 29, 2021 at 2:14 PM kumy @.***> wrote:

Odd, I do not have this error Executable path is not absolute

What is the distribution running on your raspberry?

Mine

$ lsb_release -a No LSB modules are available. Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster

https://github.com/kumy/Automatic-Chicken-Coop-Door-Opener/blob/f19d298ffe2f0fccbf147f80e7a2b5d1b8f3b568/other/chicken-coop.service#L14

You can try to replace authbind L14 by it's absolute path /usr/bin/authbind as requested. Don't forget to reload systemd daemon when making changes to this file (sudo systemctl daemon-reload)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kumy/Automatic-Chicken-Coop-Door-Opener/issues/6#issuecomment-954948471, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHAT6KFVRTFEZUYBPGD4FETUJLW65ANCNFSM5G7ZEBMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

kumy commented 3 years ago

spawning /bin/mkdir: No such file or directory spawning /bin/rm: No such file or directory

mkdir and rm, seems to not be present in the same path on your system. On mine i find them those path, just adapt path in your service file according to your system…

$ ls -l /bin/mkdir 
-rwxr-xr-x 1 root root 63400 Feb 28  2019 /bin/mkdir

$ ls -l /usr/bin/mkdir
-rwxr-xr-x 1 root root 63400 Feb 28  2019 /usr/bin/mkdir

$ ls -l /bin/rm /usr/bin/rm
-rwxr-xr-x 1 root root 51012 Feb 28  2019 /bin/rm
-rwxr-xr-x 1 root root 51012 Feb 28  2019 /usr/bin/rm