[solved] Teddycloud on Raspberry Pi Zero 2 W - not responding after docker starts

Hi,

anyone using a Raspberry Pi Zero 2 W for running Teddycloud 0.4.3?

I was able to prepare the Pi Zero 2 to have docker and docker compose, running docker compose up -d also seems to wortk fine, but if i than try to list the running container, it seems like the Pi Zero 2 runs out of memory? So no response on putty…

this is the complete history after flashing the sd card with 64bit Raspberry PI OS Lite


pi@teddycloud:~ $ sudo apt update && sudo apt upgrade
Err:1 http://archive.raspberrypi.org/debian bullseye InRelease
  Temporary failure resolving 'archive.raspberrypi.org'
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://security.debian.org/debian-security bullseye-security InRelease [48                                                                                                                                                                                                                                             .4 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main arm64 Pa                                                                                                                                                                                                                                             ckages [266 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main armhf Pa                                                                                                                                                                                                                                             ckages [267 kB]
Get:7 http://security.debian.org/debian-security bullseye-security/main Translat                                                                                                                                                                                                                                             ion-en [175 kB]
Fetched 801 kB in 13s (61.6 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
13 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/bullseye/InReleas                                                                                                                                                                                                                                             e  Temporary failure resolving 'archive.raspberrypi.org'
W: Some index files failed to download. They have been ignored, or old ones used                                                                                                                                                                                                                                              instead.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  bsdextrautils bsdutils eject fdisk libblkid1 libfdisk1 libmount1
  libsmartcols1 libuuid1 libwbclient0 mount rfkill util-linux
13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,100 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://security.debian.org/debian-security bullseye-security/main arm64 bs                                                                                                                                                                                                                                             dutils arm64 1:2.36.1-8+deb11u2 [145 kB]
Get:2 http://security.debian.org/debian-security bullseye-security/main arm64 li                                                                                                                                                                                                                                             bblkid1 arm64 2.36.1-8+deb11u2 [187 kB]
Get:3 http://security.debian.org/debian-security bullseye-security/main arm64 li                                                                                                                                                                                                                                             buuid1 arm64 2.36.1-8+deb11u2 [83.4 kB]
Get:4 http://security.debian.org/debian-security bullseye-security/main arm64 li                                                                                                                                                                                                                                             bfdisk1 arm64 2.36.1-8+deb11u2 [224 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main arm64 li                                                                                                                                                                                                                                             bmount1 arm64 2.36.1-8+deb11u2 [203 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main arm64 li                                                                                                                                                                                                                                             bsmartcols1 arm64 2.36.1-8+deb11u2 [152 kB]
Get:7 http://security.debian.org/debian-security bullseye-security/main arm64 fd                                                                                                                                                                                                                                             isk arm64 2.36.1-8+deb11u2 [186 kB]
Get:8 http://security.debian.org/debian-security bullseye-security/main arm64 ut                                                                                                                                                                                                                                             il-linux arm64 2.36.1-8+deb11u2 [1,097 kB]
Get:9 http://security.debian.org/debian-security bullseye-security/main arm64 mo                                                                                                                                                                                                                                             unt arm64 2.36.1-8+deb11u2 [182 kB]
Get:10 http://security.debian.org/debian-security bullseye-security/main arm64 b                                                                                                                                                                                                                                             sdextrautils arm64 2.36.1-8+deb11u2 [142 kB]
Get:11 http://security.debian.org/debian-security bullseye-security/main arm64 l                                                                                                                                                                                                                                             ibwbclient0 arm64 2:4.13.13+dfsg-1~deb11u6 [309 kB]
Get:12 http://security.debian.org/debian-security bullseye-security/main arm64 e                                                                                                                                                                                                                                             ject arm64 2.36.1-8+deb11u2 [102 kB]
Get:13 http://security.debian.org/debian-security bullseye-security/main arm64 r                                                                                                                                                                                                                                             fkill arm64 2.36.1-8+deb11u2 [87.7 kB]
Fetched 3,100 kB in 14s (217 kB/s)
Reading changelogs... Done
(Reading database ... 37782 files and directories currently installed.)
Preparing to unpack .../bsdutils_1%3a2.36.1-8+deb11u2_arm64.deb ...
Unpacking bsdutils (1:2.36.1-8+deb11u2) over (1:2.36.1-8+deb11u1) ...
Setting up bsdutils (1:2.36.1-8+deb11u2) ...
(Reading database ... 37782 files and directories currently installed.)
Preparing to unpack .../libblkid1_2.36.1-8+deb11u2_arm64.deb ...
Unpacking libblkid1:arm64 (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Setting up libblkid1:arm64 (2.36.1-8+deb11u2) ...
(Reading database ... 37782 files and directories currently installed.)
Preparing to unpack .../libuuid1_2.36.1-8+deb11u2_arm64.deb ...
Unpacking libuuid1:arm64 (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Setting up libuuid1:arm64 (2.36.1-8+deb11u2) ...
(Reading database ... 37782 files and directories currently installed.)
Preparing to unpack .../libfdisk1_2.36.1-8+deb11u2_arm64.deb ...
Unpacking libfdisk1:arm64 (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Preparing to unpack .../libmount1_2.36.1-8+deb11u2_arm64.deb ...
Unpacking libmount1:arm64 (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Setting up libmount1:arm64 (2.36.1-8+deb11u2) ...
(Reading database ... 37782 files and directories currently installed.)
Preparing to unpack .../libsmartcols1_2.36.1-8+deb11u2_arm64.deb ...
Unpacking libsmartcols1:arm64 (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Setting up libsmartcols1:arm64 (2.36.1-8+deb11u2) ...
(Reading database ... 37782 files and directories currently installed.)
Preparing to unpack .../fdisk_2.36.1-8+deb11u2_arm64.deb ...
Unpacking fdisk (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Preparing to unpack .../util-linux_2.36.1-8+deb11u2_arm64.deb ...
Unpacking util-linux (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Setting up util-linux (2.36.1-8+deb11u2) ...
fstrim.service is a disabled or a static unit not running, not starting it.
(Reading database ... 37782 files and directories currently installed.)
Preparing to unpack .../mount_2.36.1-8+deb11u2_arm64.deb ...
Unpacking mount (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Preparing to unpack .../bsdextrautils_2.36.1-8+deb11u2_arm64.deb ...
Unpacking bsdextrautils (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Preparing to unpack .../libwbclient0_2%3a4.13.13+dfsg-1~deb11u6_arm64.deb ...
Unpacking libwbclient0:arm64 (2:4.13.13+dfsg-1~deb11u6) over (2:4.13.13+dfsg-1~d                                                                                                                                                                                                                                             eb11u5) ...
Preparing to unpack .../eject_2.36.1-8+deb11u2_arm64.deb ...
Unpacking eject (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Preparing to unpack .../rfkill_2.36.1-8+deb11u2_arm64.deb ...
Unpacking rfkill (2.36.1-8+deb11u2) over (2.36.1-8+deb11u1) ...
Setting up bsdextrautils (2.36.1-8+deb11u2) ...
Setting up libwbclient0:arm64 (2:4.13.13+dfsg-1~deb11u6) ...
Setting up eject (2.36.1-8+deb11u2) ...
Setting up rfkill (2.36.1-8+deb11u2) ...
Setting up libfdisk1:arm64 (2.36.1-8+deb11u2) ...
Setting up mount (2.36.1-8+deb11u2) ...
Setting up fdisk (2.36.1-8+deb11u2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u8) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69) ...
pi@teddycloud:~ $ sudo apt-get purge supervisor # removes everying including con                                                                                                                                                                                                                                             fig files
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'supervisor' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@teddycloud:~ $ sudo apt-get purge nginx nginx-common # removes everying inclu                                                                                                                                                                                                                                             ding config files
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'nginx' is not installed, so not removed
Package 'nginx-common' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@teddycloud:~ $ sudo apt remove docker-ce*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'docker-ce-cli' for glob 'docker-ce*'
Note, selecting 'docker-ce' for glob 'docker-ce*'
Note, selecting 'docker-ce-rootless-extras' for glob 'docker-ce*'
Package 'docker-ce' is not installed, so not removed
Package 'docker-ce-cli' is not installed, so not removed
Package 'docker-ce-rootless-extras' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@teddycloud:~ $ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@teddycloud:~ $ curl -sSL https://get.docker.com | sh
# Executing docker install script, commit: e5543d473431b782227f8908005543bb4389b                                                                                                                                                                                                                                             8de
+ sudo -E sh -c apt-get update -qq >/dev/null
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/bullseye/InReleas                                                                                                                                                                                                                                             e  Temporary failure resolving 'archive.raspberrypi.org'
W: Some index files failed to download. They have been ignored, or old ones used                                                                                                                                                                                                                                              instead.
+ sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transp                                                                                                                                                                                                                                             ort-https ca-certificates curl >/dev/null
+ sudo -E sh -c install -m 0755 -d /etc/apt/keyrings
+ sudo -E sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | gpg                                                                                                                                                                                                                                              --dearmor --yes -o /etc/apt/keyrings/docker.gpg
+ sudo -E sh -c chmod a+r /etc/apt/keyrings/docker.gpg
+ sudo -E sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] ht                                                                                                                                                                                                                                             tps://download.docker.com/linux/debian bullseye stable" > /etc/apt/sources.list.                                                                                                                                                                                                                                             d/docker.list
+ sudo -E sh -c apt-get update -qq >/dev/null
W: Failed to fetch http://archive.raspberrypi.org/debian/dists/bullseye/InReleas                                                                                                                                                                                                                                             e  Temporary failure resolving 'archive.raspberrypi.org'
W: Some index files failed to download. They have been ignored, or old ones used                                                                                                                                                                                                                                              instead.
+ sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce                                                                                                                                                                                                                                              docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras dock                                                                                                                                                                                                                                             er-buildx-plugin >/dev/null
+ sudo -E sh -c docker version
Client: Docker Engine - Community
 Version:           26.0.0
 API version:       1.45
 Go version:        go1.21.8
 Git commit:        2ae903e
 Built:             Wed Mar 20 15:18:07 2024
 OS/Arch:           linux/arm64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.0.0
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.8
  Git commit:       8b79278
  Built:            Wed Mar 20 15:18:07 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

================================================================================

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:

    dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.


To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
         to root access on the host. Refer to the 'Docker daemon attack surface'
         documentation for details: https://docs.docker.com/go/attack-surface/

================================================================================

pi@teddycloud:~ $ sudo systemctl status docker
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-04-05 13:05:14 CEST; 44s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 2828 (dockerd)
      Tasks: 10
        CPU: 2.253s
     CGroup: /system.slice/docker.service
             └─2828 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Apr 05 13:05:07 teddycloud systemd[1]: Starting Docker Application Container Engine...
Apr 05 13:05:10 teddycloud dockerd[2828]: time="2024-04-05T13:05:10.878020725+02:00" level=info msg="Starting up"
Apr 05 13:05:12 teddycloud dockerd[2828]: time="2024-04-05T13:05:12.183049480+02:00" level=info msg="Loading containers: start."
Apr 05 13:05:13 teddycloud dockerd[2828]: time="2024-04-05T13:05:13.523509371+02:00" level=info msg="Loading containers: done."
Apr 05 13:05:13 teddycloud dockerd[2828]: time="2024-04-05T13:05:13.730158855+02:00" level=warning msg="WARNING: No memory limit support"
Apr 05 13:05:13 teddycloud dockerd[2828]: time="2024-04-05T13:05:13.730297606+02:00" level=warning msg="WARNING: No swap limit support"
Apr 05 13:05:13 teddycloud dockerd[2828]: time="2024-04-05T13:05:13.730490213+02:00" level=info msg="Docker daemon" commit=8b79278 containerd-snapshotter=false storage-driver=overlay2 version=26.0.0
Apr 05 13:05:13 teddycloud dockerd[2828]: time="2024-04-05T13:05:13.740585947+02:00" level=info msg="Daemon has completed initialization"
Apr 05 13:05:14 teddycloud systemd[1]: Started Docker Application Container Engine.
Apr 05 13:05:14 teddycloud dockerd[2828]: time="2024-04-05T13:05:14.106361805+02:00" level=info msg="API listen on /run/docker.sock"
pi@teddycloud:~ $ sudo docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
pi@teddycloud:~ $ sudo usermod -a -G docker $(whoami)
pi@teddycloud:~ $ sudo apt-get install git
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
git is already the newest version (1:2.30.2-1+deb11u2).
git set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@teddycloud:~ $ sudo mkdir /teddycloud
pi@teddycloud:~ $ cd ..
pi@teddycloud:/home $ cd ..
pi@teddycloud:/ $ sudo chmod o+rw /teddycloud/
pi@teddycloud:/ $ git clone https://github.com/toniebox-reverse-engineering/teddycloud.git
Cloning into 'teddycloud'...
remote: Enumerating objects: 8907, done.
remote: Counting objects: 100% (2560/2560), done.
remote: Compressing objects: 100% (688/688), done.
remote: Total 8907 (delta 1934), reused 2158 (delta 1832), pack-reused 6347
Receiving objects: 100% (8907/8907), 14.39 MiB | 2.01 MiB/s, done.
Resolving deltas: 100% (6122/6122), done.
pi@teddycloud:/ $ cd teddycloud/
pi@teddycloud:/teddycloud $ cd docker/
pi@teddycloud:/teddycloud/docker $ sudo docker compose up -d
WARN[0000] /teddycloud/docker/docker-compose.yaml: `version` is obsolete
[+] Running 13/13
 ✔ teddycloud 12 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                                                                                                                         148.2s
   ✔ f4bb4e8dca02 Pull complete                                                                                                                                                                                                                                                                                        29.3s
   ✔ 815eb209fdc7 Pull complete                                                                                                                                                                                                                                                                                        94.0s
   ✔ ac7ca23aa19d Pull complete                                                                                                                                                                                                                                                                                         1.5s
   ✔ 423648c181d9 Pull complete                                                                                                                                                                                                                                                                                         2.8s
   ✔ c406629dc798 Pull complete                                                                                                                                                                                                                                                                                         4.6s
   ✔ 6ccfbddfcd0f Pull complete                                                                                                                                                                                                                                                                                         7.0s
   ✔ cedbb312d26b Pull complete                                                                                                                                                                                                                                                                                        20.9s
   ✔ d3001fe934d6 Pull complete                                                                                                                                                                                                                                                                                        27.2s
   ✔ 9c3ba925f18d Pull complete                                                                                                                                                                                                                                                                                        51.6s
   ✔ bdd7fbaf1f8e Pull complete                                                                                                                                                                                                                                                                                        55.0s
   ✔ c45c73fafe2b Pull complete                                                                                                                                                                                                                                                                                        56.5s
   ✔ 42458e6edf39 Pull complete                                                                                                                                                                                                                                                                                        58.4s
[+] Running 1/7
 ⠹ Network docker_default    Created                                                                                                                                                                                                                                                                                    5.2s
 ⠸ Volume "docker_content"   Created                                                                                                                                                                                                                                                                                    4.3s
 ⠸ Volume "docker_library"   Created                                                                                                                                                                                                                                                                                    4.3s
 ⠹ Volume "docker_firmware"  Created                                                                                                                                                                                                                                                                                    4.2s
 ⠹ Volume "docker_certs"     Created                                                                                                                                                                                                                                                                                    4.2s
 ⠙ Volume "docker_config"    Created                                                                                                                                                                                                                                                                                    4.1s
 ✔ Container teddycloud      Started                                                                                                                                                                                                                                                                                    4.1s
pi@teddycloud:/teddycloud/docker $ docker ps
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/containers/json": dial unix /var/run/docker.sock: connect: permission denied
pi@teddycloud:/teddycloud/docker $ sudo docker ps


after calling docker ps no response… the light on the zero 2 still blinks

My first setup on a raspi 4 works fine… tried to use that SDCard in Zero 2W but showed the same behaviour as described above… so i tried the completly new setup…

so. i am gone through the warnings/errors and try to solve them…

  1. Err:1 http://archive.raspberrypi.org/debian bullseye InRelease
    Temporary failure resolving ‘archive.raspberrypi.org
    → changed the name server:
    sudo sh -c 'echo "nameserver 8.8.8.8" >> /etc/resolv.conf'
  2. WARNING: No memory limit support & WARNING: No swap limit support
    → added cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 in /boot/cmdline.txt and did a reboot

Then i executed docker compose up (without -d)

pi@teddycloud:/teddycloud/docker $ sudo docker compose up
WARN[0001] /teddycloud/docker/docker-compose.yaml: `version` is obsolete
[+] Running 13/13
 ✔ teddycloud 12 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                                                                                                                                                         128.1s
   ✔ abb4a589b657 Pull complete                                                                                                                                                                                                                                                                                        27.7s
   ✔ 9c35c13352e9 Pull complete                                                                                                                                                                                                                                                                                        71.8s
   ✔ a161848d3784 Pull complete                                                                                                                                                                                                                                                                                         1.0s
   ✔ ba1b07b98f72 Pull complete                                                                                                                                                                                                                                                                                         1.9s
   ✔ cc479be08aac Pull complete                                                                                                                                                                                                                                                                                         3.1s
   ✔ 314df3bc2bd9 Pull complete                                                                                                                                                                                                                                                                                         4.7s
   ✔ 9caa3449c5bd Pull complete                                                                                                                                                                                                                                                                                        16.5s
   ✔ ad4b1696376b Pull complete                                                                                                                                                                                                                                                                                        21.8s
   ✔ e90e18c493a6 Pull complete                                                                                                                                                                                                                                                                                        43.5s
   ✔ 3da272b5c37e Pull complete                                                                                                                                                                                                                                                                                        48.7s
   ✔ 3c4284bde862 Pull complete                                                                                                                                                                                                                                                                                        48.4s
   ✔ f06db0af8c31 Pull complete                                                                                                                                                                                                                                                                                        50.9s
[+] Running 7/7
 ✔ Network docker_default    Created                                                                                                                                                                                                                                                                                    0.9s
 ✔ Volume "docker_certs"     Created                                                                                                                                                                                                                                                                                    0.0s
 ✔ Volume "docker_config"    Created                                                                                                                                                                                                                                                                                    0.0s
 ✔ Volume "docker_content"   Created                                                                                                                                                                                                                                                                                    0.0s
 ✔ Volume "docker_library"   Created                                                                                                                                                                                                                                                                                    0.0s
 ✔ Volume "docker_firmware"  Created                                                                                                                                                                                                                                                                                    0.0s
 ✔ Container teddycloud      Created                                                                                                                                                                                                                                                                                    2.1s
Attaching to teddycloud
teddycloud  | TeddyCloud v0.4.3 (2e75ee3) - 2024-03-30 11:27:16 +0000 linux-armv7l
teddycloud  |
teddycloud  | INFO |settings.c:0697:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
teddycloud  | WARN |settings.c:0705:settings_load_ovl| Config file does not exist, creating it...
teddycloud  | INFO |settings.c:0592:settings_save_ovl| Save settings to /teddycloud/config/config.overlay.ini
teddycloud  | INFO |settings.c:0697:settings_load_ovl| Load settings from /teddycloud/config/config.ini
teddycloud  | WARN |settings.c:0705:settings_load_ovl| Config file does not exist, creating it...
teddycloud  | INFO |settings.c:0592:settings_save_ovl| Save settings to /teddycloud/config/config.ini
teddycloud  | INFO |settings.c:0697:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
teddycloud  | INFO |tls_adapter.c:0394:tls_adapter_init| Loading certificates...
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/server/ca-root.pem' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/server/ca-root.pem' failed
teddycloud  | INFO |settings.c:1377:settings_load_certs_id| ********************************************
teddycloud  | INFO |settings.c:1378:settings_load_certs_id|    No certificates found. Generating.
teddycloud  | INFO |settings.c:1379:settings_load_certs_id|    This will take some time...
teddycloud  | INFO |settings.c:1380:settings_load_certs_id| ********************************************
teddycloud  | INFO |cert.c:0413:cert_generate_default| Generating CA certificate...
teddycloud  | INFO |cert.c:0042:cert_generate_rsa| Generating RSA Key... (slow!)
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:268:55: runtime error: left shift of 227 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:260:47: runtime error: left shift of 140 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:390:34: runtime error: left shift of 198 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:395:34: runtime error: left shift of 254 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:400:34: runtime error: left shift of 185 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:385:34: runtime error: left shift of 186 by 24 places cannot be represented in type 'int'
teddycloud  | src/cyclone/cyclone_crypto/mpi.c:792:48: runtime error: left shift of 176 by 24 places cannot be represented in type 'int'
teddycloud  | INFO |tls_adapter.c:0208:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
teddycloud  | INFO |tls_adapter.c:0205:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/server/teddy-cert.pem' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/server/teddy-cert.pem' failed
teddycloud  | INFO |cert.c:0442:cert_generate_default| Generating Server certificate...
teddycloud  | INFO |cert.c:0079:cert_load_ca| Load CA certificate...
teddycloud  | INFO |cert.c:0103:cert_load_ca| Load CA key...
teddycloud  | INFO |cert.c:0042:cert_generate_rsa| Generating RSA Key... (slow!)

teddycloud  | INFO |tls_adapter.c:0208:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
teddycloud  | INFO |tls_adapter.c:0205:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
teddycloud  | INFO |tls_adapter.c:0208:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
teddycloud  | INFO |tls_adapter.c:0205:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/ca.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/ca.der' failed
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/client.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/client.der' failed
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/private.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/private.der' failed
teddycloud  | INFO |settings.c:1382:settings_load_certs_id| ********************************************
teddycloud  | INFO |settings.c:1383:settings_load_certs_id|    FINISHED
teddycloud  | INFO |settings.c:1384:settings_load_certs_id| ********************************************
teddycloud  | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 0
teddycloud  | INFO |toniesJson.c:0294:tonies_readJson| Create empty json file
teddycloud  | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 0
teddycloud  | INFO |toniesJson.c:0294:tonies_readJson| Create empty json file
teddycloud  | INFO |toniesJson.c:0094:tonies_update| Updating tonies.json from api.revvox.de...
teddycloud  | INFO |cloud_request.c:0161:web_request| Connecting to HTTP server api.revvox.de:443...
teddycloud  | INFO |cloud_request.c:0211:web_request|   trying IP: 157.90.183.226
teddycloud  | INFO |cloud_request.c:0038:httpClientTlsInitCallbackBase| Initializing TLS...
teddycloud  | INFO |cloud_request.c:0073:httpClientTlsInitCallbackBase| Initializing TLS done
teddycloud  | src/cyclone/common/os_port_posix.c:527:22: runtime error: signed integer overflow: 1712321467 * 1000 cannot be represented in type 'long int'
teddycloud  | INFO |cloud_request.c:0311:web_request| HTTP code: 302
teddycloud  | INFO |cloud_request.c:0324:web_request| Redirecting to: https://raw.githubusercontent.com/toniebox-reverse-engineering/tonies-json/release/tonies.json
teddycloud  | INFO |cloud_request.c:0161:web_request| Connecting to HTTP server raw.githubusercontent.com:443...
teddycloud  | INFO |cloud_request.c:0211:web_request|   trying IP: 185.199.110.133
teddycloud  | INFO |cloud_request.c:0038:httpClientTlsInitCallbackBase| Initializing TLS...
teddycloud  | INFO |cloud_request.c:0073:httpClientTlsInitCallbackBase| Initializing TLS done
teddycloud  | INFO |cloud_request.c:0311:web_request| HTTP code: 200
teddycloud  | INFO |cloud_request.c:0374:web_request| Content-Type is text/plain; charset=utf-8
teddycloud  | INFO |cloud_request.c:0452:web_request| Connection closed
teddycloud  | INFO |toniesJson.c:0118:tonies_update| ... success updating tonies.json from api.revvox.de, reloading
teddycloud  | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 2
teddycloud  | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 4602343


Slow means really slow… but after teddycloud | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 4602343 it stops reacting… (no characters shown when hitting up or down)… and then putty mentions connection lost after some more minutes… but still blinking light… but ping IP not working anymore :frowning:

sooo. restarted zero2:


pi@teddycloud:/teddycloud/docker $ sudo docker compose up
WARN[0000] /teddycloud/docker/docker-compose.yaml: `version` is obsolete
[+] Running 1/0
 ✔ Container teddycloud  Created                                                                                                                                                                                                                                                                                        0.0s
Attaching to teddycloud
teddycloud  | TeddyCloud v0.4.3 (2e75ee3) - 2024-03-30 11:27:16 +0000 linux-armv7l
teddycloud  |
teddycloud  | INFO |settings.c:0697:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
teddycloud  | INFO |settings.c:0697:settings_load_ovl| Load settings from /teddycloud/config/config.ini
teddycloud  | INFO |tls_adapter.c:0208:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
teddycloud  | INFO |tls_adapter.c:0205:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
teddycloud  | INFO |tls_adapter.c:0208:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
teddycloud  | INFO |tls_adapter.c:0205:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/ca.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/ca.der' failed
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/client.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/client.der' failed
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/private.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/private.der' failed
teddycloud  | INFO |settings.c:0697:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini
teddycloud  | INFO |tls_adapter.c:0394:tls_adapter_init| Loading certificates...
teddycloud  | INFO |tls_adapter.c:0208:read_certificate| File '/teddycloud/certs/server/ca-root.pem' assumed PEM style
teddycloud  | INFO |tls_adapter.c:0205:read_certificate| File '/teddycloud/certs/server/ca-key.pem' detected as DER style RSA PRIVATE KEY
teddycloud  | INFO |tls_adapter.c:0208:read_certificate| File '/teddycloud/certs/server/teddy-cert.pem' assumed PEM style
teddycloud  | INFO |tls_adapter.c:0205:read_certificate| File '/teddycloud/certs/server/teddy-key.pem' detected as DER style RSA PRIVATE KEY
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/ca.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/ca.der' failed
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/client.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/client.der' failed
teddycloud  | ERROR|tls_adapter.c:0193:read_certificate| Failed to open '/teddycloud/certs/client/private.der' for cert type detection
teddycloud  | ERROR|tls_adapter.c:0380:load_cert| Loading cert '/teddycloud/certs/client/private.der' failed
teddycloud  | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 2
teddycloud  | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 4602343
teddycloud  | INFO |toniesJson.c:0094:tonies_update| Updating tonies.json from api.revvox.de...
teddycloud  | INFO |cloud_request.c:0161:web_request| Connecting to HTTP server api.revvox.de:443...
teddycloud  | INFO |cloud_request.c:0211:web_request|   trying IP: 157.90.183.226
teddycloud  | INFO |cloud_request.c:0038:httpClientTlsInitCallbackBase| Initializing TLS...
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:268:55: runtime error: left shift of 214 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:260:47: runtime error: left shift of 159 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:400:34: runtime error: left shift of 139 by 24 places cannot be represented in type 'int'
teddycloud  | INFO |cloud_request.c:0073:httpClientTlsInitCallbackBase| Initializing TLS done
teddycloud  | src/cyclone/common/os_port_posix.c:527:22: runtime error: signed integer overflow: 1712323466 * 1000 cannot be represented in type 'long int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:385:34: runtime error: left shift of 220 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:390:34: runtime error: left shift of 135 by 24 places cannot be represented in type 'int'
teddycloud  | cyclone/cyclone_crypto/cipher/aes.c:395:34: runtime error: left shift of 221 by 24 places cannot be represented in type 'int'
teddycloud  | src/cyclone/cyclone_crypto/mpi.c:792:48: runtime error: left shift of 177 by 24 places cannot be represented in type 'int'
teddycloud  | INFO |cloud_request.c:0311:web_request| HTTP code: 302
teddycloud  | INFO |cloud_request.c:0324:web_request| Redirecting to: https://raw.githubusercontent.com/toniebox-reverse-engineering/tonies-json/release/tonies.json
teddycloud  | INFO |cloud_request.c:0161:web_request| Connecting to HTTP server raw.githubusercontent.com:443...
teddycloud  | INFO |cloud_request.c:0211:web_request|   trying IP: 185.199.109.133
teddycloud  | INFO |cloud_request.c:0038:httpClientTlsInitCallbackBase| Initializing TLS...
teddycloud  | INFO |cloud_request.c:0073:httpClientTlsInitCallbackBase| Initializing TLS done
teddycloud  | INFO |cloud_request.c:0311:web_request| HTTP code: 200
teddycloud  | INFO |cloud_request.c:0374:web_request| Content-Type is text/plain; charset=utf-8
teddycloud  | INFO |cloud_request.c:0452:web_request| Connection closed
teddycloud  | INFO |toniesJson.c:0118:tonies_update| ... success updating tonies.json from api.revvox.de, reloading
teddycloud  | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.custom.json with size 2
teddycloud  | INFO |toniesJson.c:0196:tonies_readJson| Trying to read /teddycloud/config/tonies.json with size 4602343

seems to stopp again on the same spot

actually the container seems to be running, but i cannot reach it…
i can access the conter (docker exec -it …)

So. i made two changes at the same time… afterwards it works… but i am not able tell which one was the breaktrough… :face_with_open_eyes_and_hand_over_mouth:

  1. modified the composer.yaml and “enabled” the ports
  2. moved the folder teddycloud from / to ~/

Great, you had success fixing it.

It might be a permission issue in some way.

So. Kind of a summary:

First of all, teddycloud runs on a raspberry zero 2 w :slight_smile:

  1. Initial setup of teddycloud docker container takes a lot of time. Slow means really slow. Expect several minutes (approx. 20-30min can be expected!), just get a coffee or ice and wait.
  2. If you are a noob like me, just use the user home to clone the git repo of teddycloud.
  3. Adapt the docker-compose.yaml in teddycloud/docker and „enable“ the port mapping.
  4. If there is any warning in installation of anything like docker or so… use google to solve them first :wink: be sure someone else had the same problems and had asked for support already and someone gave a working solution, use that!

Some helpful links to set it up (besides the teddycloud documentation)

It’s really easy in the end :slight_smile: thanks again for the whole effort invested in this cool project!

1 Like

I also noticed some unresponsiveness on a Pi Zero 2w after a couple of days. Especially when I tried streaming and encoding. There might still be some memory leaks… probably it only gets noticed on these memory constrained devices.

Apart from that it’s working flawlessly on the Zero.

Yes, testing a live custom tag and removing that one caused a crash, but on second try it works fine.

Will keep an eye on that.

Thanks for figuring that out!

Off topic question: How is the performance using the of the Pi Zero 2 W as server?

Well depends on what your use case is :slight_smile:
Normally I use Teddycloud to upload content to our Tonie box. That doesn’t really use up any resources.

The Pi Zero 2w also runs some home automation (zigbee2mqtt, FHEM, HA-bridge) and easily copes with the additional Teddycloud task.