nfc-developer / sdm-backend

Backend server for Secure Dynamic Messaging (SDM). Supports decryption of PICCData, SDMENCFileData, and validation of SDMMAC. Compatible with NTAG 424 DNA (both variants). Written in Python 3 Flask. Pull requests welcome.
MIT License
75 stars 39 forks source link

Docker Container Stuck #48

Closed bennettl closed 2 months ago

bennettl commented 2 months ago

Hello,

I tried executing the docker command as instructured

docker run     -p 5000:80     -e MASTER_KEY=00000000000000000000000000000000     icedevml/sdm-backend:latest

And received this log message, wasn't able to access the container via port 5000, seems to be stuck.

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Checking for script in /app/prestart.sh
Running script /app/prestart.sh
Running inside /app/prestart.sh, you could add migrations to this file, e.g.:

#! /usr/bin/env sh

# Let the DB start
sleep 10;
# Run migrations
alembic upgrade head

/usr/lib/python3/dist-packages/supervisor/options.py:474: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  self.warnings.warn(
2024-09-02 05:17:20,388 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-09-02 05:17:20,389 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2024-09-02 05:17:20,399 INFO RPC interface 'supervisor' initialized
2024-09-02 05:17:20,399 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-09-02 05:17:20,400 INFO supervisord started with pid 1
2024-09-02 05:17:21,428 INFO spawned: 'quit_on_failure' with pid 16
2024-09-02 05:17:21,438 INFO spawned: 'nginx' with pid 18
2024-09-02 05:17:21,446 INFO spawned: 'uwsgi' with pid 20
2024-09-02 05:17:21,512 INFO success: nginx entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2024-09-02 05:17:21,513 INFO success: uwsgi entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
[uWSGI] getting INI configuration from /app/uwsgi.ini
[uWSGI] getting INI configuration from /etc/uwsgi/uwsgi.ini

;uWSGI instance configuration
[uwsgi]
ini = /app/uwsgi.ini
module = app
callable = app
uid = nobody
gid = nogroup
processes = 16
cheaper = 2
ini = /etc/uwsgi/uwsgi.ini
socket = /tmp/uwsgi.sock
chown-socket = nginx:nginx
chmod-socket = 664
hook-master-start = unix_signal:15 gracefully_kill_them_all
need-app = true
die-on-term = true
show-config = true
;end of configuration

*** Starting uWSGI 2.0.21 (64bit) on [Mon Sep  2 05:17:21 2024] ***
compiled with version: 10.2.1 20210110 on 28 August 2023 00:19:00
os: Linux-5.15.49-linuxkit #1 SMP PREEMPT Tue Sep 13 07:51:32 UTC 2022
nodename: e7bbc26ece43
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 5
current working directory: /app
detected binary path: /usr/local/bin/uwsgi
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
!!! it looks like your kernel does not support pthread robust mutexes !!!
!!! falling back to standard pthread mutexes !!!
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /tmp/uwsgi.sock fd 3
setgid() to 65534
setuid() to 65534
Python version: 3.10.13 (main, Aug 26 2023, 00:59:23) [GCC 10.2.1 20210110]
2024/09/02 05:17:21 [emerg] 26#26: io_setup() failed (38: Function not implemented)
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x400018dec0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 1239640 bytes (1210 KB) for 16 cores
*** Operational MODE: preforking ***
WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x400018dec0 pid: 20 (default app)
2024-09-02 05:17:22,576 INFO success: quit_on_failure entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 20)
spawned uWSGI worker 1 (pid: 31, cores: 1)
spawned uWSGI worker 2 (pid: 33, cores: 1)
running "unix_signal:15 gracefully_kill_them_all" (master-start)...
icedevml commented 2 months ago

Hello, please note that this Docker image is only intended for running on x86_64 platform, while you are doing so on arm64. That is most probably the reason of the container going stuck. Right now we don't provide any builds for arm64. Sorry for late reply.

icedevml commented 2 months ago

We've released a new version which supposedly should also support arm64. Please see the :latest tag.