Kodi Community Forum

Full Version: DB Pi3 / Windows 7 / FreeNas - Workgroup Naming Issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi Everyone - I am just getting started with Raspberry Pi3, and am trying to get Kodi up and running on one for a bedroom media server.  I'm a 20 year veteran programmer on Windows systems, but am fairly new to the *nix environments that run on the Pi3.

My problem appears to be the network WorkGroup value when running on the Pi3.

My setup is a Windows 7 machine running Kodi (latest build), which scans the media library that is stored on my FreeNas server (1,064 Movies, 4360 MP3's, etc).  
My Windows 7 Workgroup is defined as "NETLUCAS".  
The FreeNAS server has Samba running, and is configured for discovery as "NAS1"; I do not have "NAS1" defined in any TCP HOSTS file or anything - it simply finds it based upon network discovery.
I have a MySQL instance running on the Windows 7 machine, and have configured Kodi (via advancedsettings.xml) to write media information to the MySQL DB (shared settings).
I scan my NAS1 Movies library from the Windows 7 Kodi instance, and can see / play media content just fine.
I can see via MySQL Workbench that the media files are getting placed in the Movies DB with a "smb:NAS1\Media01\Movies\movie folder..." prefix.  

So I bought a Raspberry Pi3 kit and started configuring it last night.  I installed OSMC, and let it apply all updates.  I configured OSMC to point to the MySQL instance running on the Windows 7 machine, and set the Samba WorkGroup to NETLUCAS to match my Windows 7 machine workgroup setting.  All is well with the world at this point; I see my movies coming up in the Pi3 Kodi.

The problem occurs when I try to play a movie on the Pi3 Kodi.  I get a "path not found" error, and it wants to remove the movie from the library because it can't seem to find it.

So I start playing with the Pi3 Kodi Media Settings. I am able to see my FreeNAS NAS1 server Samba shares from the Pi3, and can even scan the Movie content directly to the Pi3.  When done this way (no DB sharing), I notice that the Pi3 adds the WorkGroup name to the Samba path like so: "smb:NETLUCAS\NAS1\Media01\Movies\movie folder...".

I believe the problem to be that the Pi3 Kodi is adding the WorkGroup name to Samba media paths, but the path is not defined that way in the MySQL DB

So my question would be, is there a way to get the Pi3 Kodi to NOT add the Windows WorkGroup value to media paths?  I think that would allow the files to play.

Other things I have tried ...

I have edited the Pi3 "\etc\samba\samba.config" to set the workgroup to NETLUCAS.  That's another odd thing - it's almost like the Pi3 Kodi is not using the instance of Samba in the root folder, but rather is using it's own version of Samba somewhere else?  I say this, as I ran a command to install Samba (via SSH/Putty).  Is there a "Samba lite" that Kodi uses instead?  Maybe there is a configuration option in there that I am not setting correctly?  Though I would think the Kodi instance would allow me to tweak the "Samba lite" settings if it were using such a version.

I also re-scanned my media on the Windows 7 machine using the IP address of the FreeNas server (instead of "NAS1").  The MySQL Movies DB contained a "smb:192.168.1.250\Media01\Movies\movie folder..." prefix, and I can play the media just fine on my Windows 7 machine and the Pi3.  I would like to avoid using static IP addresses though, and would rather use the "NAS1" value.  Past experience with Windows server builds has taught me to avoid using static IP addresses if possible.

Any help or guidance would be appreciated, keeping in mind that I am new to Pi and *nix. 

Thanks - Todd
Why not copy your sources.xml from your Windows machine to the Pi3? That will configure the Pi3 with the same sources as you have on your Windows machine, and - for the FreeNAS content at least - should allow access to the same content you access on your Windows machine (local content on the Windows machine will not be accessible to the Pi3 - only network shared content can be seen by both machines). If you have a passwords.xml, copy that too. You need to copy both files to ~/.kodi/userdata on the Pi3.

Restart kodi on the Pi3 after copying the files, you should then find your FreeNAS content is accessible from the Pi3. If not, post a link to your debug log (wiki).
Thanks for your reply Milhouse.  I will take a look at the "sources.xml" files on both Win7 and RPi3 tonight when I get home from work to see what differences there are.

Note that I did not have to select "Add Network Location" when adding my media path on the Windows 7 machine.  I just clicked on the "Windows Network (SMB)" option.  
Here's what's odd though ...

Here's what I see on my Windows 7 Kodi when clicking on the "Windows Network (SMB)" option:
NAS1


Here's what I see on my RPi3 Kodi when clicking on the "Windows Network (SMB)" option:
NETLUCAS
I then click on the NETLUCAS entry, and see:
NAS1

It's almost like the Windows 7 machine is defaulting to the NETLUCAS workgroup display, and the RPi3 is not.  Since I have to select the NETLUCAS on the RPi3, it then adds it to the found media path when adding material to the database.

I'm thinking it's more of a Samba configuration problem than a media source problem, but am not sure.  I have edited the RPi3 "/etc/samba/cmb.conf" to ensure the "workgroup = NETLUCAS" is set.  Would I need to set anything related to WINS or NETBIOS in there maybe?

I appreciate your help!  Even though I am new to RPi's, I am loving the experience thus far!
(2017-10-18, 20:08)thlucas Wrote: [ -> ]I'm thinking it's more of a Samba configuration problem than a media source problem, but am not sure.  I have edited the RPi3 "/etc/samba/cmb.conf" to ensure the "workgroup = NETLUCAS" is set.  Would I need to set anything related to WINS or NETBIOS in there maybe?

I appreciate your help!  Even though I am new to RPi's, I am loving the experience thus far!

I don't know what version of Kodi you are using but /etc/samba/smb.conf won't be used by Kodi 17.4, as Kodi 17.4 uses ~/.kodi/.smb/smb.conf.

Your workgroup is configured using the Samba API (rather than whatever is in smb.conf) and uses whatever value you enter in Kodi Settings (default is WORKGROUP).
Milhouse Wrote:I don't know what version of Kodi you are using but /etc/samba/smb.conf won't be used by Kodi 17.4, as Kodi 17.4 uses ~/.kodi/.smb/smb.conf.

Your workgroup is configured using the Samba API (rather than whatever is in smb.conf) and uses whatever value you enter in Kodi Settings (default is WORKGROUP).

Ahhhh, that explains why I could not find the /etc/samba/smb.conf file initially, and why it contained "workgroup = WORKGROUP" after I installed Samba via SSH / Putty.

I will take a look tonight at the Kodi settings in ~/.kodi/.smb/smb.conf.

Also, I believe my Kodi is 17.4, as I just installed the latest version 3 days ago.

Thanks for your help!
I believe it was copying the "mediasources.xml" that did the trick, though I still have to specify the IP address of my NAS1 server in the "Add Network Location" details. I also copied the "sources.xml" and "passwords.xml" files as well. That begs the question ... why aren't the parameters in these xml configuration file stored in the database if using the MySQL DB sharing option? That would make things more of a "plug and play"; would not have to mess with SSH'ing to the RPi3, no copying files, etc and everything could be setup via the GUI. Not complaining, just a thought.

It also helps to run the RPi3 on a wired network, as wireless was buffering too much.

Other than that, I think I am good and the thread can be closed.

I appreciate your help Milhouse - thanks for pointing me in the right direction.