Teddycloud on Raspberry Pi/Portainer Help: ERROR: AddressSanitizer: out of memory

Hey there, since I’m absolutley new to this (Raspberry, Docker, Portainer, Teddycloud) and Teddycloud on my Docker-Portainer on my Raspberry won’t run i’m hoping to find help here.

I am using a Raspberry PI 3 B V1.2 with 1GB RAM and Raspberry PI OS 32-Bit Lite with latest updates from today.

Docker with Portainer is running, i can log in and i’ve added a new Stack like discribed on Github “docker-compose.yaml”

Is the Raspberry RAM to small or did i setup something wrong?

Thank you!

Here is the Log from Portainer:

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/teddy-cert.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/teddy-key.pem’ detected as DER style RSA PRIVATE KEY

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/ca.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/ca.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/client.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/client.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/private.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/private.der’ failed

==9==ERROR: AddressSanitizer: out of memory: failed to allocate 0xb09000 (11571200) bytes of FakeStack (error code: 12)

ERROR: Failed to mmap

Running teddycloud…

TeddyCloud v0.6.4 (f13703a) - 2025-03-05 08:01:37 +0000 ubuntu linux-armv7l(32)

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.ini

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/ca-root.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/ca-key.pem’ detected as DER style RSA PRIVATE KEY

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/teddy-cert.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/teddy-key.pem’ detected as DER style RSA PRIVATE KEY

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/ca.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/ca.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/client.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/client.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/private.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/private.der’ failed

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini

INFO |tls_adapter.c:0390:tls_adapter_init| Loading certificates…

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/ca-root.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/ca-key.pem’ detected as DER style RSA PRIVATE KEY

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/teddy-cert.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/teddy-key.pem’ detected as DER style RSA PRIVATE KEY

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/ca.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/ca.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/client.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/client.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/private.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/private.der’ failed

ERROR|server.c:0877:server_init| httpServerStart() for HTTPS failed with code 101

==8==ERROR: AddressSanitizer: out of memory: failed to allocate 0xb09000 (11571200) bytes of FakeStack (error code: 12)

ERROR: Failed to mmap

Running teddycloud…

TeddyCloud v0.6.4 (f13703a) - 2025-03-05 08:01:37 +0000 ubuntu linux-armv7l(32)

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.ini

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/ca-root.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/ca-key.pem’ detected as DER style RSA PRIVATE KEY

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/teddy-cert.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/teddy-key.pem’ detected as DER style RSA PRIVATE KEY

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/ca.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/ca.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/client.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/client.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/private.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/private.der’ failed

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini

INFO |tls_adapter.c:0390:tls_adapter_init| Loading certificates…

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/ca-root.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/ca-key.pem’ detected as DER style RSA PRIVATE KEY

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/teddy-cert.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/teddy-key.pem’ detected as DER style RSA PRIVATE KEY

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/ca.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/ca.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/client.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/client.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/private.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/private.der’ failed

==8==ERROR: AddressSanitizer: out of memory: failed to allocate 0xb09000 (11571200) bytes of FakeStack (error code: 12)

ERROR: Failed to mmap

Running teddycloud…

TeddyCloud v0.6.4 (f13703a) - 2025-03-05 08:01:37 +0000 ubuntu linux-armv7l(32)

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.ini

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/ca-root.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/ca-key.pem’ detected as DER style RSA PRIVATE KEY

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/teddy-cert.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/teddy-key.pem’ detected as DER style RSA PRIVATE KEY

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/ca.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/ca.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/client.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/client.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/private.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/private.der’ failed

INFO |settings.c:0860:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini

INFO |tls_adapter.c:0390:tls_adapter_init| Loading certificates…

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/ca-root.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/ca-key.pem’ detected as DER style RSA PRIVATE KEY

INFO |tls_adapter.c:0204:read_certificate| File ‘/teddycloud/certs/server/teddy-cert.pem’ assumed PEM style

INFO |tls_adapter.c:0201:read_certificate| File ‘/teddycloud/certs/server/teddy-key.pem’ detected as DER style RSA PRIVATE KEY

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/ca.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/ca.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/client.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/client.der’ failed

ERROR|tls_adapter.c:0189:read_certificate| Failed to open ‘/teddycloud/certs/client/private.der’ for cert type detection

ERROR|tls_adapter.c:0376:load_cert| Loading cert ‘/teddycloud/certs/client/private.der’ failed

==8==ERROR: AddressSanitizer: out of memory: failed to allocate 0xb09000 (11571200) bytes of FakeStack (error code: 12)

ERROR|server.c:0877:server_init| httpServerStart() for HTTPS failed with code 101

ERROR: Failed to mmap

You are running out of memory.

I would remove pertainer and use plain docker, portainer is not necessary at all.

You might also think about using a better raspberry.

Hi henryk,

Thank you for your quick reply. So I was on the right path that the 1GB Ram are maybe too little for running all that.

Since I have no experience, how can I install Teddycloud on docker without Portainer?

Thank you!

Just install docker (you should have that already), then create a folder for teddycloud, add the docker compose yaml. And then execute in that folder docker compose pull and then docker compose up -d

Hi henryk,

thank you one more time. I’ve deleted Portainer and created a folder “teddycloud” and in that folder I put the docker compose yaml file. But I think I’m still doing something wrong… did I put the yaml file in the wrong folder?

Thank you!

Add a „sudo “ to both commands in front. (In many docker tutorials there is a command that docker commands are run as root automatically.)

thank you, that worked, I think

that will take some time till the container is running? Where I can then find out the IP-Adress?

On first run it will take quite a time (20-30min) as it creates the server certificates.

Ip is the devices ip. If you need another, you have to modify the yaml and add macvlan for example

Ok, thank you! I’ll check it tomorrow

Hi Henryk, sorry for late reply! I Checked on the other day, but again had no Teddycloud running, Log error again …AddressSanitizer: out of memory…

So I changed Raspberry OS lite from 32bit to 64bit and installed everything new, but in the end the same error again. After some research online, I found out that the error was in yaml file…

had to change this: “image: ghcr.io/toniebox-reverse-engineering/teddycloud:latest

to: “…:latest_debian”

with this yaml everything worked and on the other day Teddycloud was running on the raspi :slight_smile: :grinning:

So today I started with my CC3200 Box Flashing - so far so good, but when I follow the guide for flashing in Teddycloud, I can’t Create a custom URL Patch (altUrl.custom.305.json) because the IP of my Raspi where Teddycloud is running on is longer than 12 characters. So I decided to add the full IP manually in the " altUrl.custom.305.json" - put all the files on the SD-Card of the Box and after freshness-check I get the Codeword “OWL”. So can the to long IP-Address be the error here? Boxine and Teddycloud is green, that should be ok, I think…

grafik

Thank you!

There is a reason why it is limited to 12 characters. You’ll need to use a different IP or a domain name like with the Fritzbox or .revvox patches.

Now it works! I’ve changed the IP-Adress in my Fritzbox and created a new Custom URL Patch and it works. Thanks to henryk and 0xbadbee too for your help, we are so lucky now!

Bye!!!