smbd and nmbd daemons stop working unexpectedly

Problem
Samba services were started automatically when the server is powered on.
But after some time, the Samba services are not running any more.

Cause
Unknown.
smbd and nmbd daemons stopped working unexpectedly.
pgrep smbd and pgrep nmbd return no process id
What does the log say? See /opt/local/var/log.smbd and log.nmbd

Solution
Unknown.

Workaround
Restart the services manually

sudo launchctl start org.samba.nmbd; sudo launchctl start org.samba.smbd

Hint
Maybe adding a “keep alive” option in the org.samba.smbd.plist / org,samba.nmbd.plist will help?

                <key>KeepAlive</key>
                <dict>
                       <key>SuccessfulExit</key>
               <false/>
                </dict>

Beware:
Use SuccessfulExit = false!
So samba services only gets restarted in case of an unexpected error.
Otherwise, you’ll get a loop, when launchd is restarting samba over and over again.