SMB shares fail after upgrading to 2024.08-1

Hello all,

Access from my Vero 4k to the SMB shares on my NAS have stopped working since I did an update today (this put me on 2024.08-1 of OSMC/ 22.1 of Kodi). I generally get Operation Not Permitted error messages. SMB v2 is lowest and SMB v3 is highest in OSMC. NAS server and shares can be seen from Windows and Linux machines on the network after authenticating.

Using the hostname vs FQDN vs IP address makes no difference in the Browse for Network dialog. I’ve tried a fresh install from a new disk image in case there was any remnants from previous installations.

Relevant snippet from the debug log when I tried to add a new video source.

2024-09-08 21:45:23.162 T:3137    debug <CWebserver[80]>: request received for /jsonrpc
2024-09-08 21:45:23.440 T:2939    debug <general>: Skipped 11 duplicate messages..
2024-09-08 21:45:23.440 T:2939    debug <general>: ------ Window Deinit (DialogSettings.xml) ------
2024-09-08 21:45:23.484 T:2939    error <general>: Unable to lookup host: '{NAS-name}'
2024-09-08 21:45:23.484 T:2939    debug <general>: OpenDir: Using authentication url smb://USERNAME:PASSWORD@{NAS-name}/{share-name}
2024-09-08 21:45:23.616 T:2939    error <general>: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME:PASSWORD@{NAS-name}/{share-name}'
                                                   unix_err:'1' error : 'Operation not permitted'
2024-09-08 21:45:23.617 T:2939    debug <general>: ------ Window Init (DialogConfirm.xml) ------
2024-09-08 21:45:23.617 T:2939     info <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2024-09-08 21:45:25.263 T:3143    debug <CWebserver[80]>: request received for /jsonrpc
2024-09-08 21:45:25.832 T:2939    debug <general>: Skipped 5 duplicate messages..
2024-09-08 21:45:25.832 T:2939    debug <general>: ------ Window Deinit (DialogConfirm.xml) ------
2024-09-08 21:45:25.835 T:2939    error <general>: GetDirectory - Error getting smb://USERNAME:PASSWORD@synology/video
2024-09-08 21:45:25.836 T:2939    debug <general>: ------ Window Init (DialogConfirm.xml) ------
2024-09-08 21:45:25.836 T:2939     info <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2024-09-08 21:45:27.266 T:3147    debug <CWebserver[80]>: request received for /jsonrpc
2024-09-08 21:45:28.613 T:2939    debug <general>: Skipped 11 duplicate messages..
2024-09-08 21:45:28.613 T:2939    debug <general>: ------ Window Deinit (DialogConfirm.xml) ------
2024-09-08 21:45:29.263 T:3153    debug <CWebserver[80]>: request received for /jsonrpc
2024-09-08 21:45:31.447 T:2939    debug <general>: Skipped 17 duplicate messages..
2024-09-08 21:45:31.447 T:2939    debug <general>: ------ Window Deinit (FileBrowser.xml) ------
2024-09-08 21:45:33.274 T:3162    debug <CWebserver[80]>: request received for /jsonrpc
2024-09-08 21:45:43.274 T:3182    debug <CWebserver[80]>: Skipped 35 duplicate messages..
2024-09-08 21:45:43.274 T:3182    debug <CWebserver[80]>: request received for /jsonrpc
2024-09-08 21:45:50.998 T:2960    debug <general>: Skipped 23 duplicate messages..

Would appreciate any help or pointers anyone could offer please…

There have been a couple of threads since the last update with people have issues resolving a host name. From memory the first thread was resolved by the person manually adding an entry to a hosts file in the OS, and the other was resolved by the user rebooting their router and switch. I’m not sure anyone has worked out why or if something changed with DNS.

As for browsing and an IP address not working this would be expected with SMBv1 not in use. I’d suggest to instead try in the browse section tell it to add a new network location and manually enter ONLY the host IP and credentials. Then once your back at the browse window try using that new network location to browse for your share.

Hello,

Thanks for the reply. To be clear are you suggesting that I SSH into the Vero and create/edit a hosts file there?

I’ll also try the browse and report back.

If it is a name resolution issue that would be one way to work around it assuming your network share is using a static IP [reference] without blowing up your library and starting over. Other options include figuring out why name resolution isn’t working, using a path sub in an advancedsettings.xml file, or manually editing ~/.kodi/userdata/passwords.xml changing the substitution tags with the credentials to ones using an IP instead of a hostname or FQDN.

@darwindesign thanks. Plenty to work on. I did blow the whole install away anyway so am starting from scratch, just to make sure it wasn’t a misbehaving add on.

Hello all,

I did, as per @darwindesign’s suggestion, edit the hosts file and that allows it to resolve the hostname of the NAS (works from a ping

if I remove that line from the hosts file and reboot ping hostname no longer works but ping by IP does.

So that tells me that name resolution is somehow borked if it can’t work without a hosts file entry.

State of play: added a network location, chose to ignore the Operation Not Permitted message and add it anyway. It shows up in the list but when I click on it I get another Operation Not Permitted

I restored my advancedsettings/passwords files from the previous install and the various files appeared in the library then.

Clicking on them doesn’t work though with two error messages appearing one after the other.

Have you tried rebooting your NAS? This sounds like it isn’t accepting your credentials but I don’t see how the OSMC update could have caused that without anyone else reporting that condition. You might also just check the passwords.xml file to make sure that it is adding the credentials in the way you expect it to.

Hello @darwindesign,

Yes, I’ve tried that. It’s a Synology NAS, I also went through the SMB settings there. My next step now is to break out Wireshark and sit a trace between the two machines. My money at this stage is something to do with DNS.*

The fact that the Vero can’t resolve the name until I put it in the hosts file is causing this line of thinking. Also in terms of apportioning blame I’m inclined to come down on the side of the Vero as this was working perfectly until I upgraded on Saturday last.

I have a Firestick pointed at the NAS also in another room so I’ll use that to see if it resolves from a non-Windows client although it is resolving already from an Ubuntu desktop which, if I’m correct, is also based on Debian.

Thanks for your time so far.

  • As the saying goes, “It’s always DNS.” :wink:

If you’re using a Synology NAS, you need to have the guest user active on the NAS and the DS Discovery service active on both sides, to be able to see and browse new Windows network (SMB) shares within the mediacenter dialogs. Of course you have to use a user/password on the NAS which has access to the share to use.

Looks to me that there are multiple issues (DNS, permissions, etc.)

Thanks @JimKnopf ,

What’s baffling me is that this was working until such time as I upgraded the Vero on Saturday last. Nothing else changed on that day. I have a known user with the appropriate RO permissions on the correct folders. That should be enough to connect AFAIK without enabling guest users etc.

I too am using a Synology NAS via SMB with my Vero V, and have had no issues since the August upgrade :thinking:
My setup is probably similar to yours, and I use the passwords.xml file to map access to the NAS to inject username/password, as I described in this post:

It’s not some of the security settings in your NAS kicking in, and blocking the IP address of the Vero? It would be worth checking the Block List on the NAS to be sure. I’ve got some very aggressive blocking on mine, but my LAN IP range is whitelisted.

My General SMB settings are to allow SMB2 & SMB3 only on my NAS.

I don’t think I have anything else really enabled (SMB3 Multichannel is disabled as I don’t have anything with multiple NICs that would benefit).

Thanks @Lewpy - I’ll check my SMB settings against yours when I get back home this evening.

Remain convinced that this is some kind of DNS issue. The DHCP server correctly gives out a lease. However there’s no A record in the DNS server. I’ll park it for now and do a bit more in-depth investigation at the weekend.

EDIT:
SMB settings the same as @Lewpy’s but no difference

I’ve just manually added my Vero V to my NAS’s ProtectionBlock List, and I can no longer browse my NAS from OSMC (as expected).
In my Kodi.log file, I get these entries now:

2024-09-11 07:47:19.978 T:3081    error <general>: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME:PASSWORD@{NAS-IP}/{share-name}'
                                                   unix_err:'1' error : 'Operation not permitted'
2024-09-11 07:47:19.978 T:3081    error <general>: GetDirectory - Error getting smb://{NAS-name}/{share-name}
[...]
2024-09-11 07:47:23.996 T:3028    error <general>: SMBFile->Open: Unable to open file : 'smb://USERNAME:PASSWORD@{NAS-IP}/{share-name}/{file}.mp4'
                                                   unix_err:'d' error : 'Permission denied'
2024-09-11 07:47:23.996 T:3028    error <general>: CFileCache::Open - <smb://{NAS-name}/{share-name}/{file}.mp4> failed to open

My Kodi connection to my NAS is via IP address (via transform in the passwords.xml file) so avoids any DNS issue (although my OpenWRT router does provide correct DNS resolution for the static DHCP reservations in it’s configuration).

So it is well worth checking that during the upgrade process and/or subsequent testing that you haven’t “locked out” your Vero 4k from your NAS.

Check the SecurityProtection settings in your NAS, and check the contents of the Allow/Block List. I’ve generally whitelisted by local LAN by adding the entire range (192.168.0.0/255.255.255.0) to the Allow List, and then automatically block malicious IPs coming in over the Internet (I have very aggressive settings for this, to block Botnet attacks on my NAS, etc.)

Also check the account you are using isn’t “Deactivated” in the NAS (assuming you aren’t using the same account from a known-working client).

Check the SecurityAccount settings too, for account lock-outs:

Pretty much check everything under Security in the NAS :slight_smile:

Thanks @Lewpy - appreciate the comprehensive answer. I’ll check those settings tonight and report back here.

I’m circling back to this so that it doesn’t just languish there unsolved. Transpires that it was not the fault of the Vero at all, rather it was the Synology box.

I ran up a Debian box (as that’s what OSMC is based on according to DistroWatch) to see how it functioned on the network. It installed fine, and I got it going with the domain. It appeared in the DNS and DHCP MMCs, whereupon like a bolt of lightning it struck me that the Synology wasn’t registered in DNS.

Whatever state the Synology had gotten itself into it was half-arsed joined to the domain so I removed it (from its own end and the AD end) and then rejoined it. It then appeared in DNS, and the Vero could ping it. I then had to unlock the RO media user as it was locked (tripped because of all the dubious login attempts) and all’s working fine now. I suspect somewhere along the line I raised the functional level of the domain and it caused this state in the Synology.

I don’t know why or how it was working prior to the upgrade but it was obviously limping along somehow with some vestigial configuration, which the upgrade just wasn’t aware of or didn’t tolerate. Post-install of the upgrade when it couldn’t resolve the hostname it just sat down and wouldn’t do anything.

Things I don’t yet know:

  • how/why it worked prior to the upgrade and it didn’t after
  • why it didn’t work when I manually plugged in the IP

Thanks to everyone who took their time to answer this query - it’s really appreciated!

1 Like