mbentley / docker-timemachine

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

Network disconnect #127

Closed pittbull closed 7 months ago

pittbull commented 1 year ago

Describe the Bug

Expected Behavior

I would expect no disconnect from the network when running Time Machine

Steps to Reproduce

  1. Start backup
  2. Observe disconnect when reaching about 60%

How You're Launching the Container

From Unraid xml:
  <Config Name="Time Machine Backup Data" Target="/opt/timemachine" Default="" Mode="rw" Description="Directory to store the time machine backups. If you change the User Name (TM_USERNAM>
  <Config Name="Size Limit" Target="VOLUME_SIZE_LIMIT" Default="1 T" Mode="" Description="Limits the reported disksize, thus preventing Time Machine from using the whole real disk space >
  <Config Name="User Name" Target="TM_USERNAME" Default="" Mode="" Description="sets the username time machine runs as" Type="Variable" Display="always" Required="false" Mask="false">tim>
  <Config Name="User Password" Target="PASSWORD" Default="" Mode="" Description="sets the password for the timemachine user. The default value is ." Type="Var>
  <Config Name="Root file system" Target="/opt" Default="" Mode="rw" Description="" Type="Path" Display="always" Required="false" Mask="false">/mnt/user/timemachine</Config>
  <Config Name="passwd" Target="/etc/passwd" Default="" Mode="ro" Description="" Type="Path" Display="always" Required="false" Mask="false">/etc/passwd</Config>
  <Config Name="group" Target="/etc/group" Default="" Mode="ro" Description="" Type="Path" Display="always" Required="false" Mask="false">/etc/group</Config>
  <Config Name="shadow" Target="/etc/shadow" Default="" Mode="ro" Description="" Type="Path" Display="always" Required="false" Mask="false">/etc/shadow</Config>
  <Config Name="Advertised Hostname" Target="ADVERTISED_HOSTNAME" Default="" Mode="" Description="Avahi will advertise the smb services at this hostname instead of the local hostname" Ty>
  <Config Name="Use Custom SMB Configuration" Target="CUSTOM_SMB_CONF" Default="false" Mode="" Description="indicates that you are going to bind mount a custom config to /etc/samba/smb.c>
  <Config Name="Custom User" Target="CUSTOM_USER" Default="false" Mode="" Description="indicates that you are going to bind mount /etc/password, /etc/group, and /etc/shadow; and create d>
  <Config Name="Debug Level" Target="DEBUG_LEVEL" Default="1" Mode="" Description="sets the debug level for nmbd and smbd" Type="Variable" Display="advanced" Required="false" Mask="false>
  <Config Name="Mimic Model" Target="MIMIC_MODEL" Default="TimeCapsule8,119" Mode="" Description="sets the value of time machine to mimic (e.g. TimeCapsule8,119 or TimeCapsule6,116)" Typ>
  <Config Name="External Configuration Directory" Target="EXTERNAL_CONF" Default="" Mode="" Description="specifies a directory in which individual variable files, ending in .conf. In ord>
  <Config Name="Hide Shares" Target="HIDE_SHARES" Default="no" Mode="" Description="set to yes if you would like only the share(s) a user can access to appear" Type="Variable" Display="a>
  <Config Name="Group Name" Target="TM_GROUPNAME" Default="timemachine" Mode="" Description="sets the group name time machine runs as" Type="Variable" Display="advanced" Required="false">
  <Config Name="User UID" Target="TM_UID" Default="1000" Mode="" Description="sets the UID of the Executing User (TM_USERNAME)" Type="Variable" Display="advanced" Required="false" Mask=">
  <Config Name="Set Permissions" Target="SET_PERMISSIONS" Default="false" Mode="" Description="set to true to have the entrypoint set ownership and permission on the /opt/ in the contain>
  <Config Name="SMB Inherit Permissions" Target="SMB_INHERIT_PERMISSIONS" Default="no" Mode="" Description="if yes, permissions for new files will be forced to match the parent folder" T>
  <Config Name="SMB fruit:nfs_aces" Target="SMB_NFS_ACES" Default="yes" Mode="" Description="value of fruit:nfs_aces; support for querying and modifying the UNIX mode of directory entrie>
  <Config Name="SMB fruit:metadata" Target="SMB_METADATA" Default="stream" Mode="" Description="value of fruit:metadata; controls where the OS X metadata stream is stored" Type="Variable>
  <Config Name="SMB Port" Target="SMB_PORT" Default="445" Mode="" Description="sets the port that Samba will be available on" Type="Variable" Display="advanced" Required="false" Mask="fa>
  <Config Name="SMB vfs objects" Target="SMB_VFS_OBJECTS" Default="acl_xattr fruit streams_xattr" Mode="" Description="value of vfs objects" Type="Variable" Display="advanced" Required=">
  <Config Name="SMB Workgroup Name" Target="WORKGROUP" Default="WORKGROUP" Mode="" Description="set the SMB workgroup name" Type="Variable" Display="advanced" Required="false" Mask="fals>
  <Config Name="Group GID" Target="TM_GID" Default="1000" Mode="" Description="sets the GID of the TM_GROUPNAME group" Type="Variable" Display="advanced" Required="false" Mask="false">10>
  <Config Name="Share Name" Target="SHARE_NAME" Default="TimeMachine" Mode="" Description="sets the name of the timemachine share to." Type="Variable" Display="advanced" Required="false">

Container Logs

An extract from the logs:

ulfthomas closed file Mythbuster.sparsebundle/mapped/a13 (numopen=216) NT_STATUS_OK
ulfthomas closed file Mythbuster.sparsebundle/mapped/a13 (numopen=215) NT_STATUS_OK
ulfthomas opened file Mythbuster.sparsebundle/mapped/a13 read=Yes write=Yes (numopen=217)
Registered MSG_REQ_POOL_USAGE
mythbuster-2 (ipv4:192.168.1.249:60834) closed connection to service ulfthomas
check_ntlm_password:  authentication for user [ulfthomas] -> [ulfthomas] -> [ulfthomas] succeeded
Processing section "[ulfthomas]"
connect_acl_xattr: setting 'inherit acls = true' 'dos filemode = true' and 'force unknown acl user = true' for service ulfthomas
mythbuster (ipv4:192.168.1.249:61583) connect to service ulfthomas initially as user ulfthomas (uid=1001, gid=100) (pid 9925)
vfs_default_durable_reconnect (Mythbuster.sparsebundle/bands/cd5): stat_ex.st_ex_blocks differs: cookie:65152 != stat:64136, denying durable reconnect
mythbuster (ipv4:192.168.1.249:61583) closed connection to service ulfthomas
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423731:0 open 479652478
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251259603444:0 open 1040567365
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423733:0 open 2606173137
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251259603446:0 open 809919928
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423732:0 open 3409784333
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251259603445:0 open 4252671200
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423734:0 open 3543030078
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251259603447:0 open 3728896592
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507646:0 open 2161271829
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250899984376:0 open 340004563
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507652:0 open 4026198568
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250899984373:0 open 268927176
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507643:0 open 392054118
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507616:0 open 2869692158
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250899984346:0 open 4231013143
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507569:0 open 2287862485
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507575:0 open 667768513
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507544:0 open 1433492553
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250899974802:0 open 544402641
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507540:0 open 114024704
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250899974798:0 open 3655677831
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250899974793:0 open 2257442483
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507536:0 open 956130045
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507537:0 open 2586967182
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250899974794:0 open 2221891565
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507522:0 open 2490150462
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507524:0 open 3644607995
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279392888:0 open 1694205401
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727732:0 open 2687044895
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279392884:0 open 24123522
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727723:0 open 3312714188
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279392875:0 open 1998704025
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727713:0 open 2986727368
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279392865:0 open 1786748312
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727745:0 open 2551598164
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393398:0 open 3349180803
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393395:0 open 4166916367
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393376:0 open 2209118629
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727776:0 open 722171315
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393883:0 open 57495046
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423580:0 open 499511264
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423581:0 open 1737371249
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393880:0 open 1283469988
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423570:0 open 239227414
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393874:0 open 3909600757
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423571:0 open 3827746014
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393875:0 open 218905386
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393871:0 open 3953897735
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393872:0 open 2084416744
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423569:0 open 1013058342
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393873:0 open 801426055
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423556:0 open 2175606025
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423559:0 open 3321231913
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423594:0 open 3785553707
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393898:0 open 2253282417
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393897:0 open 291421013
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249364423587:0 open 1402253452
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251279393891:0 open 2896540566
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644246436905829:0 open 728353569
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507449:0 open 845648643
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250830238580:0 open 1844830421
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507426:0 open 2020257786
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507447:0 open 47603175
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250830238578:0 open 3002951101
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248831014846:0 open 163556523
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507400:0 open 3456254668
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248838507407:0 open 1607372387
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644250830238538:0 open 3462842628
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363457974:0 open 3394379571
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196320560:0 open 2891897774
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363403590:0 open 1035368100
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251184648128:0 open 840803299
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458451:0 open 3322282898
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458434:0 open 1317768545
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196324348:0 open 1272281201
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458416:0 open 2662610922
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196324330:0 open 314604611
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458532:0 open 3295936819
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325342:0 open 467351054
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727672:0 open 2440767551
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727673:0 open 2080670927
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727663:0 open 1203871209
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330735:0 open 377752054
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727664:0 open 2410888344
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727665:0 open 1159617469
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330737:0 open 3880075198
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330738:0 open 175964131
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727666:0 open 3230604683
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727681:0 open 2524865631
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330707:0 open 1362839823
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727633:0 open 3300164388
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330705:0 open 1934456908
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727644:0 open 937504910
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727641:0 open 2692809265
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330727:0 open 3771051356
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727655:0 open 4108584062
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727621:0 open 4128037812
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330693:0 open 381658082
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330688:0 open 3482372469
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363727616:0 open 3883356727
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647896:0 open 688453362
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647889:0 open 1546446611
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251021255121:0 open 1166313462
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647890:0 open 3842176436
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458620:0 open 3337789368
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325819:0 open 1093831998
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458621:0 open 1337383274
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325820:0 open 946374626
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647873:0 open 2636182597
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251021255104:0 open 1278390568
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647881:0 open 3109526488
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248710974639:0 open 1680140286
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325805:0 open 2703004353
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458607:0 open 1890168695
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325801:0 open 1517518003
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458617:0 open 3918760100
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325814:0 open 4060111107
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458615:0 open 159896605
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458618:0 open 1223107962
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325817:0 open 1731612615
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248831014815:0 open 1421523800
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325816:0 open 3308267276
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363458602:0 open 320304813
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196325796:0 open 4242597608
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648034:0 open 2202202591
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648037:0 open 663981608
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330213:0 open 3165673029
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648044:0 open 722245831
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330220:0 open 4222541035
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648041:0 open 313795639
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330217:0 open 1772960832
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648053:0 open 2790943818
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330229:0 open 629829627
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648050:0 open 2577136724
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330225:0 open 2021901492
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648049:0 open 4094668529
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648058:0 open 2138734872
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330187:0 open 3436399144
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648006:0 open 2478649317
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330182:0 open 413472465
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648000:0 open 424553034
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330176:0 open 739175507
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330199:0 open 1620771256
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363648016:0 open 129760468
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196330192:0 open 152938938
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647974:0 open 955144738
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647975:0 open 36636256
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196329694:0 open 2239642515
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647970:0 open 421952239
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647983:0 open 2069277771
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647989:0 open 1161783619
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647986:0 open 3279475104
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196329714:0 open 3984031862
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647994:0 open 990247004
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196329722:0 open 989540123
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647941:0 open 1398736326
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647943:0 open 3069192497
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196329670:0 open 2295856892
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647955:0 open 3340253069
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647958:0 open 760575053
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647963:0 open 3057888512
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251196329690:0 open 2278320042
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251021255131:0 open 2684876681
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249363647928:0 open 1315590955
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251021255159:0 open 3477371885
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249008247089:0 open 278717266
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249006512484:0 open 1722841929
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251021454942:0 open 189606205
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249008915287:0 open 851271482
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251022090385:0 open 662827486
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249008915270:0 open 3823485082
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251022090368:0 open 2764942980
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249008915292:0 open 3837613250
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251022090390:0 open 887770431
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249007880712:0 open 3946206467
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251027000322:0 open 1866525799
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644248710974646:0 open 1358595047
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251023844265:0 open 1039440786
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644249007880713:0 open 2177780890
scavenger_timer: Failed to cleanup share modes and byte range locks for file 45:649644251027000323:0 open 111479569
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.2 for name WORKGROUP<1d>.
This response was from IP 192.168.1.192, reporting an IP address of 192.168.1.192.
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_POOL_USAGE
Could not find child 9927 -- ignoring
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.2 for name WORKGROUP<1d>.
This response was from IP 192.168.1.192, reporting an IP address of 192.168.1.192.
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.2 for name WORKGROUP<1d>.
This response was from IP 192.168.1.192, reporting an IP address of 192.168.1.192.
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.2 for name WORKGROUP<1d>.
This response was from IP 192.168.1.192, reporting an IP address of 192.168.1.192.
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_POOL_USAGE
Could not find child 9929 -- ignoring
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.2 for name WORKGROUP<1d>.
This response was from IP 192.168.1.192, reporting an IP address of 192.168.1.192.
Got SIGTERM: going down...
Got SIGTERM, quitting.
Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.1.2.
Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
avahi-daemon 0.8 exiting.
Executing .s6-svscan/finish with arguments
INFO: CUSTOM_SMB_CONF=false; generating [global] section of /etc/samba/smb.conf...
INFO: Avahi - generating base configuration in /etc/avahi/services/smbd.service...
INFO: Avahi - using timemachine as hostname.
INFO: Loading values from /opt/users/daniel.conf
INFO: Avahi - adding the 'dk0', 'daniel' share txt-record to /etc/avahi/services/smbd.service...
INFO: CUSTOM_USER=true; skipping user, group, and data directory creation; using pre-existing values in /etc/passwd, /etc/group, and /etc/shadow
INFO: CUSTOM_SMB_CONF=false; generating [daniel] section of /etc/samba/smb.conf...
INFO: Samba - Created Added user daniel.
INFO: Samba - Enabled user daniel.
INFO: Samba - setting password
chown: unknown user/group daniel:daniel
INFO: INFO: mode of '/opt/daniel' changed to 0770 (rwxrwx---)
INFO: Loading values from /opt/users/siwhege.conf
INFO: Avahi - adding the 'dk1', 'siwhege' share txt-record to /etc/avahi/services/smbd.service...
INFO: CUSTOM_USER=true; skipping user, group, and data directory creation; using pre-existing values in /etc/passwd, /etc/group, and /etc/shadow
INFO: CUSTOM_SMB_CONF=false; generating [siwhege] section of /etc/samba/smb.conf...
INFO: Samba - Created Added user siwhege.
INFO: Samba - Enabled user siwhege.
INFO: Samba - setting password
chown: unknown user/group siwhege:siwhege
INFO: INFO: mode of '/opt/siwhege' changed to 0770 (rwxrwx---)
INFO: Avahi - completing the configuration in /etc/avahi/services/smbd.service...
INFO: dbus PID exists; removing...
removed '/run/dbus/dbus.pid'
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'
Found user 'avahi' (UID 61) and group 'avahi' (GID 214).
Successfully dropped root privileges.
avahi-daemon 0.8 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
dbus_bus_get_private(): Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused
WARNING: Failed to contact D-Bus daemon.
avahi-daemon 0.8 exiting.
dbus-daemon[41]: [system] org.freedesktop.DBus.Error.AccessDenied: Failed to set fd limit to 65536: Operation not permitted
added interface eth0 ip=192.168.1.2 bcast=192.168.1.255 netmask=255.255.255.0
nmbd version 4.16.8 started.
Copyright Andrew Tridgell and the Samba Team 1992-2022
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
Registered MSG_REQ_POOL_USAGE
added interface eth0 ip=192.168.1.2 bcast=192.168.1.255 netmask=255.255.255.0
making subnet name:192.168.1.2 Broadcast address:192.168.1.255 Subnet mask:255.255.255.0
making subnet name:UNICAST_SUBNET Broadcast address:0.0.0.0 Subnet mask:0.0.0.0
making subnet name:REMOTE_BROADCAST_SUBNET Broadcast address:0.0.0.0 Subnet mask:0.0.0.0
added interface eth0 ip=192.168.1.2 bcast=192.168.1.255 netmask=255.255.255.0
smbd version 4.16.8 started.
Copyright Andrew Tridgell and the Samba Team 1992-2022
uid=0 gid=0 euid=0 egid=0
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
Processing section "[daniel]"
Processing section "[siwhege]"
added interface eth0 ip=192.168.1.2 bcast=192.168.1.255 netmask=255.255.255.0
INFO: Profiling support unavailable in this build.
Registered MSG_REQ_POOL_USAGE
No builtin backend found, trying to load plugin
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_POOL_USAGE
waiting for connections
Found user 'avahi' (UID 61) and group 'avahi' (GID 214).
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.1.2.
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.1.2 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 1903790057.
Service "timemachine" (/etc/avahi/services/smbd.service) successfully established.
check_for_master_browser_fail: Forcing election on workgroup WORKGROUP subnet 192.168.1.2
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.2
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.2
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.2
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.2
send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.2
run_elections: >>> Won election for workgroup WORKGROUP on subnet 192.168.1.2 <<<
become_local_master_browser: Starting to become a master browser for workgroup WORKGROUP on subnet 192.168.1.2
become_local_master_fail2: failed to register name WORKGROUP<1d> on subnet 192.168.1.2. Failed to become a local master browser.
unbecome_local_master_browser: unbecoming local master for workgroup WORKGROUP on subnet 192.168.1.2
standard_fail_register: Failed to register/refresh name WORKGROUP<1d> on subnet 192.168.1.2
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.2 for name WORKGROUP<1d>.
This response was from IP 192.168.1.192, reporting an IP address of 192.168.1.192.
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.2 for name WORKGROUP<1d>.
This response was from IP 192.168.1.192, reporting an IP address of 192.168.1.192.
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_POOL_USAGE
Could not find child 49 -- ignoring
query_name_response: Multiple (2) responses received for a query on subnet 192.168.1.2 for name WORKGROUP<1d>.
This response was from IP 192.168.1.192, reporting an IP address of 192.168.1.192.

Additional Context

Unraid has been stable network wise for a long time and is hardwired to the net.

mbentley commented 1 year ago

Are you running any other Samba services on the same host by chance? How are you exposing the Time Machine container to your network? Just exposing ports? Using the host network? I see responses about multiple responses received for a subnet so it seems like there may be another nmbd process running on the same network interface. I don't recall if this would be something that would be causing the behavior that you're seeing but it would be worth looking into. I have samba running on my host and as a time machine container but I am using macvlan to work around the issue but there are a few other configurations that may help as described here.

And while I don't think it's related to any issues you're seeing, I think there may be a misconfiguration with your multi-user setup. Check out this part of the readme to make sure you've configured it correctly. It's been a while since I have tested multi-user configuration but seeing the messages about chown: unknown user/group are what make me think something is misconfigured but it is hard to tell from the xml output.

pittbull commented 1 year ago

I am running TimeMachine on my Unraid server so I assume there is a samba service there.

The container is being exposed over br0, and even though another nmbd process would exist this shouldn't result in my backup failing where it does?

Thanks for spotting the multi-user error, but I believe I have followed the readme but will do a revisit.

I did a new test yesterday with the same result so something is wrong somewhere.

mbentley commented 1 year ago

While I am not certain that a second nmbd process would cause a problem, I'd rather just rule it out to make sure. Initial backups can really take a long time. In terms of when it actually failed during the backup, do you have any idea where in the logs it actually is throwing the error at the point of the disconnect/error? Was it this or somewhere else?:

vfs_default_durable_reconnect (Mythbuster.sparsebundle/bands/cd5): stat_ex.st_ex_blocks differs: cookie:65152 != stat:64136, denying durable reconnect
mythbuster (ipv4:192.168.1.249:61583) closed connection to service ulfthomas
pittbull commented 1 year ago

So, I believe I have cleaned up the user stuff but I still fail to complete the first backup. I have found a way to extract the logs from the Mac itself and based on the last lines it basically states that destination volume has become unavailable which is backed up by my observations that I face a complete network shutdown (all local ssh's, web browsing, ping etc) is rendered unavailable. This must be related to something outside of your docker image and Unraid, so I am troubleshooting my network.

As a side note, I keep getting these in my local log whilst backing up:

2023-04-07 20:50:09 Failed to get name of volume with mountpoint 'file:///Volumes/.timemachine/timemachine._smb._tcp.local./E0BD8177-5AD1-4038-A788-F36C4A414062/ulfthomas/', error: Error Domain=NSCocoaErrorDomain Code=257 "The file “<username>” couldn’t be opened because you don’t have permission to view it." UserInfo={NSURL=file:///Volumes/.timemachine/timemachine._smb._tcp.local./E0BD8177-5AD1-4038-A788-F36C4A414062/ulfthomas/, NSFilePath=/Volumes/.timemachine/timemachine._smb._tcp.local./E0BD8177-5AD1-4038-A788-F36C4A414062/<username>, NSUnderlyingError=0x600002dca280 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}

The permissions are correctly set on the server and I can mount the sparebundle file without issues (aside from being empty due to no backups having completed).

Any advice?

mbentley commented 1 year ago

I doubt it considering time machine should work fine while the machine is idle but it's not going to sleep, is it? Maybe doing a backup with caffeinate -s running from the terminal to prevent the system from sleeping (only works when plugged in)? Does it happen at the same time? when it disconnects or is there any pattern? Anything like with networking that might be the cause like having a mesh network and having the mac change APs?

As for the errors about permissions, have you tried deleting the sparsebundle from the persistent storage to totally start from scratch, ensuring that something in the sparsebundle isn't off? I'm not exactly sure if there is something that can be done to modify permissions within the sparsebundle but it seems like there is something it doesn't like about the path mentioned in the value of NSURL.

pittbull commented 1 year ago

A valid question, but confirming Mac being awake as I was using it during backup.

I have tried several times to remove the sparsebundle, but as I did not do so now after redoing the multiple user setup I will delete and retry.

I am currently digging around the web and on the Unraid forum I found this post suggesting to add the following to the Samba config (which I assume must be done with in the image):

    vfs objects = fruit
    fruit:metadata = stream
pittbull commented 1 year ago

Deleted the sparebundle and restarted the backup, and the following error reappeared (backup running though):

2023-04-07 21:21:57 Failed to get name of volume with mountpoint 'file:///Volumes/.timemachine/timemachine._smb._tcp.local./3C086BEB-0074-4B00-8B8D-241E264C1D7A/ulfthomas/', error: Error Domain=NSCocoaErrorDomain Code=257 "The file “ulfthomas” couldn’t be opened because you don’t have permission to view it." UserInfo={NSURL=file:///Volumes/.timemachine/timemachine._smb._tcp.local./3C086BEB-0074-4B00-8B8D-241E264C1D7A/ulfthomas/, NSFilePath=/Volumes/.timemachine/timemachine._smb._tcp.local./3C086BEB-0074-4B00-8B8D-241E264C1D7A/ulfthomas, NSUnderlyingError=0x6000036e6520 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}

pittbull commented 1 year ago

This does seem unrelated as it has to do with the volume name only:

2023-04-07 21:22:57  Failed to create volume info from disk '<TMDisk: 0x13f026000> '/Volumes/.timemachine/timemachine._smb._tcp.local./3C086BEB-0074-4B00-8B8D-241E264C1D7A/ulfthomas'', error: missingName
2023-04-07 21:22:57  Failed to create volume info from disk '<TMDisk: 0x13f018200> '/System/Volumes/Data/home'', error: missingURLForRemounting
pittbull commented 1 year ago

Does it happen at the same time? when it disconnects or is there any pattern? Anything like with networking that might be the cause like having a mesh network and having the mac change APs?

I would agree with you but it is not changing ap either. It does happen about the same place and it does not matter if the backup is a fresh one or a restart of one that previously failed. It halts at the same place.

pittbull commented 1 year ago

A valid question, but confirming Mac being awake as I was using it during backup.

I have tried several times to remove the sparsebundle, but as I did not do so now after redoing the multiple user setup I will delete and retry.

I am currently digging around the web and on the Unraid forum I found this post suggesting to add the following to the Samba config (which I assume must be done with in the image):

    vfs objects = fruit
    fruit:metadata = stream

Well, after having looked at your smb.conf file I find the only difference to be this line:

vfs objects = acl_xattr fruit streams_xattr

Not sure if it makes a difference.

mbentley commented 1 year ago

Yeah, so https://github.com/mbentley/docker-timemachine/issues/69 added acl_xattr which caused TM to stop working with Big Sur. Besides that, I've mostly used the Samba wiki page on TM as a guide.

I don't recall if I have done any specific research on the fruit:nfs_aces setting (will have to go back and look) but at some point, I specifically added the SMB_NFS_ACES env var to allow the user to change it. The TM wiki suggests setting no but I set yes as the default. It might be worth trying to set that to no to see if that helps.

If that doesn't help, I would be curious if setting SMB_INHERIT_PERMISSIONS to yes does anything to change any behavior. That's just a total shot in the dark though.

pittbull commented 1 year ago

I observe that the backup is failing at approx 61% every time and the following error message is caught on the mac:

2023-04-10 12:16:30 Cancelling backup because volume '/Volumes/.timemachine/timemachine._smb._tcp.local./55616159-271D-4182-ADEA-EB055F22EA9C/<username>' was unmounted. I have done two things:

pittbull commented 1 year ago

Well, after retry without changing anything else I observed two network disconnects (all my ssh sessions dies, to multiple destinations), but Time Machine was continuing. It did complete the initial backup in fact.

I then retried and again I observed disconnects, but TM finishes again. Very strange.

I will delete the backup and move it back to the raid disks to see if the same holds true towards those disks.

pittbull commented 1 year ago

When moved back it fails like it did earlier ... Will retry with inherit set to yes.

mbentley commented 7 months ago

No updates since April, closing for now.