Samba fails: "Failed to create pipe directory"

This forum is for discussion about general software issues.

Samba fails: "Failed to create pipe directory"

Postby Lestrad » Sun Nov 10, 2019 2:06 pm

Hello. I have upgraded Samba from version 4.8. to version 4.10.10 to try to solve this problem, but it continues:

I am able to start and enable the smb.service and then connect to the shares on my Wandboard Quad from my Windows and Linux desktop computers. But if I reboot the Wandboard Samba fails with the following output (*..*" added by me for emphasis):


Code: Select all
smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: *failed* (Result: exit-code) since Sun 2019-11-10 14:05:56 CET; 1min 52s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 398 ExecStart=/usr/bin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=255/EXCEPTION)
 Main PID: 398 (code=exited, status=255/EXCEPTION)
   Status: "Starting process..."

Nov 10 14:05:54 alarm systemd[1]: Starting Samba SMB Daemon...
Nov 10 14:05:56 alarm smbd[398]: [2019/11/10 14:05:56.104125,  0] ../../source3/smbd/server.c:2074(main)
Nov 10 14:05:56 alarm smbd[398]:  *Failed to create pipe directory /run/samba/ncalrpc - No such file or directory*
Nov 10 14:05:56 alarm systemd[1]: smb.service: Main process exited, code=exited, status=255/EXCEPTION
Nov 10 14:05:56 alarm systemd[1]: smb.service: Failed with result 'exit-code'.
Nov 10 14:05:56 alarm systemd[1]: Failed to start Samba SMB Daemon.


If I create the /run/samba/ncalrpc directory I can successfully start the smb.service and after that again connect to the shares from other computers. But if I reboot Samba again fails to start and I see the same output as above. And the /run/samba/ncalrpc directory I created has disappeared.

This is the same problem I was experiencing with Samba version 4.8. I see that it has been documented here and there for some time, but I have never found a solution. Any suggestions would be appreciated.

TIA
Les
Lestrad
 
Posts: 21
Joined: Sun Oct 27, 2019 8:02 pm

Re: Samba fails: "Failed to create pipe directory"

Postby moonman » Thu Nov 14, 2019 8:32 pm

This directory you are missing is created by tmpfile that's distributed with the samba package.
Maybe it is not loaded in time for smb service? Though I have never seen this before.

Code: Select all
sytemctl status systemd-tmpfiles-setup


You can try to copy /usr/lib/systemd/system/smb.service to /etc/systemd/system
Edit /etc/systemd/system/smb.service to include
Code: Select all
After=systemd-tmpfiles-setup.service
in the [Unit] section.
Disable and enable smb.service and see if it helps.

If it works, then you can create an override file for smb.service instead of copying the whole service file to make it better suited for future updates, but I'll let you research that on your own.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3302
Joined: Sat Jan 15, 2011 3:36 am

[SOLVED]: Samba fails: "Failed to create pipe directory"

Postby Lestrad » Wed Nov 20, 2019 1:25 pm

I found the answer here: https://lists.opensuse.org/opensuse-bugs/2014-03/msg02445.html

Add the following line to /usr/lib/systemd/system/smb.service:

ExecStartPre=/usr/bin/mkdir -p /var/run/samba

Thanks to all, and especially moonman.
Lestrad
 
Posts: 21
Joined: Sun Oct 27, 2019 8:02 pm


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests