ayufan/pve-backup-server-dockerfiles

Login Issue on Synology

Opened this issue · 10 comments

Hi,
I try pve-backup on my Synology via Docker. Installation ok. But impossible to login. I try admin@pbs with pbspbs but it doesn't work. Any idea?

@Alainr69

#16 (comment)

Secondly, in most cases /run is missing which is not mounted to tmpfs.

I am also suffering the same problem with Synology NAS (DSM 7.1.1-42962 Update 3) using a DS916+ NAS.

Even, something like this doesn't work, or even manually done via docker cli is failing. Same issue. as #16

The version of docker thats installed on the Synology's is new enough IMHO, but still suffering this issue. However, kernel version is pritty old.

Linux nas01 3.10.108 #42962 SMP Tue Oct 18 15:05:36 CST 2022 x86_64 GNU/Linux synology_braswell_916+
root@nas01:~/docker/pbs# docker version
Client:
 Version:           20.10.3
 API version:       1.41
 Go version:        go1.17.1
 Git commit:        55f0773
 Built:             Thu Jul 21 10:23:46 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.3
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.1
  Git commit:       b487c8f
  Built:            Thu Jul 21 10:21:56 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.4.3
  GitCommit:        3fa00912415f3e9c6f82dd72119179d599efd13b
 runc:
  Version:          v1.0.0-rc93
  GitCommit:        31cc25f16f5eba4d0f53e35374532873744f4b31
 docker-init:
  Version:          0.19.0
  GitCommit:        ed96d00
---
version: '3.9'

services:
  pbs:
    image: ayufan/proxmox-backup-server
    container_name: pbs
    hostname: pbs
    network_mode: host
    mem_limit: 2G
    volumes:
      - /volume1/docker/pbs/conf_dir:/etc/proxmox-backup
      - /volume1/docker/pbs/lib_dir:/var/lib/proxmox-backup
      - /volume1/docker/pbs/logs_dir:/var/log/proxmox-backup
      - /volume1/docker/pbs/datastore_dir:/datastore
    tmpfs: /run
    cap_add: # smartctl support
      - SYS_RAWIO
    devices:
      - /dev/sda
      - /dev/sdb
      - /dev/sdc
      - /dev/sdd
    restart: unless-stopped
    stop_signal: SIGHUP

You can compile the patch easily using which is mentioned in #16 with the following steps:

cd /usr/src
git clone https://github.com/ayufan/pve-backup-server-dockerfiles.git
cd pve-backup-server-dockerfiles
wget https://raw.githubusercontent.com/jclab-joseph/pve-backup-server-dockerfiles/a350300b0f61a16728b91c0eb1f709e08e838c90/versions/v2.1.5/server/proxmox%7Efallback-o_tmpfile.patch -O 'versions/v2.1.5/server/proxmox~fallback-o_tmpfile.patch'
docker build --build-arg VERSION=v2.1.5 -t username/proxmox-backup-server .
docker push username/proxmox-backup-server 

<!> Please note, this patch will not work on 2.2.5 or greater. <!>

Thank you @jclab-joseph for figuring it out, all credit goes to him for creating patch.

I can confirm that this does work on Synology.

rhadw commented

I'm using a Synology NAS DS1621+ and I have found another way to make the latest version work and for this you will have to create your container from cmd like below:
docker run -d -it --hostname proxmox-backup-server --name proxmox-backup-server --mount type=tmpfs,destination=/run ayufan/proxmox-backup-server
It will launch a container which can be managed from the DSM interface afterwards.
The only downside I've encountered is that you will need to change the permissions on your backup folder to 775 but I don't know if that's happening because I'm not mounting the volumes in the default backup folder(btw, what's the default location?) or because it's a bug.
I don't know if this is the correct way but it's working and I'm happy.

scyto commented

I'm using a Synology NAS DS1621+ and I have found another way to make the latest version work and for this you will have to create your container from cmd like below: docker run -d -it --hostname proxmox-backup-server --name proxmox-backup-server --mount type=tmpfs,destination=/run ayufan/proxmox-backup-server It will launch a container which can be managed from the DSM interface afterwards. The only downside I've encountered is that you will need to change the permissions on your backup folder to 775 but I don't know if that's happening because I'm not mounting the volumes in the default backup folder(btw, what's the default location?) or because it's a bug. I don't know if this is the correct way but it's working and I'm happy.

I don't know why this works for you as:

  1. it doesn't have a port mapping and so would be inaccessible
  2. it also fails on DSM 7.1 with the same errors everyone else is getting

Could you supply more details on what you did to get this working and what kernel version AND DSM version your NAS is running?

(DSM 7.2 runs 4.4.302+ #64570 SMP - edit: confirmed DMS 7.2 works fine, downside many people on the thread have machines that won't ever get DSM7.2 ...)

I'm using a Synology NAS DS1621+ and I have found another way to make the latest version work and for this you will have to create your container from cmd like below: docker run -d -it --hostname proxmox-backup-server --name proxmox-backup-server --mount type=tmpfs,destination=/run ayufan/proxmox-backup-server It will launch a container which can be managed from the DSM interface afterwards. The only downside I've encountered is that you will need to change the permissions on your backup folder to 775 but I don't know if that's happening because I'm not mounting the volumes in the default backup folder(btw, what's the default location?) or because it's a bug. I don't know if this is the correct way but it's working and I'm happy.

I don't know why this works for you as:

1. it doesn't have a port mapping and so would be inaccessible

2. it also fails on DSM 7.1 with the same errors everyone else is getting

Could you supply more details on what you did to get this working and what kernel version AND DSM version your NAS is running?

(DSM 7.2 runs 4.4.302+ #64570 SMP - edit: confirmed DMS 7.2 works fine, downside many people on the thread have machines that won't ever get DSM7.2 ...)

I have a DS916+ here and just installed DSM 7.2 from Synology Download as it never showed in NAS's Admin webpage.

Sadly, I can confirm that while system is now DSM 7.2, its still not wokring and fails with auth issues. I believe this is because the kernel is still 3.10.

Linux NAS02 3.10.108 #69057 SMP Sat Sep 23 21:44:56 CST 2023 x86_64 GNU/Linux synology_braswell_916+
image

update

An intresting thing I found in the logs was:

==> logs_dir/api/auth.log <==
2023-11-04T21:43:42+00:00: authentication failure; rhost=[::ffff:172.16.254.3]:65118 user=admin@pbs msg=open tmpfile in "/run/proxmox-backup/shmem" failed - EISDIR: Is a directory

Please add this fallback fix for O_TMPFILE mainstream for sustainability of our world. Synology takes care of OS and kernels, it has in house maintained kernels and modules.

Is there already a workaround so that I can update from dsm 7.1 to 7.2 without any problems and still have pbs running?

Is there already a workaround so that I can update from dsm 7.1 to 7.2 without any problems and still have pbs running?

What exactly is the probem? I'm running DSM 7.2.1-69057 Update 3 and have no problems running this the container. I'm using the following docker run command:

docker run -d \
  --name=proxmox-backup \
  --hostname=xxx \
  --rm \
  -e TZ=Europe/Amsterdam \
  -p xxx:8007 \
  --tmpfs /run \
  -v /volume1/docker/proxmox-backup/backups:/backups \
  -v /volume1/docker/proxmox-backup/etc:/etc/proxmox-backup \
  -v /volume1/docker/proxmox-backup/logs:/var/log/proxmox-backup \
  -v /volume1/docker/proxmox-backup/lib:/var/lib/proxmox-backup \
  ayufan/proxmox-backup-server:latest

This is the output of docker version:

Client:
 Version:           20.10.23
 API version:       1.41
 Go version:        go1.19.1
 Git commit:        876964a
 Built:             Fri Sep  8 08:19:48 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.23
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.1
  Git commit:       5fcb1cf
  Built:            Fri Sep  8 08:18:18 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.6.15
  GitCommit:        b23a389d8c181697302d163356e97dec04eb8d88
 runc:
  Version:          v1.1.4
  GitCommit:        5af893d
 docker-init:
  Version:          0.19.0
  GitCommit:        ed96d00

I have now updated to this version and it works like perfect