Hallo,
ich wollte einen SMB Share in meinen LXC Container einbinden und darauf Docker Volumes speichern.
Das funktioniert aber nicht.
Hier mal alle Schritte, die ich gemacht habe.
Host
Danach habe ich den SMB Share von meinem Truenas Server am Proxmox Server gemounted und dann im LXC Container eingebunden, Habe dabei diesem Tutorial gefolgt.
Danach sah es so aus.
Das docker-compose.yml File sieht dann so aus.
Das habe ich dann gestartet, hat jedoch nicht funktioniert.
Ich habe einen Beitrag mit einem ähnlichen Fehler gefunden, also habe ich den Docker Storage Treiber auf vfs geändert.
Danach hat es gestartet. Jedoch hat die Datenbank einen Fehler.
Ich habe auch versucht, mit PUID und PGID 1000, aber kommt gleicher Fehler
Ich habe es auch probiert, ohne MarinDB
Könnt ihr mir da weiter helfen, was ich Falsch gemacht habe oder Anders gehört?
Danke im vorraus.
ich wollte einen SMB Share in meinen LXC Container einbinden und darauf Docker Volumes speichern.
Das funktioniert aber nicht.
Hier mal alle Schritte, die ich gemacht habe.
Host
- Proxmox version 8.0.4
- Boot drive 2x500gb nvme SSD im zfs mirror
- Unpriviligirter container 12 gb disk
- 512mb ram
- 1 core
- Static ip
Danach habe ich den SMB Share von meinem Truenas Server am Proxmox Server gemounted und dann im LXC Container eingebunden, Habe dabei diesem Tutorial gefolgt.
Danach sah es so aus.
Bash:
cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
//192.168.0.52/ReverseProxyManager /mnt/pve/ctReverseProxyManager/ReverseProxyManager cifs _netdev,x-systemd.automount,noatime,uid=101000,gid=101000,dir_mode=0770,file_mode=0770,credentials=/root/.ctReverseProxyManager 0 0
Bash:
cat /etc/pve/lxc/103.conf
arch: amd64
cores: 1
features: nesting=1
hostname: ctReverseProxyManager
memory: 512
mp0: /mnt/pve/ctReverseProxyManager/ReverseProxyManager,mp=/mnt/ReverseProxyManager
net0: name=eth0,bridge=vmbr0,firewall=1,gw=192.168.0.1,hwaddr=52:2C:0F:3C:76:96,ip=192.168.0.53/24,ip6=dhcp,type=veth
onboot: 1
ostype: ubuntu
protection: 0
rootfs: local-zfs:subvol-103-disk-0,size=12G
startup: order=2
swap: 0
unprivileged: 1
Das docker-compose.yml File sieht dann so aus.
Bash:
cat docker-compsoe.yml
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
# These ports are in format <host-port>:<container-port>
- '80:80' # Public HTTP Port
- '443:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
environment:
# Mysql/Maria connection parameters:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "npm"
DB_MYSQL_NAME: "npm"
# Uncomment this if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- /mnt/ReverseProxyManager/data:/data
- /mnt/ReverseProxyManager/letsencrypt:/etc/letsencrypt
depends_on:
- db
db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- /mnt/ReverseProxyManager/mysql:/var/lib/mysql
Das habe ich dann gestartet, hat jedoch nicht funktioniert.
Bash:
[+] Running 40/42
⠼ db 7 layers [⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulling 44.4s
✔ df20fa9351a1 Pull complete 26.7s
...
✔ edf866f7abc9 Download complete 28.1s
...
⠸ app 33 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulling 44.4s
✔ 3240fe174df9 Pull complete 12.1s
...
failed to register layer: unlinkat /var/cache/debconf: invalid argument
Ich habe einen Beitrag mit einem ähnlichen Fehler gefunden, also habe ich den Docker Storage Treiber auf vfs geändert.
Danach hat es gestartet. Jedoch hat die Datenbank einen Fehler.
Bash:
docker logs reverseproxymanager-db-1
[i] pre-init.d - processing /scripts/pre-init.d/01_secret-init.sh
[i] mysqld not found, creating....
[i] MySQL data directory not found, creating initial DBs
2023-08-13 21:03:35 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied")
2023-08-13 21:03:35 0 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2023-08-13 21:03:35 0 [ERROR] Plugin 'Aria' init function returned error.
2023-08-13 21:03:35 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2023-08-13 21:03:35 0 [ERROR] Failed to initialize plugins.
2023-08-13 21:03:35 0 [ERROR] Aborting
[i] Creating database: npm
[i] with character set: 'utf8' and collation: 'utf8_general_ci'
[i] Creating user: npm with password npm
2023-08-13 21:03:35 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 49 ...
2023-08-13 21:03:35 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied")
2023-08-13 21:03:35 0 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2023-08-13 21:03:35 0 [ERROR] Plugin 'Aria' init function returned error.
2023-08-13 21:03:35 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2023-08-13 21:03:35 0 [Note] Plugin 'InnoDB' is disabled.
2023-08-13 21:03:35 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-08-13 21:03:35 0 [ERROR] Failed to initialize plugins.
2023-08-13 21:03:35 0 [ERROR] Aborting
/scripts/run.sh: ignoring or entrypoint initdb empty /docker-entrypoint-initdb.d/*
MySQL init process done. Ready for start up.
exec /usr/bin/mysqld --user=mysql --console --skip-name-resolve --skip-networking=0
2023-08-13 21:03:35 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 1 ...
2023-08-13 21:03:35 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied")
2023-08-13 21:03:35 0 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2023-08-13 21:03:35 0 [ERROR] Plugin 'Aria' init function returned error.
2023-08-13 21:03:35 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2023-08-13 21:03:35 0 [Note] Plugin 'InnoDB' is disabled.
2023-08-13 21:03:35 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-08-13 21:03:35 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2023-08-13 21:03:35 0 [ERROR] Failed to initialize plugins.
2023-08-13 21:03:35 0 [ERROR] Aborting
Bash:
docker logs reverseproxymanager-app-1
❯ Configuring npm user ...
❯ Configuring npm group ...
❯ Checking paths ...
❯ Setting ownership ...
❯ Dynamic resolvers ...
❯ IPv6 ...
Enabling IPV6 in hosts in: /etc/nginx/conf.d
- /etc/nginx/conf.d/default.conf
- /etc/nginx/conf.d/include/ip_ranges.conf
- /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
- /etc/nginx/conf.d/include/resolvers.conf
- /etc/nginx/conf.d/include/force-ssl.conf
- /etc/nginx/conf.d/include/assets.conf
- /etc/nginx/conf.d/include/ssl-ciphers.conf
- /etc/nginx/conf.d/include/proxy.conf
- /etc/nginx/conf.d/include/block-exploits.conf
- /etc/nginx/conf.d/production.conf
Enabling IPV6 in hosts in: /data/nginx
❯ Docker secrets ...
-------------------------------------
_ _ ____ __ __
| \ | | _ \| \/ |
| \| | |_) | |\/| |
| |\ | __/| | | |
|_| \_|_| |_| |_|
-------------------------------------
User: npm PUID:0 ID:0 GROUP:0
Group: npm PGID:0 ID:0
-------------------------------------
❯ Starting nginx ...
❯ Starting backend ...
[8/13/2023] [9:03:36 PM] [Global ] › ℹ info Using MySQL configuration
[8/13/2023] [9:03:36 PM] [Global ] › ℹ info Creating a new JWT key pair...
[8/13/2023] [9:03:40 PM] [Global ] › ℹ info Wrote JWT key pair to config file: /data/keys.json
[8/13/2023] [9:03:40 PM] [Global ] › ✖ error getaddrinfo ENOTFOUND db
...
[8/13/2023] [9:03:44 PM] [Global ] › ✖ error connect ECONNREFUSED 172.18.0.2:3306
Ich habe auch versucht, mit PUID und PGID 1000, aber kommt gleicher Fehler
Ich habe es auch probiert, ohne MarinDB
Bash:
docker logs reverseproxymanager-app-1
❯ Configuring npm user ...
❯ Configuring npm group ...
❯ Checking paths ...
❯ Setting ownership ...
❯ Dynamic resolvers ...
❯ IPv6 ...
Enabling IPV6 in hosts in: /etc/nginx/conf.d
- /etc/nginx/conf.d/include/proxy.conf
- /etc/nginx/conf.d/include/ip_ranges.conf
- /etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
- /etc/nginx/conf.d/include/assets.conf
- /etc/nginx/conf.d/include/block-exploits.conf
- /etc/nginx/conf.d/include/ssl-ciphers.conf
- /etc/nginx/conf.d/include/resolvers.conf
- /etc/nginx/conf.d/include/force-ssl.conf
- /etc/nginx/conf.d/default.conf
- /etc/nginx/conf.d/production.conf
Enabling IPV6 in hosts in: /data/nginx
❯ Docker secrets ...
-------------------------------------
_ _ ____ __ __
| \ | | _ \| \/ |
| \| | |_) | |\/| |
| |\ | __/| | | |
|_| \_|_| |_| |_|
-------------------------------------
User: npm PUID:1000 ID:1000 GROUP:1000
Group: npm PGID:1000 ID:1000
-------------------------------------
❯ Starting nginx ...
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:4
❯ Starting backend ...
[8/14/2023] [9:19:45 PM] [Global ] › ℹ info Using Sqlite: /data/database.sqlite
[8/14/2023] [9:19:47 PM] [Global ] › ✖ error create table `knex_migrations` (`id` integer not null primary key autoincrement, `name` varchar(255), `batch` integer, `migration_time` datetime) - SQLITE_BUSY: database is locked
Könnt ihr mir da weiter helfen, was ich Falsch gemacht habe oder Anders gehört?
Danke im vorraus.