Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

How to Install MiniDLNA on FreeNAS 9.3 (Prior to Plugin)

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
8,257
Thanks a lot. It was so easy to follow and setup my server.
No problem. I will add to the instructions once FreeNAS 11.2 comes out as I expect the GUI to change and I'm not 100% certain how easy these instructions would be to follow. I may even just create a new thread. But we have a bit of time before that happens, I don't want to get ahead of myself, I just was to do it right.
 

IceBoosteR

FreeNAS Experienced
Joined
Sep 27, 2016
Messages
503
I can report a very strange behaviour.
So starting the jail with the WebGUI, no problem - the minidlna service comes up when the jail was started.
When I start the jail with the mobile app (yes my friends - there is a mobile app!) the jail is started, but not with the minidlna service running.
I could not explain this to myself, as the application is also accesssing the API from WebGUI so I do not understand why the service is not started. Any suggestions?
This was working fine on 9.10.X

Rgds,
Ice
Couldn't find out what the problem is. Spoke to the developer who told me, that this might be an FreeNAS issue, as the API calls are the same. Anyone who can help me here? :)
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
8,257
Couldn't find out what the problem is. Spoke to the developer who told me, that this might be an FreeNAS issue, as the API calls are the same. Anyone who can help me here? :)
Wish I could help but my flip phone doesn't help me in this situation. Didn't know there was a mobile app either.
 
Joined
Feb 18, 2018
Messages
1
Hello there, I have installed MiniDLNA on my freenas machine. Works great except after some time or after I add new files, the service stops and does not come back up. I then have to manually restart the service. Unfortunateley it then scans the storage device for over 15min every time. Is there any fix for that`?
 
Joined
Feb 24, 2018
Messages
2
Hello everyone,

First, thank you joeschmuck for your tutorial and all the updates which comes with it.

I am using FreeNAS 11.11 U2, with 6 disks of 2To each, which are in one Raidz1 pool. I have configured 8 shares from this pool, all in Windows permissions to use ACL permissions. One of the subfolder of Share1 contain some movies in it, which I wanted to cast on different computers and televisions supporting DLNA. I followed carefully every steps of your tutorial 3 times, but it still doesn't work for me.

After activating the service with "service minidlna onestart", the MiniDLNA Server appears in VLC and in Windows Movie Player, but I can't see any files or folders. So I tried to solve this issue by myself and did the following :
  1. Update the system to the last version ;
  2. Create the same users and groups which have access to the folders and files into the jail, as they are in my FreeNAS system with the commands "pw groupadd Public -g 1014" and "pw usermod UserPublic -G Public" ;
  3. Added “root_container=B” at the end of the file “minidlna.conf”.
Unfortunately, it still doesn’t work, so I request your help on this issue.

Thank you beforehand,

Azalthar
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
8,257
Hello there, I have installed MiniDLNA on my freenas machine. Works great except after some time or after I add new files, the service stops and does not come back up. I then have to manually restart the service. Unfortunateley it then scans the storage device for over 15min every time. Is there any fix for that`?
Without knowing more details on your setup and how many files you have I would have to say there is not fix. MiniDLNA is great for a small listing of files but when you start throwing thousands of files at it, well it will take considerable time to rescan all of those files. Keep in mind that MiniDLNA was ported over to FreeBSD and thus is not perfect for FreeBSD. Your best option could be to use Plex's built in DLNA service, it works flawlessly with FreeNAS.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
8,257
Hello everyone,

First, thank you joeschmuck for your tutorial and all the updates which comes with it.

I am using FreeNAS 11.11 U2, with 6 disks of 2To each, which are in one Raidz1 pool. I have configured 8 shares from this pool, all in Windows permissions to use ACL permissions. One of the subfolder of Share1 contain some movies in it, which I wanted to cast on different computers and televisions supporting DLNA. I followed carefully every steps of your tutorial 3 times, but it still doesn't work for me.

After activating the service with "service minidlna onestart", the MiniDLNA Server appears in VLC and in Windows Movie Player, but I can't see any files or folders. So I tried to solve this issue by myself and did the following :
  1. Update the system to the last version ;
  2. Create the same users and groups which have access to the folders and files into the jail, as they are in my FreeNAS system with the commands "pw groupadd Public -g 1014" and "pw usermod UserPublic -G Public" ;
  3. Added “root_container=B” at the end of the file “minidlna.conf”.
Unfortunately, it still doesn’t work, so I request your help on this issue.

Thank you beforehand,

Azalthar
While in the jail for MiniDLNA, under the /media folder, do you see your shared files? If not then you did not setup you jail shares properly. If you do see your files there then I would suspect the issue is a permission failure and permissions is not something I'm strong at. Remember one thing, MiniDLNA also needs access to those files. To rule out a permission issue go ahead and give full permissions to a few of the files/folders and see if that fixes the issue.
 
Joined
Feb 24, 2018
Messages
2
While in the jail for MiniDLNA, under the /media folder, do you see your shared files? If not then you did not setup you jail shares properly. If you do see your files there then I would suspect the issue is a permission failure and permissions is not something I'm strong at. Remember one thing, MiniDLNA also needs access to those files. To rule out a permission issue go ahead and give full permissions to a few of the files/folders and see if that fixes the issue.
Yes, I see the shared files and folders under /media in the jail. So, as it look like as a permission issue, I did the following changes :
  1. Create the group "Users" as it is in FreeNAS with the command "pw groupadd Users -g 1003" ;
  2. Recreate the user "UserPublic" with the group "Users" as primary group and the group "Public" as member group just like in FreeNAS (id, etc...) with the command "pw useradd UserPublic -g Users -u 1005 -G Public" ;
  3. Restart FreeNAS and the service in jail.
Unfortunately, it did not help, and I'm running out of ideas. If anyone has a solution about this, I would be grateful.

Again, thank you for your support joeschmuck,

Azalthar
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
8,257
Unfortunately, it did not help, and I'm running out of ideas. If anyone has a solution about this, I would be grateful.
Did you figure this out yet? I know the reason is the permissions/groups you are using. You should go back to the group "media", the default I believe for MiniDLNA. Or just set all off the media to 777 and see if it works. If it works then change the permissions as needed up tot he point that it fails.
 

EtienneB

Newbie
Joined
Feb 19, 2018
Messages
11
u
Yes, I see the shared files and folders under /media in the jail. So, as it look like as a permission issue, I did the following changes :
  1. Create the group "Users" as it is in FreeNAS with the command "pw groupadd Users -g 1003" ;
  2. Recreate the user "UserPublic" with the group "Users" as primary group and the group "Public" as member group just like in FreeNAS (id, etc...) with the command "pw useradd UserPublic -g Users -u 1005 -G Public" ;
  3. Restart FreeNAS and the service in jail.
Unfortunately, it did not help, and I'm running out of ideas. If anyone has a solution about this, I would be grateful.

Again, thank you for your support joeschmuck,

Azalthar
Did you find a solution? I also see my files in /media within the jail, but when I access the minidlna on my tv/pvr player, the folders Videos, Music, Photos and Browse all (I believe), all are empty. I will try the 777 permissions on some folders.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
8,257
u


Did you find a solution? I also see my files in /media within the jail, but when I access the minidlna on my tv/pvr player, the folders Videos, Music, Photos and Browse all (I believe), all are empty. I will try the 777 permissions on some folders.
Just to be clear here, you have changed the permissions and/or created a new group/user account and went off the path of my instructions? Or are you having issues after using my instructions? If this is the latter, please include all your details.
 

EtienneB

Newbie
Joined
Feb 19, 2018
Messages
11
Just to be clear here, you have changed the permissions and/or created a new group/user account and went off the path of my instructions? Or are you having issues after using my instructions? If this is the latter, please include all your details.
I had Freenas running already with my user account and as I came from Zfsguru I had different permissions. I then followed all your steps.

Now I have changed the permissions in my storage tank and it works.
I changed the permissions of my Movies folder to root and wheel and changed the read/write/execute permissions of owner/family/other to allowed (except write for family I believe).
Now it shows and plays all the files. Thanks.
 

EtienneB

Newbie
Joined
Feb 19, 2018
Messages
11
I can watch a movie on my Samsung TV now, but after around 15min it says it looses network connectivity and miniDLNA is no longer visible on the network. After I restart the jail, (it starts to reindex the movies too, so it takes moment), and I then can continue my movie. Any idea what the issue maybe? Memory? Some sort to temporary sleep mode within minidlna? Freenas itself continues to run without an issue.....
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
8,257
I can watch a movie on my Samsung TV now, but after around 15min it says it looses network connectivity and miniDLNA is no longer visible on the network. After I restart the jail, (it starts to reindex the movies too, so it takes moment), and I then can continue my movie. Any idea what the issue maybe? Memory? Some sort to temporary sleep mode within minidlna? Freenas itself continues to run without an issue.....
Sorry I'm just getting back to you, the wife had some surgery and she gets my full attention, not the computer. I haven't checked my emails in several days. You can check the MiniDLNA logs to see if it shut down, or check a computer to see if MiniDLNA is still available. It could be some compatability issue with your TV. I have used MiniDLNA with my Samsung TV without issue on several occaisions but now I use Plex and my Roku, I like the interface better. But my point is that it should work without issue of course. BTW, Plex does support DLNA so if you have the resources then you could try Plex DLNA service to see if that works better.

Is your TV using a WiFi connection or hardwire? You can try hardwire if you're not using it right now as a test.
 

EtienneB

Newbie
Joined
Feb 19, 2018
Messages
11
Sorry I'm just getting back to you, the wife had some surgery and she gets my full attention, not the computer. I haven't checked my emails in several days. You can check the MiniDLNA logs to see if it shut down, or check a computer to see if MiniDLNA is still available. It could be some compatability issue with your TV. I have used MiniDLNA with my Samsung TV without issue on several occaisions but now I use Plex and my Roku, I like the interface better. But my point is that it should work without issue of course. BTW, Plex does support DLNA so if you have the resources then you could try Plex DLNA service to see if that works better.

Is your TV using a WiFi connection or hardwire? You can try hardwire if you're not using it right now as a test.

Hope your wife is doing well. I was away for a while, sorry for my late feedback.
The TV is wired via a router to my freenas server. My Macbook (via VLC) does detect the miniDLNA initially but after the 15min playing, the miniDLNA detection is lost, it still does detect other devices on the network though. After restarting the jails the miniDLNA shows up again. The Jail itself keeps running well, I can shell login to the jail via freenas.local. I am a bit lost here where to look.
I got the feeling this has something to do with it in the log file:
" upnpevents.c:430: fatal: upnpevents_selectfds: file descriptor 2335 too big for select, limit is 1024"
I did find remarks from 2014 about this error, but I guess after 4 years no patch would be needed anymore. Can give it a try though.

I tried Plex though, somehow it doesn't play all MKV files nicely (says it can't connect to server, while other older files play okay).
 

hervon

FreeNAS Experienced
Joined
Apr 23, 2012
Messages
255
Anyone installed minidlna in a iocage yet ? I’ll give it a try this week-end and report back.
 

hervon

FreeNAS Experienced
Joined
Apr 23, 2012
Messages
255
Yes 11.2 beta 2. Will report back.
 
Top