mbentley / docker-timemachine

Docker image to run Samba (compatible Time Machine for macOS)
Apache License 2.0
527 stars 65 forks source link

TimeMachine Avahi not findable (macvlan) #126

Closed manoloxxl closed 1 year ago

manoloxxl commented 1 year ago

Describe the Bug

Hi,

I'm running smb-amd64 image and used the default avahi config from documentation. As the OS ist LibreElec i decided to use macvlan to get a own ip and not avahi conflicts.

The container is starting but i cannot find the created timemachine. As this is my first try with avahi, i am not sure if i search it right way.

I've expected that the device should be found automaticaly when i add a timemachine volume in timemachine settings or when i open finder > network.

But nowhere the device is visible.

I can ping it by ip or hostname.

Anybody may can help me?

Best Regards

Manuel

Expected Behavior

TimeMachine should be visible in finder & settings > timemachine > add volume

Steps to Reproduce

Just start the image with the given config open finder / settings > timemachine

How You're Launching the Container

{
    "AppArmorProfile": "",
    "Args": [
        "s6-svscan",
        "/etc/s6"
    ],
    "Config": {
        "ArgsEscaped": true,
        "AttachStderr": false,
        "AttachStdin": false,
        "AttachStdout": false,
        "Cmd": [
            "s6-svscan",
            "/etc/s6"
        ],
        "Domainname": "fritz.box",
        "Entrypoint": [
            "/entrypoint.sh"
        ],
        "Env": [
            "ADVERTISED_HOSTNAME=",
            "CUSTOM_SMB_CONF=false",
            "CUSTOM_USER=false",
            "DEBUG_LEVEL=1",
            "MIMIC_MODEL=TimeCapsule8,119",
            "EXTERNAL_CONF=",
            "HIDE_SHARES=no",
            "TM_USERNAME=timemachine",
            "TM_GROUPNAME=timemachine",
            "TM_UID=1000",
            "TM_GID=1000",
            "PASSWORD=timemachine",
            "SET_PERMISSIONS=false",
            "SHARE_NAME=TimeMachine",
            "SMB_INHERIT_PERMISSIONS=no",
            "SMB_NFS_ACES=yes",
            "SMB_METADATA=stream",
            "SMB_PORT=445",
            "SMB_VFS_OBJECTS=acl_xattr fruit streams_xattr",
            "VOLUME_SIZE_LIMIT=0",
            "WORKGROUP=WORKGROUP",
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
        ],
        "Hostname": "TimeMachine",
        "Image": "mbentley/timemachine:smb-amd64",
        "Labels": {
            "maintainer": "Matt Bentley <mbentley@mbentley.net>"
        },
        "OnBuild": null,
        "OpenStdin": false,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {
            "/opt/timemachine": {},
            "/run/samba": {},
            "/var/cache/samba": {},
            "/var/lib/samba": {}
        },
        "WorkingDir": "/"
    },
    "Created": "2023-03-23T09:31:06.374269122Z",
    "Driver": "overlay2",
    "ExecIDs": null,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/a905f04dfca3d11d4e772c742437d8439fbcf6806414388df13bdb743de19988-init/diff:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/d82d0da10b964851b99c3b4c69fb0868edc101c3e72100a04792e25348a05c9b/diff:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/91d33b039e6bbb30085f8ac0a8d2ab877d1230ed3bddc66db927c15753ff8c66/diff:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/b36413f56ecfae2c958b6a69e6337ae4e9d2b682aa23e8bd25c26a693d31fd71/diff:/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/adaa3a1db9f889f7106f5a10855bbb4b2e878f360916b4d7bcf712e5725d8575/diff",
            "MergedDir": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/a905f04dfca3d11d4e772c742437d8439fbcf6806414388df13bdb743de19988/merged",
            "UpperDir": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/a905f04dfca3d11d4e772c742437d8439fbcf6806414388df13bdb743de19988/diff",
            "WorkDir": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/a905f04dfca3d11d4e772c742437d8439fbcf6806414388df13bdb743de19988/work"
        },
        "Name": "overlay2"
    },
    "HostConfig": {
        "AutoRemove": false,
        "Binds": [
            "tm-var-lib-samba:/var/lib/samba",
            "/storage/sambashare/NASHDD1/TimeMachine:/opt/timemachine",
            "tm-run-samba:/run/samba",
            "tm-var-cache-samba:/var/cache/samba"
        ],
        "BlkioDeviceReadBps": null,
        "BlkioDeviceReadIOps": null,
        "BlkioDeviceWriteBps": null,
        "BlkioDeviceWriteIOps": null,
        "BlkioWeight": 0,
        "BlkioWeightDevice": null,
        "CapAdd": [
            "AUDIT_WRITE",
            "CHOWN",
            "DAC_OVERRIDE",
            "FOWNER",
            "FSETID",
            "KILL",
            "MKNOD",
            "NET_BIND_SERVICE",
            "NET_RAW",
            "SETFCAP",
            "SETGID",
            "SETPCAP",
            "SETUID",
            "SYS_CHROOT"
        ],
        "CapDrop": [
            "AUDIT_CONTROL",
            "BLOCK_SUSPEND",
            "DAC_READ_SEARCH",
            "IPC_LOCK",
            "IPC_OWNER",
            "LEASE",
            "LINUX_IMMUTABLE",
            "MAC_ADMIN",
            "MAC_OVERRIDE",
            "NET_ADMIN",
            "NET_BROADCAST",
            "SYSLOG",
            "SYS_ADMIN",
            "SYS_BOOT",
            "SYS_MODULE",
            "SYS_NICE",
            "SYS_PACCT",
            "SYS_PTRACE",
            "SYS_RAWIO",
            "SYS_RESOURCE",
            "SYS_TIME",
            "SYS_TTY_CONFIG",
            "WAKE_ALARM"
        ],
        "Cgroup": "",
        "CgroupParent": "",
        "ConsoleSize": [
            0,
            0
        ],
        "ContainerIDFile": "",
        "CpuCount": 0,
        "CpuPercent": 0,
        "CpuPeriod": 0,
        "CpuQuota": 0,
        "CpuRealtimePeriod": 0,
        "CpuRealtimeRuntime": 0,
        "CpuShares": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "DeviceCgroupRules": null,
        "Devices": [],
        "DiskQuota": 0,
        "Dns": [],
        "DnsOptions": [],
        "DnsSearch": [],
        "ExtraHosts": [],
        "GroupAdd": null,
        "IOMaximumBandwidth": 0,
        "IOMaximumIOps": 0,
        "Init": false,
        "IpcMode": "shareable",
        "Isolation": "",
        "KernelMemory": 0,
        "Links": null,
        "LogConfig": {
            "Config": {},
            "Type": "journald"
        },
        "MaskedPaths": [
            "/proc/asound",
            "/proc/acpi",
            "/proc/kcore",
            "/proc/keys",
            "/proc/latency_stats",
            "/proc/timer_list",
            "/proc/timer_stats",
            "/proc/sched_debug",
            "/proc/scsi",
            "/sys/firmware"
        ],
        "Memory": 0,
        "MemoryReservation": 0,
        "MemorySwap": 0,
        "MemorySwappiness": null,
        "NanoCpus": 0,
        "NetworkMode": "TimeMachine-230",
        "OomKillDisable": false,
        "OomScoreAdj": 0,
        "PidMode": "",
        "PidsLimit": 0,
        "PortBindings": {},
        "Privileged": false,
        "PublishAllPorts": false,
        "ReadonlyPaths": [
            "/proc/bus",
            "/proc/fs",
            "/proc/irq",
            "/proc/sys",
            "/proc/sysrq-trigger"
        ],
        "ReadonlyRootfs": false,
        "RestartPolicy": {
            "MaximumRetryCount": 0,
            "Name": "always"
        },
        "Runtime": "runc",
        "SecurityOpt": null,
        "ShmSize": 67108864,
        "UTSMode": "",
        "Ulimits": null,
        "UsernsMode": "",
        "VolumeDriver": "",
        "VolumesFrom": null
    },
    "HostnamePath": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/containers/5499bf477361d678a6589f0d01acb3b14bad3d33010ea6e876f1df30626d2ccc/hostname",
    "HostsPath": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/containers/5499bf477361d678a6589f0d01acb3b14bad3d33010ea6e876f1df30626d2ccc/hosts",
    "Id": "5499bf477361d678a6589f0d01acb3b14bad3d33010ea6e876f1df30626d2ccc",
    "Image": "sha256:8f4ab734d8281bd0e7d8b07dd20430434ea82f28e4e98185191ab6af35fad48d",
    "LogPath": "",
    "MountLabel": "",
    "Mounts": [
        {
            "Destination": "/var/lib/samba",
            "Driver": "local",
            "Mode": "z",
            "Name": "tm-var-lib-samba",
            "Propagation": "",
            "RW": true,
            "Source": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/volumes/tm-var-lib-samba/_data",
            "Type": "volume"
        },
        {
            "Destination": "/opt/timemachine",
            "Mode": "",
            "Propagation": "rprivate",
            "RW": true,
            "Source": "/storage/sambashare/NASHDD1/TimeMachine",
            "Type": "bind"
        },
        {
            "Destination": "/run/samba",
            "Driver": "local",
            "Mode": "z",
            "Name": "tm-run-samba",
            "Propagation": "",
            "RW": true,
            "Source": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/volumes/tm-run-samba/_data",
            "Type": "volume"
        },
        {
            "Destination": "/var/cache/samba",
            "Driver": "local",
            "Mode": "z",
            "Name": "tm-var-cache-samba",
            "Propagation": "",
            "RW": true,
            "Source": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/volumes/tm-var-cache-samba/_data",
            "Type": "volume"
        }
    ],
    "Name": "/timemachine-smb-avahi",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "",
        "IPPrefixLen": 0,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "",
        "Networks": {
            "TimeMachine-230": {
                "Aliases": [
                    "5499bf477361"
                ],
                "DriverOpts": null,
                "EndpointID": "c8f3ae36d9872aea7e78cc7ac3949f85057d30c4c5134f7cc9418bdce938fc63",
                "Gateway": "192.168.69.1",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAMConfig": {},
                "IPAddress": "192.168.69.230",
                "IPPrefixLen": 24,
                "IPv6Gateway": "",
                "Links": null,
                "MacAddress": "02:42:c0:a8:45:e6",
                "NetworkID": "b43100ad1743f70a470c4835128be898c10c6a1a5fd689d1ff6ab11a10a73708"
            }
        },
        "Ports": {},
        "SandboxID": "c80dc247ce947320ed2fa14de8b8e87a9652205185fe51fb54a8fe6ac5dde501",
        "SandboxKey": "/var/run/docker/netns/c80dc247ce94",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "Path": "/entrypoint.sh",
    "Platform": "linux",
    "Portainer": {
        "ResourceControl": {
            "Id": 130,
            "ResourceId": "5499bf477361d678a6589f0d01acb3b14bad3d33010ea6e876f1df30626d2ccc",
            "SubResourceIds": [],
            "Type": 1,
            "UserAccesses": [],
            "TeamAccesses": [],
            "Public": false,
            "AdministratorsOnly": true,
            "System": false
        }
    },
    "ProcessLabel": "",
    "ResolvConfPath": "/storage/.kodi/userdata/addon_data/service.system.docker/docker/containers/5499bf477361d678a6589f0d01acb3b14bad3d33010ea6e876f1df30626d2ccc/resolv.conf",
    "RestartCount": 0,
    "State": {
        "Dead": false,
        "Error": "",
        "ExitCode": 0,
        "FinishedAt": "0001-01-01T00:00:00Z",
        "OOMKilled": false,
        "Paused": false,
        "Pid": 6761,
        "Restarting": false,
        "Running": true,
        "StartedAt": "2023-03-23T09:31:06.827339939Z",
        "Status": "running"
    }
}

Container Logs

INFO: CUSTOM_SMB_CONF=false; generating [global] section of /etc/samba/smb.conf...
INFO: Creating /var/log/samba/cores
INFO: Avahi - generating base configuration in /etc/avahi/services/smbd.service...
INFO: Avahi - adding the 'dk0', 'TimeMachine' share txt-record to /etc/avahi/services/smbd.service...
INFO: Group timemachine doesn't exist; creating...
INFO: User timemachine doesn't exist; creating...
INFO: Using default password: timemachine
chpasswd: password for 'timemachine' changed
INFO: INFO: CUSTOM_SMB_CONF=false; generating [TimeMachine] section of /etc/samba/smb.conf...
INFO: Samba - Created User timemachine password set to none.
INFO: Samba - Enabled user timemachine.
INFO: Samba - setting password
INFO: SET_PERMISSIONS=false; not setting ownership and permissions for /opt/timemachine
INFO: Avahi - completing the configuration in /etc/avahi/services/smbd.service...
INFO: running test for xattr support on your time machine persistent storage location...
INFO: xattr test successful - your persistent data store supports xattrs
INFO: entrypoint complete; executing 's6-svscan /etc/s6'
dbus socket not yet available; sleeping...
nmbd version 4.16.8 started.
Copyright Andrew Tridgell and the Samba Team 1992-2022
smbd version 4.16.8 started.
Copyright Andrew Tridgell and the Samba Team 1992-2022
INFO: Profiling support unavailable in this build.
dbus socket not yet available; sleeping...
dbus socket not yet available; sleeping...
Found user 'avahi' (UID 86) and group 'avahi' (GID 86).
Successfully dropped root privileges.
avahi-daemon 0.8 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Loading service file /etc/avahi/services/smbd.service.
Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.69.230.
New relevant interface eth0.IPv4 for mDNS.
Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
New relevant interface lo.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for 192.168.69.230 on eth0.IPv4.
Registering new address record for 127.0.0.1 on lo.IPv4.
Server startup complete. Host name is TimeMachine.local. Local service cookie is 2117900072.
Service "TimeMachine" (/etc/avahi/services/smbd.service) successfully established.
*****
Samba name server TIMEMACHINE is now a local master browser for workgroup WORKGROUP on subnet 192.168.69.230
*****

Additional Context

No response

manoloxxl commented 1 year ago

Can be closed - i checked it again and again but didn't seen, that my macbook was running a vpn connection in background.