faasd
faasd copied to clipboard
faasd may have a compatibility issue with Debian Bullseye
Expected Behaviour
Installing with ./hack/install.sh should works in a newly flashed 'Raspberry Pi OS with desktop' and 'Raspberry Pi OS Lite' as instructed in https://blog.alexellis.io/faasd-for-lightweight-serverless/
Current Behaviour
The installation returned the following error:
pi@raspberrypi:~/faasd $ ./hack/install.sh
. . . ./containerd-shim Finding latest version from GitHub 0.14.1 Downloading package https://github.com/openfaas/faas-cli/releases/download/0.14.1/faas-cli-armhf as /tmp/faas-cli-armhf Download complete.
Running with sufficient permissions to attempt to move faas-cli to /usr/local/bin New version of faas-cli installed to /usr/local/bin . . . CLI: commit: d94600d2d2be52a66e0a15c219634f3bcac27318 version: 0.14.1 Unable to find latest version online error: Head "https://github.com/openfaas/faas-cli/releases/latest": context deadline exceeded (Client.Timeout exceeded while awaiting headers) curl: (23) Failure writing output to destination 2021/12/11 10:55:48 File exists: "/var/lib/faasd/secrets/basic-auth-password" 2021/12/11 10:55:48 File exists: "/var/lib/faasd/secrets/basic-auth-user" Check status with: sudo journalctl -u faasd --lines 100 -f
Login with: sudo cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login -s Skipping caddy installation as FAASD_DOMAIN.
faasd log from journalctrl
pi@raspberrypi:~/faasd $ sudo journalctl -u faasd --lines 40
-- Journal begins at Sat 2021-10-30 12:29:41 BST, ends at Sat 2021-12-11 11:09:53 GMT. -- Dec 11 11:09:38 raspberrypi faasd[19738]: Error: Failed to setup network for task "nats-19849": failed to locate iptables: exec: "iptables": executable file not found in $PATH: failed to locate iptables:> Dec 11 11:09:38 raspberrypi systemd[1]: faasd.service: Main process exited, code=exited, status=1/FAILURE Dec 11 11:09:38 raspberrypi systemd[1]: faasd.service: Failed with result 'exit-code'. Dec 11 11:09:48 raspberrypi systemd[1]: faasd.service: Scheduled restart job, restart counter is at 103. Dec 11 11:09:48 raspberrypi systemd[1]: Stopped faasd. Dec 11 11:09:48 raspberrypi systemd[1]: Started faasd. Dec 11 11:09:48 raspberrypi faasd[19893]: faasd version: 0.14.4 commit: 8fbdd1a461196520de75fe35ac0b5bdda6403ac7 Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 File exists: "/var/lib/faasd/secrets/basic-auth-password" Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 File exists: "/var/lib/faasd/secrets/basic-auth-user" Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 Writing network config... Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 Supervisor created in: 5.604807ms Dec 11 11:09:48 raspberrypi faasd[19893]: Preparing queue-worker with image: ghcr.io/openfaas/queue-worker:0.12.2 Dec 11 11:09:48 raspberrypi faasd[19893]: Prepare done for: ghcr.io/openfaas/queue-worker:0.12.2, 2825311 bytes Dec 11 11:09:48 raspberrypi faasd[19893]: Preparing basic-auth-plugin with image: ghcr.io/openfaas/basic-auth:0.21.0 Dec 11 11:09:48 raspberrypi faasd[19893]: Prepare done for: ghcr.io/openfaas/basic-auth:0.21.0, 6695507 bytes Dec 11 11:09:48 raspberrypi faasd[19893]: Preparing nats with image: docker.io/library/nats-streaming:0.22.0 Dec 11 11:09:48 raspberrypi faasd[19893]: Prepare done for: docker.io/library/nats-streaming:0.22.0, 6263446 bytes Dec 11 11:09:48 raspberrypi faasd[19893]: Preparing prometheus with image: docker.io/prom/prometheus:v2.14.0 Dec 11 11:09:48 raspberrypi faasd[19893]: Prepare done for: docker.io/prom/prometheus:v2.14.0, 50285726 bytes Dec 11 11:09:48 raspberrypi faasd[19893]: Preparing gateway with image: ghcr.io/openfaas/gateway:0.21.0 Dec 11 11:09:48 raspberrypi faasd[19893]: Prepare done for: ghcr.io/openfaas/gateway:0.21.0, 11314747 bytes Dec 11 11:09:48 raspberrypi faasd[19893]: Removing old container for: queue-worker Dec 11 11:09:48 raspberrypi faasd[19893]: Removing old container for: basic-auth-plugin Dec 11 11:09:48 raspberrypi faasd[19893]: Removing old container for: nats Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 Status of nats is: created Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 Need to kill task: nats Dec 11 11:09:48 raspberrypi faasd[19893]: Removing old container for: prometheus Dec 11 11:09:48 raspberrypi faasd[19893]: Removing old container for: gateway Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 Start-up order: Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 - nats Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 - queue-worker Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 - basic-auth-plugin Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 - prometheus Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 - gateway Dec 11 11:09:48 raspberrypi faasd[19893]: Starting: nats Dec 11 11:09:48 raspberrypi faasd[19893]: 2021/12/11 11:09:48 Created container: nats Dec 11 11:09:49 raspberrypi faasd[19893]: 2021/12/11 11:09:49 Error creating CNI for nats: Failed to setup network for task "nats-19984": failed to locate iptables: exec: "iptables": executable file not > Dec 11 11:09:49 raspberrypi faasd[19893]: Error: Failed to setup network for task "nats-19984": failed to locate iptables: exec: "iptables": executable file not found in $PATH: failed to locate iptables:> Dec 11 11:09:49 raspberrypi systemd[1]: faasd.service: Main process exited, code=exited, status=1/FAILURE Dec 11 11:09:49 raspberrypi systemd[1]: faasd.service: Failed with result 'exit-code'.
Steps to Reproduce (for bugs)
- Flash raspi OS onto SD card, boot it up, connect to internet and so on.
- Clone faasd according to https://blog.alexellis.io/faasd-for-lightweight-serverless/
- ./hack/install.sh
Context
I am a new in this community and am trying out faasd with my raspberry pi, which is very interesting. I would like to thanks everyone here for such a wonderful project.
Your Environment
-
OS and architecture: Raspberry Pi OS
-
Release date: October 30th 2021
-
Kernel version: 5.10
faasd is designed for only the lite version of Raspberry Pi OS, and not for a desktop edition.
If you’re running into issues with Bullseye, then you will need to use the so called “legacy” OS named Buster.
All faasd instructions, installation guides and eBooks are valid for Raspberry Pi OS Buster. Ubuntu 20.04.03 works fine too.
There appears to be some issues with the changes made in Debian Bullseye by the Raspberry Pi team or by the Debian team.
/set title: faasd may have a compatibility issue with Debian Bullseye
If anyone has the spare cycles to spend poking at Debian Bullseye, it may be worth comparing notes with the K3s team. K3s also fails to run on the newest OS due to a problem in runc.
https://github.com/k3s-io/k3s/issues/4580
@jsiebens is looking into this something you’d be interested in?
The error also mentions iptables, which is probably a breaking change made in Debian Bullseye. You may want to look up how to reinstall it, or a legacy version of it. https://wiki.debian.org/nftables
@alexellis thank you for the advise. I ll go with the Buster as suggested.
I ran across the same error. Resolved it by running
sudo apt-get update
sudo apt-get install iptables
Should iptables be installed along with curl and other dependencies? @ https://github.com/openfaas/faasd/blob/77867f17e37dee229ecf0613f6efdfb0b396355e/hack/install.sh#L46
Seems reasonable @rvramesh. @jsiebens what do you think?
yes, seems reasonable to me as well
Hi @alexellis , @jsiebens Created a PR #237 . First time contributor here. Please let me know if the PR has any issues
See a related / duplicate issue at: https://github.com/openfaas/faasd/issues/235
Can confirm that adding iptables allowed me to run on Bullseye
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
this is no longer an issue on 64 bit, I can confirm, I run raspberry pi OS (64 bit) which depends on debian 11. If you are on raspberry pi 4 or 400, I strongly recommend running 64 bit OS since armv8 and further supports it very smoothly.
I also recommend using the official raspberry PI flasher because on Debian's website there are too many weird images you can get a legacy directly.
Let's get this closed then.