toniebox-reverse-engineering / teddycloud

teddyCloud is an open source server replacement for the Boxine Cloud
https://toniebox-reverse-engineering.github.io/docs/tools/teddycloud/
GNU General Public License v2.0
478 stars 36 forks source link

TeddyCloud v0.6.1 HTTP failed with code 101 #226

Closed MaObOriginal closed 1 month ago

MaObOriginal commented 1 month ago

Hello, I am currently trying to get Teddycloud running via Docker on my Raspberry Pi. I have assigned an exclusive IP to the container via MACVLAN. After the server certificates have been created, the HTTP server does not start and stops with the error 101. Do I have an error in my Docker config or what is the reason for this?

INFO |settings.c:0828: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 INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY ERROR|server.c:0863:server_init| httpServerStart() for HTTP failed with code 101

================================================================= ==8==ERROR: LeakSanitizer: detected memory leaks Direct leak of 624 byte(s) in 1 object(s) allocated from:

0 0x6d0fce in __interceptor_malloc (/usr/local/bin/teddycloud+0x280fce)

#1 0xa9874a in socketOpen src/platform/platform_linux.c:48
#2 0x901b00 in httpServerInit src/cyclone/cyclone_tcp/http/http_server.c:169
#3 0x7c8942 in server_init src/server.c:851
#4 0x65dd54 in main src/main.c:602
#5 0xb695f396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#6 0xb695f43a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Thanks in advance for your help.

SciLor commented 1 month ago

101 means that there are not enough system resources.

MaObOriginal commented 1 month ago

According to the supported hardware, an RPi4 can be used, how can I control the resources for Teddybench?

https://tonies-wiki.revvox.de/docs/tools/teddycloud/setup/supported-server-hardware/

henryk86 commented 1 month ago

What else is running on that raspi?

MaObOriginal commented 1 month ago

Hello,

only a portainer agent. Its Pi4 with 4GB of RAM.

henryk86 commented 1 month ago

This happens on every start?

MaObOriginal commented 4 weeks ago

Yes, directly and it repeats.

TeddyCloud v0.6.1 (0411205) - 2024-10-05 12:58:04 +0000 ubuntu linux-armv7l(32)

INFO |settings.c:0828:settings_load_ovl| Load settings from /teddycloud/config/config.overlay.ini src/cyclone/common/os_port_posix.c:523:22: runtime error: signed integer overflow: -1096198284 * 1000 cannot be represented in type 'long int' INFO |settings.c:0828: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 INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY INFO |settings.c:0828: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 INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/ca.der' detected as DER style CERTIFICATE INFO |tls_adapter.c:0197:read_certificate| File '/teddycloud/certs/client/client.der' detected as DER style CERTIFICATE INFO |tls_adapter.c:0201:read_certificate| File '/teddycloud/certs/client/private.der' detected as DER style RSA PRIVATE KEY ERROR|server.c:0863:server_init| httpServerStart() for HTTP failed with code 101

================================================================= ==9==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 624 byte(s) in 1 object(s) allocated from:

0 0x6a0fce in __interceptor_malloc (/usr/local/bin/teddycloud+0x280fce)

#1 0xa6874a in socketOpen src/platform/platform_linux.c:48
#2 0x8d1b00 in httpServerInit src/cyclone/cyclone_tcp/http/http_server.c:169
#3 0x798942 in server_init src/server.c:851
#4 0x62dd54 in main src/main.c:602
#5 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#6 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Direct leak of 624 byte(s) in 1 object(s) allocated from:

0 0x6a0fce in __interceptor_malloc (/usr/local/bin/teddycloud+0x280fce)

#1 0xa6874a in socketOpen src/platform/platform_linux.c:48
#2 0x8d1b00 in httpServerInit src/cyclone/cyclone_tcp/http/http_server.c:169
#3 0x79891a in server_init src/server.c:839
#4 0x62dd54 in main src/main.c:602
#5 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#6 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Direct leak of 624 byte(s) in 1 object(s) allocated from:

0 0x6a0fce in __interceptor_malloc (/usr/local/bin/teddycloud+0x280fce)

#1 0xa6874a in socketOpen src/platform/platform_linux.c:48
#2 0x8d1b00 in httpServerInit src/cyclone/cyclone_tcp/http/http_server.c:169
#3 0x79892e in server_init src/server.c:845
#4 0x62dd54 in main src/main.c:602
#5 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#6 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Direct leak of 523 byte(s) in 20 object(s) allocated from:

0 0x6a0fce in __interceptor_malloc (/usr/local/bin/teddycloud+0x280fce)

#1 0x79b6a2 in custom_asprintf src/server_helpers.c:40
#2 0x787b8a in mqtt_init src/mqtt.c:948
#3 0x62dd26 in main src/main.c:601
#4 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#5 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Direct leak of 443 byte(s) in 20 object(s) allocated from:

0 0x6a0fce in __interceptor_malloc (/usr/local/bin/teddycloud+0x280fce)

#1 0x77fd0e in mqtt_topic_str src/mqtt.c:86
#2 0x787bf2 in mqtt_init src/mqtt.c:950
#3 0x62dd26 in main src/main.c:601
#4 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#5 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Direct leak of 423 byte(s) in 20 object(s) allocated from:

0 0x6a0fce in __interceptor_malloc (/usr/local/bin/teddycloud+0x280fce)

#1 0x77fd0e in mqtt_topic_str src/mqtt.c:86
#2 0x787bc2 in mqtt_init src/mqtt.c:949
#3 0x62dd26 in main src/main.c:601
#4 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#5 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Direct leak of 223 byte(s) in 20 object(s) allocated from:

0 0x6a0fce in __interceptor_malloc (/usr/local/bin/teddycloud+0x280fce)

#1 0x77fbba in mqtt_settingname_clean src/mqtt.c:58
#2 0x787b04 in mqtt_init src/mqtt.c:946
#3 0x62dd26 in main src/main.c:601
#4 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#5 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Direct leak of 1 byte(s) in 1 object(s) allocated from:

0 0x65ba2e in strdup (/usr/local/bin/teddycloud+0x23ba2e)

#1 0x7985d6 in server_init src/server.c:821
#2 0x62dd54 in main src/main.c:602
#3 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#4 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

Direct leak of 1 byte(s) in 1 object(s) allocated from:

0 0x65ba2e in strdup (/usr/local/bin/teddycloud+0x23ba2e)

#1 0x798764 in server_init src/server.c:829
#2 0x62dd54 in main src/main.c:602
#3 0xb68d7396  (/lib/arm-linux-gnueabihf/libc.so.6+0x1f396)
#4 0xb68d743a in __libc_start_main (/lib/arm-linux-gnueabihf/libc.so.6+0x1f43a)

SUMMARY: AddressSanitizer: 3486 byte(s) leaked in 85 allocation(s).

henryk86 commented 4 weeks ago

Can you post your docker-compose.json?

maybe you should delete the container and create a completely new one?