Error "library initialization failed - unable to get max # of allocated fds" on starting swarmpit_app container
Unfortunatelly the "swarmpit_app" container is not starting . Log message: "library initialization failed - unable to get max # of allocated fds"
I'm running docker swarm on 2 Raspberry PI 4 (8GB) on Ubuntu 20.04 server 64bit For creating the swarmpit stack I used the arm docker compose file out of the repository.
Server Version: 19.03.8 Kernel Version: 5.4.0-1011-raspi Operating System: Ubuntu 20.04 LTS OSType: linux Architecture: aarch64 CPUs: 4 Total Memory: 7.628GiB
I get the same problem on Raspberry PI 4 (4GB) with Ubuntu 20.04 server 64bit
@lumir-mrkva can you check pls ?
Within the ARM compose file the treehouses/couchdb image can be replaced with the official couchdb image. (This is meanwhile available for arm64/v8)
Seeing this also on ubuntu 20.04, using the official couchdb image.
in the logs I'm seeing this from couchdb: db_1 | [error] 2020-06-21T18:29:17.543685Z nonode@nohost emulator -------- Error in process <0.1287.0> with exit value: db_1 | {database_does_not_exist,[{mem3_shards,load_shards_from_db,"_users",[{file,"src/mem3_shards.erl"},{line,395}]},{mem3_shards,load_shards_from_disk,1,[{file,"src/mem3_shards.erl"},{line,370}]},{mem3_shards,load_shards_from_disk,2,[{file,"src/mem3_shards.erl"},{line,399}]},{mem3_shards,for_docid,3,[{file,"src/mem3_shards.erl"},{line,86}]},{fabric_doc_open,go,3,[{file,"src/fabric_doc_open.erl"},{line,39}]},{chttpd_auth_cache,ensure_auth_ddoc_exists,2,[{file,"src/chttpd_auth_cache.erl"},{line,195}]},{chttpd_auth_cache,listen_for_changes,1,[{file,"src/chttpd_auth_cache.erl"},{line,142}]}]}
and swarmpit is reporting: library initialization failed - unable to get max # of allocated fds
Possibly related to this? https://github.com/seccomp/libseccomp/commit/7780b0853eff8521bbf79611656c68fadc1dab3d
I was able to get this running on Ubuntu 20.04 arm64 on a raspberry pi 4 by doing the following.
-
sudo apt-get install libseccomp-dev - Adding the environment variables to the couchdb container in docker-compose
COUCHDB_USER=admin COUCHDB_PASSWORD=password - Changing the connection string to include the user and password to the swarmpit container in docker-compose
I can confirm. With these changes swarmpit is running fine on Ubuntu 20.04 on the PI 4. Thanks Dustin.
Can you submit PR for the fix please ?
Can you submit PR for the fix please ?
I can. I will get it done sometime tommorrow.
Doesnt start on Manjaro Arm
docker service logs swarmpit_app swarmpit_app.1.k85k2txjxwa0@swarm-master | library initialization failed - unable to get max # of allocated fds swarmpit_app.1.obsr0ju2kr6q@swarm-master | library initialization failed - unable to get max # of allocated fds swarmpit_app.1.gtil54lps2xk@swarm-master | library initialization failed - unable to get max # of allocated fds swarmpit_app.1.cgqorkumfptj@swarm-master | library initialization failed - unable to get max # of allocated fds
Linux swarm-master 4.19.127-1-MANJARO-ARM #1 SMP PREEMPT Thu Jun 11 06:12:53 CDT 2020 aarch64 GNU/Linux
Docker version 19.03.12-ce, build 48a66213fe
Pi 4 (4GB)
version: '3.3'
services:
app:
image: swarmpit/swarmpit:latest
environment:
- SWARMPIT_DB=http://db:5984
- SWARMPIT_INFLUXDB=http://influxdb:8086
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 20001:8080
networks:
- net
deploy:
resources:
limits:
memory: 1024M
reservations:
memory: 256M
placement:
constraints:
- node.role == manager
db:
image: apache/couchdb:2.3.1
volumes:
- db-data:/opt/couchdb/data
networks:
- net
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
placement:
constraints:
- node.role == manager
influxdb:
image: influxdb:1.7
volumes:
- influx-data:/var/lib/influxdb
networks:
- net
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
placement:
constraints:
- node.role == manager
agent:
image: swarmpit/agent:latest
environment:
- DOCKER_API_VERSION=1.35
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- net
deploy:
mode: global
labels:
swarmpit.agent: 'true'
resources:
limits:
memory: 64M
reservations:
memory: 32M
networks:
net:
driver: overlay
attachable: true
volumes:
db-data:
driver_opts:
type: none
device: /opt/volume/swarmpit/db
o: bind
influx-data:
driver_opts:
type: none
device: /opt/volume/swarmpit/influx
o: bind
UPDATE: installed libseccomp, didnt help