"a stop job is running" for samba unmount

Adding an fstab editor to My OSMC isn’t on the roadmap. This could be potentially problematic, as incorrect configuration of /etc/fstab can lead to a non-bootable system. As the root filesystem is ext4, and most of our users use Windows, it would be difficult for them to revert this mistake without a Linux LiveCD.

Yeah I hadn’t thought of this that way. But I was more thinking about a config menu where people would just enter the ip , shared folder name and choose between NFS or Samba and it would be added to fstab without them having to edit it. But it was just an idea I thought I would share.

(Sorry if my posts aren’t clear, english is not my native language at all, doing my best here :stuck_out_tongue: )

I think it could confuse a lot of users if there were two ways to add shares.

The need to do this is low. The fact is that SMB mounting will almost always provide performance benefits however. But we don’t have a good way to achieve this yet.

Ok, thanks for your answers. Anyways if there’s any progress on this “a stop job is running” issue would you please let me know. I’d be happy to do any tests if I can help with that.

When we have a fix it will be released in an official OSMC update.

I will also update this thread.

I tried to replicate the problem today on a Vero 2.

I can’t replicate it with WiFi for NFS or Samba shares.

I think it may be a timing issue. If anyone wants to try:

Edit /lib/systemd/system/connman.service (make a backup).

Replace the contents of the file with this:

[Unit]
DefaultDependencies=false
Conflicts=shutdown.target
RequiresMountsFor=/var/lib/connman
After=dbus.service network-pre.target systemd-sysusers.service
Before=network.target multi-user.target shutdown.target
Wants=network.target

[Service]
Type=dbus
BusName=net.connman
EnvironmentFile=-/etc/connman.prefs
Restart=always
RestartSec=5
ExecStart = /usr/bin/start-network
ExecStopPost = /bin/sleep 2
StandardOutput=null

[Install]
WantedBy=multi-user.target

And reboot.

I’ve tried with an NFS share, I still get the “a stop job is running” error.

Perhaps this issue only occurs on a Raspberry Pi 3’s internal adapter.
That could suggest a timing issue with firmware timing, although as this is for BT, I am not sure if that should effect it.

While I agree that it is most likely a timing issue while I replicate the issue on a Pi2 with external wifi adapter

@sam_nazarko I’ve seen several posts about that particular issue on other pi. What I don’t get is the difference with Vero 2. If OSMC makes it work on vero there should be a way to make it work on pi…

I found this advice on reddit: etc/system.d/system.conf and edit the file to change DefaultTimeoutStartSec and DefaultTimeoutStopSec to "=10s",

Is it even safe to do that? Haven’t dared to try, could I ? it’s clearly not a solution to the problem at hand, rather a workaround.

Ok so I’ve tried that. I changed the values and uncommented the defaultimeoutstopsec in system.conf. The stop job is still running for 1min30. I don’t get it.

Any progress on this matter ??

No.

I do not know how to resolve this issue at this time

Fixed with fstab.

I experienced the same stop job error issue mounting a samba share on a rpi3 running the latest osmc. I confirm the error was observed with wifi, not wired.

There was a similar Debian bug reported which provided some suggestions.

The following fstab entry resolved the error for me.
//192.168.0.1/SMBDrive/Media /mnt/media cifs sec=ntlm,rw,defaults,guest,uid=1000,iocharset=utf8,x-systemd.requires=network.target,x-systemd.automount,noauto 0 0

I am still testing but the system has shutdown cleanly without error through approximately 10 reboots.

1 Like

I applied the same fstab entry to a rpi2 that was giving the same stop job error on shutdown. The entry appears to have resolved the issue on that device as well. Interestingly, the error persisted for a few reboots until it was resolved.

Thanks! I was having the same issue with an nfs mount on my Vero 4k. After making the modification to /lib/systemd/system/connman.service the stop job message is gone. It looks like the nfs mounting on reboot is now delayed until I want to play a remote file. Is that correct?

What’s your fstab look like?

My fstab is:

nas.lan:/share/movies /mnt/movies nfs noauto,x-systemd.automount 0 0

You should be using IP addresses instead of hostnames for fstab entries.

If the WiFi is up, but the DNS isn’t, something is seriously wrong in my network. Using hostnames allows me to renumber my network more easily. But thanks for the suggestion.