Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faasd may have a compatibility issue with Debian Bullseye #227

Closed
ChitiphatC opened this issue Dec 11, 2021 · 14 comments
Closed

faasd may have a compatibility issue with Debian Bullseye #227

ChitiphatC opened this issue Dec 11, 2021 · 14 comments

Comments

@ChitiphatC
Copy link

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: 8fbdd1a
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)

  1. Flash raspi OS onto SD card, boot it up, connect to internet and so on.
  2. Clone faasd according to https://blog.alexellis.io/faasd-for-lightweight-serverless/
  3. ./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

@alexellis
Copy link
Member

alexellis commented Dec 11, 2021

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.

@alexellis
Copy link
Member

/set title: faasd may have a compatibility issue with Debian Bullseye

@derek derek bot changed the title ./hack/install.sh on newly flashed Raspberry Pi 4 faasd may have a compatibility issue with Debian Bullseye Dec 11, 2021
@alexellis
Copy link
Member

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.

k3s-io/k3s#4580

@alexellis
Copy link
Member

@jsiebens is looking into this something you’d be interested in?

@alexellis
Copy link
Member

alexellis commented Dec 11, 2021

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

@ChitiphatC
Copy link
Author

@alexellis thank you for the advise. I ll go with the Buster as suggested.

@rvramesh
Copy link
Contributor

rvramesh commented Jan 1, 2022

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?
@

install_required_packages() {

@alexellis
Copy link
Member

Seems reasonable @rvramesh. @jsiebens what do you think?

@jsiebens
Copy link
Contributor

yes, seems reasonable to me as well

@rvramesh
Copy link
Contributor

Hi @alexellis , @jsiebens Created a PR #237 . First time contributor here. Please let me know if the PR has any issues

@alexellis
Copy link
Member

See a related / duplicate issue at: #235

@martinwoodward
Copy link

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

@mrwormhole
Copy link

mrwormhole commented Aug 13, 2022

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.

image

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.

image

@alexellis
Copy link
Member

Let's get this closed then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants