Page 1 of 2

ServerWMC problem with SMB2/3

Posted: 25 Apr 2019, 20:14
by McChen
I am using MrMC 3.8.1 on iOS and tvOS with the ServerWMC PVR plugin. However, ServerWMC playback doesn't work unless I enable SMBv1 on the server, even if I enable libsmb2 in MrMC. However, I'd much rather use SMB 2/3 as SMBv1 is highly insecure. Is this a known problem or is there a configuration I don't have right? I am also using ServerWMC with Kodi 18 on Android and that works fine with SMB 2/3.

Re: ServerWMC problem with SMB2/3

Posted: 25 Apr 2019, 21:47
by davilla
McChen wrote: 25 Apr 2019, 20:14 I am using MrMC 3.8.1 on iOS and tvOS with the ServerWMC PVR plugin. However, ServerWMC playback doesn't work unless I enable SMBv1 on the server, even if I enable libsmb2 in MrMC. However, I'd much rather use SMB 2/3 as SMBv1 is highly insecure. Is this a known problem or is there a configuration I don't have right? I am also using ServerWMC with Kodi 18 on Android and that works fine with SMB 2/3.
debuglog with libsmb2 enabled, please.

Re: ServerWMC problem with SMB2/3

Posted: 07 Aug 2019, 14:13
by McChen
Sorry for the delay, stopped using MrMC for awhile and now getting back to troubleshooting this. Relevant debug log below, let me know if you want more. Seems like it is unable to login for some reason, though the username/password and path are all correct. Any ideas?

21:14:09.795 T:6165737472 DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "GetServiceStatus|0.6.9|darwin"
21:14:09.801 T:6165737472 DEBUG: AddOnLog: PVR WMC Client: Socket::GetVector> Send request "GetServerVersion|2019-08-07 01:14:09|192.168.147.127"
21:14:09.831 T:6161723392 INFO: GLES: Enabling VSYNC
21:14:09.831 T:6161723392 INFO: GLES: Selected vsync mode 10
21:14:09.853 T:6165737472 DEBUG: found key /userdata/passwords.xml
21:14:09.853 T:6165737472 DEBUG: Previous line repeats 1 times.
21:14:09.853 T:6165737472 DEBUG: CPasswordManager:AuthenticateURL hasUserPass(0), path(smb://USERNAME:[email protected]/Recorded TV)
21:14:09.853 T:6165737472 DEBUG: SECTION:LoadDLL(libsmb2.framework/libsmb2)
21:14:09.854 T:6165737472 DEBUG: Loading: /var/containers/Bundle/Application/309E632A-F6DE-43F7-83D2-747E86BE4338/MrMC.app/Frameworks/libsmb2.framework/libsmb2
21:14:09.871 T:6165737472 ERROR: SMB2: connect to share 'Recorded TV' at server '192.168.147.127' failed. Session setup failed with (0xc000006d) STATUS_LOGON_FAILURE
21:14:09.871 T:6165737472 ERROR: AddOnLog: PVR WMC Client: Recorded tv 'smb://user1:[email protected]/Recorded TV' does not exist
21:14:09.871 T:6165737472 DEBUG: POParser: loaded 70 strings from file /private/var/containers/Bundle/Application/309E632A-F6DE-43F7-83D2-747E86BE4338/MrMC.app/AppData/AppHome/addons/pvr.wmc/resources/language/resource.language.en_gb/strings.po
21:14:09.872 T:6165737472 DEBUG: CAddonCallbacksAddon - QueueNotification - PVR WMC Client - Error Message : 'Recorded TV folder not found'
21:14:09.883 T:6165164032 DEBUG: PVRManager - Load - active clients found. continue to start

Re: ServerWMC problem with SMB2/3

Posted: 04 Oct 2019, 06:51
by McChen
any thoughts on this? still happening with the latest 3.9.2

Re: ServerWMC problem with SMB2/3

Posted: 05 Oct 2019, 00:45
by davilla
STATUS_LOGON_FAILURE means just that, either username or password is wrong. Or has odd chars that get mangled.

Or your smb server only supports smb1 protocol... kodi might be falling back to smb1, not sure.

I do know I run both a qnap and synology with smb2+ enabled and libsmb2 works fine.

Re: ServerWMC problem with SMB2/3

Posted: 05 Oct 2019, 07:38
by McChen
Thanks for the reply. The username and password is correct and has no odd characters. It gets the credentials from ServerWMC and I have Kodi 18.4 clients connected to ServerWMC and it works, only MrMC doesn't.

The server (Windows 8.1) only supports SMB2 and above, Microsoft has disabled SMB1 by default now. If I manually enable SMB1, MrMC works, but not with SMB2 or above. I would not rather run SMB1 just to support MrMC as it is a security risk. I also just tried adding an SMB2 share into MrMC as a library location, but that didn't work either, same authentication error.

Don't know what else to do at this point.

Re: ServerWMC problem with SMB2/3

Posted: 05 Oct 2019, 12:16
by davilla
let's try a debuglog with adding an SMB2 share into MrMC as a library location. Maybe that will show something.

Re: ServerWMC problem with SMB2/3

Posted: 12 Dec 2019, 17:45
by McChen
So after some experimentation, I've discovered the following:

The problem with SMBv2 happens only when connecting to a share on Windows 8.1, I can connect to Windows 10 shares OK. Even if I set the SMB shares to be open to "Everyone" with no username/password needed, it still fails

Replicated on both an Apple TV 4k and a nVidia Shield. Kodi 18.5 on the Shield though has no problems with SMBv2 shares on Windows 8.1.

Log from Apple TV 4k below. One odd thing I noticed is that the entry is listed as smb://USERNAME:PASSWORD@htpc/test without the inputted username and password. Not sure if this log is just masking the credentials or if that's part of the problem. In any case, setting the share to be open to "Everyone" didn't change anything

11:32:35.337 T:6133641216 DEBUG: Activating window ID: 10004
11:32:35.657 T:6133641216 DEBUG: ------ Window Deinit (Home.xml) ------
11:32:35.657 T:6133641216 DEBUG: ------ Window Init (Settings.xml) ------
11:32:35.657 T:6133641216 INFO: Loading skin file: Settings.xml, load type: KEEP_IN_MEMORY
11:32:39.249 T:6133641216 DEBUG: Activating window ID: 10003
11:32:39.577 T:6133641216 DEBUG: ------ Window Deinit (Settings.xml) ------
11:32:39.578 T:6133641216 INFO: Attempting to default to:
11:32:39.578 T:6133641216 DEBUG: ------ Window Init (FileManager.xml) ------
11:32:39.578 T:6133641216 INFO: Loading skin file: FileManager.xml, load type: KEEP_IN_MEMORY
11:32:41.230 T:6133641216 INFO: Loading skin file: DialogMediaSource.xml, load type: KEEP_IN_MEMORY
11:32:41.246 T:6133641216 DEBUG: ------ Window Init (DialogMediaSource.xml) ------
11:32:43.850 T:6133641216 INFO: Loading skin file: FileBrowser.xml, load type: KEEP_IN_MEMORY
11:32:43.857 T:6133641216 DEBUG: found key /userdata/mediasources.xml
11:32:43.858 T:6133641216 DEBUG: ------ Window Init (FileBrowser.xml) ------
11:32:46.393 T:6133641216 INFO: Loading skin file: DialogNetworkSetup.xml, load type: KEEP_IN_MEMORY
11:32:46.404 T:6133641216 DEBUG: ------ Window Init (DialogNetworkSetup.xml) ------
11:33:33.515 T:6133641216 DEBUG: ------ Window Deinit (DialogNetworkSetup.xml) ------
11:33:33.517 T:6133641216 DEBUG: CPasswordManager:AuthenticateURL hasUserPass(1), path(smb://USERNAME:PASSWORD@htpc/test)
11:33:33.517 T:6133641216 DEBUG: CDNSNameCache::Lookup, check by getaddrinfo
11:33:33.525 T:6133641216 DEBUG: getaddrinfo: 'htpc' -> '192.168.147.127'
11:33:33.539 T:6133641216 ERROR: SMB2: connect to share 'test' at server 'htpc' failed. Session setup failed with (0xc000006d) STATUS_LOGON_FAILURE

Re: ServerWMC problem with SMB2/3

Posted: 15 Dec 2019, 17:04
by davilla
smb://USERNAME:PASSWORD == masking the credentials, yes.

Re: ServerWMC problem with SMB2/3

Posted: 16 Dec 2019, 06:42
by McChen
Does libsmb2 have any known issues connecting to Windows 8.1 shares? Has anyone else reported issues with that or are you able to replicate?