Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not open tdb: No such file or directory (both account_policy.tdb and registry.tdb) #79

Closed
iwconfig opened this issue Apr 4, 2023 · 10 comments

Comments

@iwconfig
Copy link

iwconfig commented Apr 4, 2023

I get "No such file or directory" for both registry.tdb and account_policy.tdb in /var/lib/samba/. I have no idea why that is and I cannot connect to my samba server.

Yesterday, when I first started, I immediately got connection timeout upon connecting. Later on I think it somehow confused StorageServer with my other samba server running on my Synology NAS. Not sure though. I also tried manually connecting to it (smb://rpi.local), it did not timeout immediately but could not connect any way. Seemed like it could not find the server. The first time I tired connecting it had logged my main computers LAN IP, though.

But today, after a restart, StorageServer doesn't show up at all. First I though well maybe it's because the server was not running before I started my main computer, but that doesn't really make any sense. Connecting to it manually though, I now get connection timeout immediately. Today it doesn't log my IP. Anyhow, I have no clue what's going on.

I read somewhere that it might be due to a wireless connection. I tried wired connection but the issue is still the same.

Here's some context for you:

docker-compose.yml file
version: '3'
services:
  samba:
    image: ghcr.io/servercontainers/samba
    restart: always
    network_mode: host
    environment:
      MODEL: 'TimeCapsule'
      AVAHI_NAME: StorageServer

      WSDD2_DISABLE: 1

      SAMBA_CONF_LOG_LEVEL: 3
  
      ACCOUNT_user1: "user1:1000:XXX..."
      ACCOUNT_user2: "user2:1000:XXX..."

      SAMBA_VOLUME_CONFIG_shared_home: "[Home]; path=/shares/homes/%U; valid users = user1, user2; guest ok = no; read only = no; browseable = yes"
      SAMBA_VOLUME_CONFIG_shared_media: "[Media]; path=/shares/media; valid users = user1, user2; guest ok = no; read only = no; browseable = yes"
      
      SAMBA_VOLUME_CONFIG_public: "[Public]; path=/shares/public; valid users = user1, user2; guest ok = no; read only = no; browseable = yes"
      SAMBA_VOLUME_CONFIG_public_ro: "[Public ReadOnly]; path=/shares/public; guest ok = yes; read only = yes; browseable = yes"
      
      SAMBA_VOLUME_CONFIG_timemachine: "[TimeMachine]; path=/shares/timemachine/%U; valid users = user1; guest ok = no; read only = no; browseable = yes; fruit:time machine = yes; fruit:time machine max size = 500G"

    volumes:
      - /etc/avahi/services/:/external/avahi
      - ./shares/public:/shares/public
      - ./shares/homes:/shares/homes
      - ./shares/timemachine:/shares/timemachine
      - ./shares/media:/shares/media
Console log: level 3
[...]

>> CONTAINER: starting initialisation
>> SAMBA CONFIG: no $SAMBA_CONF_WORKGROUP set, using 'WORKGROUP'
>> SAMBA CONFIG: no $SAMBA_CONF_SERVER_STRING set, using 'Samba Server'
>> SAMBA CONFIG: no $SAMBA_CONF_MAP_TO_GUEST set, using 'Bad User'
>> ACCOUNT: adding account: user2
No builtin backend found, trying to load plugin
load_module_absolute_path: Module '/usr/lib/samba/pdb/smbpasswd.so' loaded
startsmbfilepwent_internal: file /var/lib/samba/private/smbpasswd did not exist. File successfully created.
Forcing Primary Group to 'Domain Users' for user2
tdb(/var/lib/samba/account_policy.tdb): tdb_open_ex: could not open file /var/lib/samba/account_policy.tdb: No such file or directory
Could not open tdb: No such file or directory
account_policy_get: tdb_fetch_uint32_t failed for type 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32_t failed for type 10 (refuse machine password change), returning 0
Added user user2.
>> ACCOUNT: found SMB Password HASH instead of plain-text password
No builtin backend found, trying to load plugin
load_module_absolute_path: Module '/usr/lib/samba/pdb/smbpasswd.so' loaded
Forcing Primary Group to 'Domain Users' for user2
Forcing Primary Group to 'Domain Users' for user2
Enabled user user2.
>> ACCOUNT: adding account: user1
No builtin backend found, trying to load plugin
load_module_absolute_path: Module '/usr/lib/samba/pdb/smbpasswd.so' loaded
Forcing Primary Group to 'Domain Users' for user1
Added user user1.
>> ACCOUNT: found SMB Password HASH instead of plain-text password
No builtin backend found, trying to load plugin
load_module_absolute_path: Module '/usr/lib/samba/pdb/smbpasswd.so' loaded
Forcing Primary Group to 'Domain Users' for user1
Forcing Primary Group to 'Domain Users' for user1
Enabled user user1.
>> VOLUME: adding volume: Public (path=/shares/public)
>> VOLUME: adding volume: Home (path=/shares/homes/%U)
  >> multiuser volume - /shares/homes/%U
>> VOLUME: adding volume: Public ReadOnly (path=/shares/public)
>> VOLUME: adding volume: TimeMachine (path=/shares/timemachine/%U)
  >> TIMEMACHINE: adding volume to zeroconf: TimeMachine
  >> TIMEMACHINE: zeroconf model: TimeCapsule
  >> TIMEMACHINE: adding samba timemachine specifics to volume config: TimeMachine (/shares/timemachine/%U)
  >> multiuser volume - /shares/timemachine/%U
>> VOLUME: adding volume: Media (path=/shares/media)
>> ZEROCONF: custom avahi samba.service name: StorageServer
>> ZEROCONF: samba.service file
############################### START ####################################
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">StorageServer</name>
 <service>
   <type>_smb._tcp</type>
   <port>445</port>
 </service>

 <service>
  <type>_device-info._tcp</type>
  <port>0</port>
  <txt-record>model=TimeCapsule</txt-record>
 </service>

 <service>
  <type>_adisk._tcp</type>
  <txt-record>sys=waMa=0,adVF=0x100</txt-record>
  <txt-record>dk0=adVN=TimeMachine,adVF=0x82</txt-record>
 </service>
</service-group>
################################ END #####################################
>> WSDD2 - DISABLED
>> EXTERNAL AVAHI: found external avahi, now maintaining avahi service file 'samba.service'
>> EXTERNAL AVAHI: internal avahi gets disabled
>> EXTERNAL AVAHI: list of services
-rw-rw-rw-    1 root     root           521 Apr  4 11:32 /external/avahi/samba.service
>> CMD: exec docker CMD
runsvdir -P /container/config/runit
+ sleep 2
+ exec smbd --foreground
[2023/04/04 11:32:06.776433,  0] ../../source3/smbd/server.c:1741(main)
  smbd version 4.16.10 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2022
[2023/04/04 11:32:06.776772,  2] ../../source3/smbd/server.c:1744(main)
  uid=0 gid=0 euid=0 egid=0
[2023/04/04 11:32:06.777860,  2] ../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
  Registered MSG_REQ_POOL_USAGE
[2023/04/04 11:32:06.777981,  2] ../../source3/lib/dmallocmsg.c:78(register_dmalloc_msgs)
  Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2023/04/04 11:32:06.778275,  3] ../../source3/param/loadparm.c:3974(lp_load_ex)
  lp_load_ex: refreshing parameters
[2023/04/04 11:32:06.778599,  3] ../../source3/param/loadparm.c:557(init_globals)
  Initialising global parameters
[2023/04/04 11:32:06.778864,  3] ../../source3/param/loadparm.c:2876(lp_do_section)
  Processing section "[global]"
[2023/04/04 11:32:06.779163,  2] ../../source3/param/loadparm.c:2893(lp_do_section)
  Processing section "[Public]"
[2023/04/04 11:32:06.779326,  2] ../../source3/param/loadparm.c:2893(lp_do_section)
  Processing section "[Home]"
[2023/04/04 11:32:06.779488,  2] ../../source3/param/loadparm.c:2893(lp_do_section)
  Processing section "[Public ReadOnly]"
[2023/04/04 11:32:06.779612,  2] ../../source3/param/loadparm.c:2893(lp_do_section)
  Processing section "[TimeMachine]"
[2023/04/04 11:32:06.779875,  2] ../../source3/param/loadparm.c:2893(lp_do_section)
  Processing section "[Media]"
[2023/04/04 11:32:06.780076,  3] ../../source3/param/loadparm.c:1677(lp_add_ipc)
  adding IPC service
  added interface veth7bc2aae ip=169.254.10.36 bcast=169.254.255.255 netmask=255.255.0.0
  added interface vethe23e0c5 ip=169.254.32.188 bcast=169.254.255.255 netmask=255.255.0.0
  added interface veth7c1385a ip=169.254.43.19 bcast=169.254.255.255 netmask=255.255.0.0
  added interface vethcded778 ip=169.254.53.242 bcast=169.254.255.255 netmask=255.255.0.0
  added interface veth6fe3ca9 ip=169.254.131.99 bcast=169.254.255.255 netmask=255.255.0.0
  added interface veth232b952 ip=169.254.172.168 bcast=169.254.255.255 netmask=255.255.0.0
  added interface vetha5f3a81 ip=169.254.220.180 bcast=169.254.255.255 netmask=255.255.0.0
  added interface veth88aafc9 ip=169.254.229.108 bcast=169.254.255.255 netmask=255.255.0.0
  added interface docker0 ip=172.17.0.1 bcast=172.17.255.255 netmask=255.255.0.0
  added interface br-7b192404602e ip=172.21.0.1 bcast=172.21.255.255 netmask=255.255.0.0
  added interface wlan0 ip=192.168.0.157 bcast=192.168.0.255 netmask=255.255.255.0
  added interface br-4af4a540167a ip=192.168.64.1 bcast=192.168.79.255 netmask=255.255.240.0
  added interface br-0b8e333daa93 ip=192.168.80.1 bcast=192.168.95.255 netmask=255.255.240.0
[2023/04/04 11:32:06.783394,  3] ../../source3/smbd/server.c:1808(main)
  loaded services
[2023/04/04 11:32:06.783642,  1] ../../source3/profile/profile_dummy.c:30(set_profile_level)
  INFO: Profiling support unavailable in this build.
[2023/04/04 11:32:06.783721,  3] ../../source3/smbd/server.c:1827(main)
  Standard input is not a socket, assuming -D option
[2023/04/04 11:32:06.783782,  3] ../../source3/smbd/server.c:1840(main)
  Becoming a daemon.
[2023/04/04 11:32:06.785082,  2] ../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
  Registered MSG_REQ_POOL_USAGE
[2023/04/04 11:32:06.785359,  2] ../../source3/passdb/pdb_interface.c:163(make_pdb_method_name)
  No builtin backend found, trying to load plugin
[2023/04/04 11:32:06.786021,  3] ../../lib/util/modules.c:167(load_module_absolute_path)
  load_module_absolute_path: Module '/usr/lib/samba/pdb/smbpasswd.so' loaded
[2023/04/04 11:32:06.797127,  3] ../../source3/lib/util_procid.c:53(pid_to_procid)
  pid_to_procid: messaging_dgm_get_unique failed: No such file or directory
[2023/04/04 11:32:06.798585,  2] ../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
  Registered MSG_REQ_POOL_USAGE
[2023/04/04 11:32:06.800645,  2] ../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
  Registered MSG_REQ_POOL_USAGE
[2023/04/04 11:32:06.801411,  2] ../../lib/tdb_wrap/tdb_wrap.c:65(tdb_wrap_log)
  tdb(/var/lib/samba/registry.tdb): tdb_open_ex: could not open file /var/lib/samba/registry.tdb: No such file or directory
[2023/04/04 11:32:06.801557,  3] ../../lib/dbwrap/dbwrap_tdb.c:484(db_open_tdb)
  Could not open tdb: No such file or directory
[2023/04/04 11:32:07.095104,  3] ../../source3/auth/token_util.c:688(finalize_local_nt_token)
  Failed to fetch domain sid for WORKGROUP
[2023/04/04 11:32:07.099922,  2] ../../source3/smbd/server.c:1379(smbd_parent_loop)
  waiting for connections

and also (because of the 65536 character limit here):

Today when I manually try to connect, I get this in the logs (level 10):

[2023/04/04 12:30:21.916925, 10, pid=238, effective(0, 0), real(0, 0)] ../../source3/lib/messages.c:421(messaging_recv_cb)
  messaging_recv_cb: Received message 0x314 len 0 (num_fds:0) from 234
[2023/04/04 12:30:21.917767, 10, pid=238, effective(0, 0), real(0, 0)] ../../source3/smbd/smbd_cleanupd.c:173(smbd_cleanupd_process_exited)
  smbd_cleanupd_process_exited: cleaned up pid 250

I also should mention that the docker-compose.yml example file does no difference except also complaining about WSDD2. The issue(s?) is exactly the same.

Any pointers? Please help!

@MarvAmBass
Copy link
Member

thanks I'll take a look :)

@iwconfig
Copy link
Author

iwconfig commented Apr 4, 2023

Great! Thank you! :)

Oh and also I tried rebuilding the image, but that made no difference either.

@MarvAmBass
Copy link
Member

okay I've just started the latest image, it works without a problem on my side. logs are kinda messed up like:

samba_1  |   tdb(/var/lib/samba/registry.tdb): tdb_open_ex: could not open file /var/lib/samba/registry.tdb: No such file or directory

but I'm able to connect and browser and everything works as expected.

the container on your side is up and running, you use network_mode: host, this means there can be problems if your host system has services which are using the same ports - avahi for example. or maybe a locally installed samba service.

what's you host OS, do you use docker or any other system?

@MarvAmBass
Copy link
Member

the thing is, you don't seem to be the only one with wierd issues - it seems that some people can't use this container at all, while I and most people just start the compose file and it works

I also testet on raspberry pi 4 and a fresh ubuntu install and didn't have a problem

super super strange, I hope we find and solve this kind of issue! :)

@iwconfig
Copy link
Author

iwconfig commented Apr 4, 2023

Huh! I see...

It could be but I don't think so.

  • Rasberry pi OS Lite
  • I only use docker for all my stuff

I don't think any other service would interfere, but maybe syncthing does? It is containerized as well.

I'll have a look.

@MarvAmBass
Copy link
Member

yeah might be the case - or you shutdown most of the containers and just try samba as "standalone"

if possible you might be able to start samba on another server/computer and check if connection works there
sometimes firewall might also be an issue

@iwconfig
Copy link
Author

iwconfig commented Apr 4, 2023

Alright, I've now stopped all other docker containers. The only one running is samba-samba-1.

CONTAINER ID   IMAGE                            COMMAND                  CREATED         STATUS                   PORTS     NAMES
f0b5904f8956   ghcr.io/servercontainers/samba   "/container/scripts/…"   5 minutes ago   Up 4 minutes (healthy)             samba-samba-1

I also restarted everything:

  • My RPI4 (samba server)
  • My main computer
  • My Synology NAS (other samba server)
  • My router

Now StorageServer shows up but I still get connection timeout immediately. My Synology is still off (in case that would interfere somehow). Samba server on my Synology works.

I started up another computer and StorageServer does not show up there, and connecting manually to smb://rpi.local results in connection timeout (though not immediately).

On my Android phone, StorageServer does not show up either.

smb://rpi.local, smb://rpi.local:445 or smb://rpi.local:139 makes no difference.

I don't have any other service running on the host outside of docker.

@iwconfig
Copy link
Author

iwconfig commented Apr 4, 2023

Here's what's currently running on my RPI:

The output of top -b -n 1
top - 15:58:21 up 4 min,  1 user,  load average: 0.02, 0.11, 0.06
Tasks: 142 total,   1 running, 141 sleeping,   0 stopped,   0 zombie
%Cpu(s):  2.6 us,  2.6 sy,  0.0 ni, 94.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   7812.3 total,   7320.9 free,    130.6 used,    360.8 buff/cache
MiB Swap:    100.0 total,    100.0 free,      0.0 used.   7572.0 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1216 iwconfig     20   0    9716   3112   2704 R   5.9   0.0   0:00.04 top
      1 root      20   0  165224  10052   7360 S   0.0   0.1   0:02.06 systemd
      2 root      20   0       0      0      0 S   0.0   0.0   0:00.01 kthreadd
      3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp
      4 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_par_gp
      5 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 slub_flushwq
      6 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 netns
      7 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/0:0-mm_percpu_wq
      8 root       0 -20       0      0      0 I   0.0   0.0   0:00.61 kworker/0:0H-mmc_complete
      9 root      20   0       0      0      0 I   0.0   0.0   0:01.12 kworker/u8:0-events_unbound
     10 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mm_percpu_wq
     11 root      20   0       0      0      0 I   0.0   0.0   0:00.00 rcu_tasks_kthread
     12 root      20   0       0      0      0 I   0.0   0.0   0:00.00 rcu_tasks_rude_kthread
     13 root      20   0       0      0      0 I   0.0   0.0   0:00.00 rcu_tasks_trace_kthread
     14 root      20   0       0      0      0 S   0.0   0.0   0:00.02 ksoftirqd/0
     15 root      20   0       0      0      0 I   0.0   0.0   0:00.11 rcu_preempt
     16 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 migration/0
     17 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/0
     18 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/1
     19 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 migration/1
     20 root      20   0       0      0      0 S   0.0   0.0   0:00.01 ksoftirqd/1
     21 root      20   0       0      0      0 I   0.0   0.0   0:00.03 kworker/1:0-events_power_efficient
     22 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/1:0H-events_highpri
     23 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/2
     24 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 migration/2
     25 root      20   0       0      0      0 S   0.0   0.0   0:00.01 ksoftirqd/2
     26 root      20   0       0      0      0 I   0.0   0.0   0:00.08 kworker/2:0-events
     27 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/2:0H-kblockd
     28 root      20   0       0      0      0 S   0.0   0.0   0:00.00 cpuhp/3
     29 root      rt   0       0      0      0 S   0.0   0.0   0:00.00 migration/3
     30 root      20   0       0      0      0 S   0.0   0.0   0:00.01 ksoftirqd/3
     31 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/3:0-events
     32 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/3:0H-kblockd
     33 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kdevtmpfs
     34 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 inet_frag_wq
     35 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/0:1-events
     36 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kauditd
     37 root      20   0       0      0      0 I   0.0   0.0   0:00.24 kworker/0:2-events
     38 root      20   0       0      0      0 S   0.0   0.0   0:00.00 khungtaskd
     39 root      20   0       0      0      0 I   0.0   0.0   0:00.28 kworker/u8:1-events_unbound
     40 root      20   0       0      0      0 S   0.0   0.0   0:00.00 oom_reaper
     41 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 writeback
     42 root      20   0       0      0      0 S   0.0   0.0   0:00.01 kcompactd0
     43 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kintegrityd
     44 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kblockd
     45 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 blkcg_punt_bio
     46 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 watchdogd
     47 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/u8:2-writeback
     48 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/1:1-events_power_efficient
     49 root       0 -20       0      0      0 I   0.0   0.0   0:00.23 kworker/1:1H-kblockd
     50 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rpciod
     51 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 xprtiod
     52 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/u8:3
     53 root      20   0       0      0      0 I   0.0   0.0   0:00.15 kworker/2:1-events
     54 root      20   0       0      0      0 I   0.0   0.0   0:00.02 kworker/3:1-events
     55 root      20   0       0      0      0 S   0.0   0.0   0:00.00 kswapd0
     56 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 nfsiod
     57 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kthrotld
     60 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/1:2-cgroup_destroy
     62 root      20   0       0      0      0 I   0.0   0.0   0:00.05 kworker/0:3-events
     63 root      20   0       0      0      0 S   0.0   0.0   0:00.00 hwrng
     64 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 iscsi_conn_clea
     65 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 nvme-wq
     66 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 nvme-reset-wq
     67 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 nvme-delete-wq
     69 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 DWC Notificatio
     70 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 uas
     71 root       1 -19       0      0      0 S   0.0   0.0   0:00.00 vchiq-slot/0
     72 root       1 -19       0      0      0 S   0.0   0.0   0:00.00 vchiq-recy/0
     73 root       0 -20       0      0      0 S   0.0   0.0   0:00.00 vchiq-sync/0
     74 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 zswap-shrink
     75 root       0 -20       0      0      0 I   0.0   0.0   0:00.52 kworker/u9:0-brcmf_wq/mmc1:0001:1
     96 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 sdhci
     97 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/36-mmc0
     98 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/2:2
     99 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mmc_complete
    100 root       0 -20       0      0      0 I   0.0   0.0   0:00.29 kworker/2:1H-kblockd
    101 root       0 -20       0      0      0 I   0.0   0.0   0:00.02 kworker/0:1H-kblockd
    102 root      20   0       0      0      0 S   0.0   0.0   0:00.02 jbd2/mmcblk0p2-8
    103 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ext4-rsv-conver
    104 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/2:2H
    105 root       0 -20       0      0      0 I   0.0   0.0   0:00.22 kworker/3:1H-kblockd
    106 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/0:4-mm_percpu_wq
    107 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/1:2H
    108 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mld
    109 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 ipv6_addrconf
    111 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/3:2H
    125 root       0 -20       0      0      0 I   0.0   0.0   0:00.01 kworker/0:2H-mmc_complete
    141 root      20   0   49112  17124  16192 S   0.0   0.2   0:00.68 systemd-journal
    154 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/2:3-cgroup_destroy
    161 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/3:2-cgroup_destroy
    174 root      20   0   21648   6156   3772 S   0.0   0.1   0:01.07 systemd-udevd
    202 root      20   0       0      0      0 S   0.0   0.0   0:00.00 vchiq-keep/0
    207 root      10 -10       0      0      0 S   0.0   0.0   0:00.00 SMIO
    244 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 cfg80211
    245 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mmal-vchiq
    252 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mmal-vchiq
    254 root     -51   0       0      0      0 S   0.0   0.0   0:00.00 irq/37-feb10000.codec
    255 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mmal-vchiq
    259 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mmal-vchiq
    261 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mmal-vchiq
    262 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mmal-vchiq
    264 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 mmal-vchiq
    267 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 brcmf_wq/mmc1:0
    272 root      20   0       0      0      0 S   0.0   0.0   0:00.04 brcmf_wdog/mmc1:0001:1
    297 root       0 -20       0      0      0 I   0.0   0.0   0:00.01 kworker/u9:1-hci0
    298 root      20   0       0      0      0 I   0.0   0.0   0:00.01 kworker/1:3-events_power_efficient
    320 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/3:3-cgroup_destroy
    331 systemd+  20   0   88108   6264   5532 S   0.0   0.1   0:00.31 systemd-timesyn
    366 avahi     20   0    7076   2796   2484 S   0.0   0.0   0:00.12 avahi-daemon
    367 root      20   0    6696   2356   2160 S   0.0   0.0   0:00.01 cron
    368 message+  20   0    8148   3912   3364 S   0.0   0.0   0:00.21 dbus-daemon
    376 root      20   0  233960   6224   5532 S   0.0   0.1   0:00.08 polkitd
    382 root      20   0  220884   3288   2824 S   0.0   0.0   0:00.09 rsyslogd
    385 avahi     20   0    6892    312      0 S   0.0   0.0   0:00.00 avahi-daemon
    394 root      20   0   14384   6480   5672 S   0.0   0.1   0:00.26 systemd-logind
    395 nobody    20   0    5484   2496   2276 S   0.0   0.0   0:00.01 thd
    396 root      20   0   13580   4760   4140 S   0.0   0.1   0:00.03 wpa_supplicant
    444 root      20   0   92292     96      0 S   0.0   0.0   0:00.07 rngd
    460 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/3:4-cgroup_destroy
    478 root      20   0 1417616  41032  26384 S   0.0   0.5   0:00.58 containerd
    483 root      20   0       0      0      0 I   0.0   0.0   0:00.00 kworker/3:5
    485 root      20   0  244192   9912   8368 S   0.0   0.1   0:00.13 ModemManager
    496 root      20   0   13984   3712   2780 S   0.0   0.0   0:00.01 wpa_supplicant
    508 root      20   0   13652   6948   6000 S   0.0   0.1   0:00.03 sshd
    536 root      20   0    2124    136      0 S   0.0   0.0   0:00.00 hciattach
    538 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 kworker/u9:2
    550 root      20   0   23864   9228   8072 S   0.0   0.1   0:00.05 bluetoothd
    618 root      20   0    3052   1748   1324 S   0.0   0.0   0:00.00 dhcpcd
    619 root      20   0 1516652  68256  42248 S   0.0   0.9   0:01.60 dockerd
    622 root      20   0    5476   1316   1212 S   0.0   0.0   0:00.01 agetty
    658 iwconfig     20   0   16040   8136   6848 S   0.0   0.1   0:00.25 systemd
    666 iwconfig     20   0  169000   4612   1676 S   0.0   0.1   0:00.00 (sd-pam)
    860 root      20   0  720180   9412   7360 S   0.0   0.1   0:00.24 containerd-shim
    882 root      20   0     852    568    528 S   0.0   0.0   0:00.05 runsvdir
    902 root      20   0     832      4      0 S   0.0   0.0   0:00.00 runsv
    903 root      20   0   44572  17688  15368 S   0.0   0.2   0:00.22 smbd
    923 root      20   0   43296   5176   2864 S   0.0   0.1   0:00.00 smbd-notifyd
    924 root      20   0   43288   4756   2444 S   0.0   0.1   0:00.00 cleanupd
    932 root      20   0   16000   7852   6660 S   0.0   0.1   0:00.02 sshd
    938 iwconfig     20   0   16272   4744   3512 S   0.0   0.1   0:00.35 sshd
    939 iwconfig     20   0    8088   4924   3176 S   0.0   0.1   0:00.13 bash

@iwconfig
Copy link
Author

iwconfig commented Apr 4, 2023

Alright, I think I solved it, at least partly so.

I found this bit of information:

Note: If you are already running Samba/Avahi on your Docker host (or you're wanting to run this on your NAS), you should be aware that using --net=host will cause a conflict with the Samba/Avahi install. Raspberry Pi users: be aware that there is already an mDNS responder running on the stock Raspberry Pi OS image that will conflict with the mDNS responder in the container.

I guess this is the main culprit. I solved it by following the instructions provided:

  • Changing the following in /etc/avahi/avahi-daemon.conf (host) to:
    • enable-reflector=yes
    • cache-entries-max=0

Didn't bother with hostname.

The errors in the log did not go away but I did manage to log in to the samba server from my iMac, but not my Linux computer for some reason. IIRC I managed to log in via my Android phone as well but only manually by IP and not FQDN.

An alternative solution is also mentioned, where you use the macvlan driver in Docker. I did not have any success with that solution though. Not sure why.

I'm going to leave this though, because I became aware that Time Machine in OS X 10.11 El Capitan unfortunately does not handle Samba. I wish I'd known that from the beginning :) So now I use your Netatalk image instead.

Anyway that seems to have solved it for me. And maybe it does for somebody else too, thanks to mbentley/docker-timemachine!

@iwconfig iwconfig closed this as completed Apr 4, 2023
@MarvAmBass
Copy link
Member

ohhh interessting, so there is a mtls service running on raspberry os.

if on the outside there is an avahi running, you could mount the avahi config into the container, so the container puts it's service into the folder and it should be announced by the host - and the container doesn't start avahi - so there should be no conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants