scireum / s3ninja

S3 ninja emulates the Amazon S3 API for developement and test purposes
MIT License
494 stars 91 forks source link

pthread_create failed (EPERM) when I try to start version 8.0.0 and latest from docker-compose #205

Open Plaoo opened 2 years ago

Plaoo commented 2 years ago

Hello everyone I am trying to start s3ninja through docker-compose, precisely the latest version and 8.0.0, but I have the following problem:

s3-ninja   | [0.014s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
s3-ninja   | [0.015s][error  ][gc,task  ] Failed to create worker thread

If I try an older version instead I can't upload files through the ui (I'm talking about version 6)

my docker-compose:

version: "3.7"

services:
  file-storage-app:
        restart: unless-stopped
        container_name: ${SERVICE_NAME}_${ENV}_${PREFIX}
        build: .
        ports:
            - ${PORT}:${PORT}

  ninja:
    container_name: s3-ninja
    image: scireum/s3-ninja:8.0.0 #latest
    restart: always
    ports:
      - 9444:9000
    tmpfs:
      - "/home/sirius/data/${NINJA_BUCKET}/:uid=2000,gid=2000"
networks:
    default:
        name:
            net_${ENV}_${PREFIX}_backend

docker:

docker-compose version 1.29.2
Docker version 20.10.3

OS: Fedora 36

hggh commented 2 years ago

what architecture are you using on your host and the docker container?

Plaoo commented 2 years ago

$ docker buildx ls NAME/NODE DRIVER/ENDPOINT STATUS PLATFORMS default * docker default default running linux/amd64, linux/386

hggh commented 2 years ago

found the problem, working on a fix

hggh commented 2 years ago

@Plaoo Please use the new version:

scireum/s3-ninja:8.1.0
stefaniproov commented 2 years ago

@hggh I'm getting the exact same error on a remote pipeline with CentOS Linux release 7.8.2003 even with version 8.1.0 Docker version 19.03.12

hggh commented 2 years ago

@hggh I'm getting the exact same error on a remote pipeline with CentOS Linux release 7.8.2003 even with version 8.1.0 Docker version 19.03.12

I have tested the 8.1.0 docker image arm64 on an Mac Pro M1 wtih Docker Desktop. It seems to work. On what platform do you run your docker image?

stefaniproov commented 2 years ago

@hggh It's amd64 linux on a remote server via Azure pipelines, works perfectly fine on my local machine with arm64 M1 as well

markplindsay commented 1 year ago

I'm getting the same error when I try to use scireum/s3-ninja:latest on CircleCI.

Here's their docker setup—it's whatever the standard one is:

Server Engine Details:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       b0f5bc3
  Built:            2021-06-02T11:54:50.000000000+00:00
  OS/Arch:          linux/amd64
  Experimental:     false

docker-compose.test.yml:

redacted-s3-test:
  image: scireum/s3-ninja:latest
  expose:
    - 9000
  networks:
    - redacted-test

Console output:

project-redacted-s3-****-1  | SIRIUS Launch Utility
project-redacted-s3-****-1  | =====================
project-redacted-s3-****-1  | 
project-redacted-s3-****-1  | No JAVA_XMX present - using defaults...
project-redacted-s3-****-1  | No JAVA_OPTS present - using defaults...
project-redacted-s3-****-1  | Starting java -server -Xmx1024m -Djava.net.preferIPv4Stack=true -Dconsole=true -DdisableLogfile=true -Djava.awt.headless=true IPL
project-redacted-s3-****-1  | 
project-redacted-s3-****-1  | 
project-redacted-s3-****-1  | [0.075s][warning][os,thread] Failed to start thread "GC Thread#0" - pthread_create failed (EPERM) for attributes: stacksize: 1024k, guardsize: 4k, detached.
project-redacted-s3-****-1  | [0.075s][error  ][gc,task  ] Failed to create worker thread
DavidMStraub commented 1 year ago

Hi, I get the same error running docker run -p 9444:9000 scireum/s3-ninja:latest on my local Ubuntu machine. Tried with 8.1.0, 8.2.0, 8.3.0 as well, same result.

uname -a
Linux <redacted> 5.19.0-38-generic #39-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 17:33:16 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.10
Release:        22.10
Codename:       kinetic

docker --version
Docker version 20.10.2, build 2291f61
jakobvogel commented 1 year ago

@hggh 👀

hggh commented 1 year ago

docker --version Docker version 20.10.2, build 2291f61


@DavidMStraub your Docker Version seems to be a bit old, could you install the docker-ce packages from:
https://docs.docker.com/engine/install/ubuntu/

and give it a try?

hggh commented 1 year ago

more information on that issue: https://github.com/adoptium/containers/issues/215#issuecomment-1142046045

or short: update your docker :)

DavidMStraub commented 1 year ago

Indeed, that fixed it for me :slightly_smiling_face:

AriBerisha commented 4 months ago

Thankyou everyone in this thread! For anyone else running into this issue in kubernetes using old docker runtime, to debug this issue try using:

    securityContext:
      seccompProfile:
        type: Unconfined
fabtrompet commented 2 weeks ago

Thankyou everyone in this thread! For anyone else running into this issue in kubernetes using old docker runtime, to debug this issue try using:

    securityContext:
      seccompProfile:
        type: Unconfined

thank you @AriBerisha its work for me