minidnla log file question

241 views
Skip to first unread message

Jacques Kruger

unread,
Feb 8, 2015, 1:09:45 PM2/8/15
to
Hi

I have minidnla running on my dns323 but I dont see any log file. Is there something that I did wrong?

regards

Jacques

João Cardoso

unread,
Feb 9, 2015, 11:56:06 AM2/9/15
to al...@googlegroups.com


On Sunday, February 8, 2015 at 6:09:45 PM UTC, Jacques Kruger wrote:
Hi

I have minidnla running on my dns323 but I dont see any log file.

Where have you searched for it? /var/log?
You can use the webUI: System->Utilities->View Logs

Jacques Kruger

unread,
Feb 9, 2015, 1:13:06 PM2/9/15
to al...@googlegroups.com
looks like I got it fixed. There was no Log file. Removed Minidlna, restarted NAS and re-installed Minidlna. Now the log file appears under: System->Utilities->View Logs

Now I just need to increase the number of watchers for Inotify

Inotify max_user_watches [8192] is low or close to the number of used watches [844] and I do not have permission to increase this limit

Any Sugestions?

Regards

Jacques Kruger

unread,
Feb 9, 2015, 3:15:39 PM2/9/15
to al...@googlegroups.com
Witch file do I need to edit to get this working? And how do I edit it?

João Cardoso

unread,
Feb 10, 2015, 12:36:08 PM2/10/15
to al...@googlegroups.com


On Monday, February 9, 2015 at 8:15:39 PM UTC, Jacques Kruger wrote:
Witch file do I need to edit to get this working? And how do I edit it?

On Monday, February 9, 2015 at 8:13:06 PM UTC+2, Jacques Kruger wrote:
looks like I got it fixed. There was no Log file. Removed Minidlna, restarted NAS and re-installed Minidlna. Now the log file appears under: System->Utilities->View Logs

Now I just need to increase the number of watchers for Inotify

Inotify max_user_watches [8192] is low or close to the number of used watches [844] and I do not have permission to increase this limit

Any Sugestions?

The full log line says it all:

[2015/02/10 17:21:27] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [4] and I do not have permission to increase this limit.  Please do so manually by writing a higher value into /proc/sys/fs/inotify/max_user_watches.

Notice that the above was with a zero files: warn: Scanning /mnt/md1/Public finished (0 files)!
 
So I don't know why is minidlna complaining, as there are no files/folders to watch for... a minidlna bug, certainly. (is 4 near 8192? according to minidlna it is)
In any case, to increase the limit, execute:

echo desired-number >  /proc/sys/fs/inotify/max_user_watches

What number? try several, e.g. 32768, 65536, ... if I were the minidlna author, I would set a watch on every folder, but probably a watch on every file will be easier (will ever a media file change?), so if you have a million media files, use a million of watches (and see your available memory vanish...)

Jacques Kruger

unread,
Feb 11, 2015, 1:02:12 AM2/11/15
to al...@googlegroups.com
Why is it when I restart the NAS then all the changes are back to original again?

João Cardoso

unread,
Feb 11, 2015, 11:04:55 AM2/11/15
to al...@googlegroups.com


On Wednesday, February 11, 2015 at 6:02:12 AM UTC, Jacques Kruger wrote:
Why is it when I restart the NAS then all the changes are back to original again?

What changes are you referring about?

Jacques Kruger

unread,
Feb 11, 2015, 3:17:09 PM2/11/15
to al...@googlegroups.com
If I change the max_user_watcher from 8192 to a higher amount. When I restart the Nas the amount is back to 8192...

So where you told me to change the value looks like it is only a temporary change. 

João Cardoso

unread,
Feb 11, 2015, 4:12:55 PM2/11/15
to al...@googlegroups.com


On Wednesday, February 11, 2015 at 8:17:09 PM UTC, Jacques Kruger wrote:
If I change the max_user_watcher from 8192 to a higher amount. When I restart the Nas the amount is back to 8192...

yes, that is normal and expected,.

You can add the following line to /etc/sysctl.conf
 
fs.inotify.max_user_watches = your-figure

If you don't know how to edit the file, just execute the following command:

echo fs.inotify.max_user_watches = your-figure >> /etc/sysctl.conf

At boot time it will be applied. At any time you can just type

sysctl fs.inotify.max_user_watches

to see the current value.

Jacques Kruger

unread,
Feb 12, 2015, 5:44:11 AM2/12/15
to
I did try it but still after restart the value is back at 8192

In witch folder is the sysctl.conf that I need to edit. I use WinScp to connect and edit the file. After edit I see the change and today's date on the file. After restart the file has 2010 date again and the change is missing.

I have attached a picture of the folder structure. The highlighted etc folder is where I edit the sysctl.conf file?
Inotify.jpg

João Cardoso

unread,
Feb 12, 2015, 9:30:13 AM2/12/15
to al...@googlegroups.com


On Thursday, February 12, 2015 at 10:44:11 AM UTC, Jacques Kruger wrote:
I did try it but still after restart the value is back at 8192

Have you saved settings afterwards? You have to. 

In witch folder is the sysctl.conf that I need to edit. I use WinScp to connect and edit the file.

You should not edit linux files with MS-Win editors.
If you do, either do it with a linux compatible text editor or run the 'dos2unix' on the file after editing with a text editor such as notepad.
 
After edit I see the change and today's date on the file. After restart the file has 2010 date again and the change is missing.

save settings. There is a red warning on the webUI whenever a file that needs to be saved on flash memory is changed; read the warning tooltip and click on it to go directly to System->Settings; and read that page online help (the (?) blue icon near the page title)
 

I have attached a picture of the folder structure. The highlighted etc folder is where I edit the sysctl.conf file?

notoneofmy

unread,
Feb 13, 2015, 9:54:40 AM2/13/15
to al...@googlegroups.com
Can I please take the audacity to ask whether all the problems that have
been noted about minidlan would be wrapped into a fix that folks can
simply apply, perhaps call it the definite "minidlna fix for rc4." None
of the fixes, removing jpeg, inotiy, flac, etc, have worked for me.
minidlna worked swell under RC3, though even then the inotiy thing was
an issue, and is now becoming the infamous SAMBA issue with Ubuntu
distros; year after year, same problems but no permanent fixs from the
distros as they were released. Instead, just stop-gap measures that
resulted in HowTos that could lineup from earth to Neptune. Though I've
been told 14 LTS has a fix now. Anyway, back to minidlna, can you please
say which other similar media apps, such as mt-daapd or others, it can
or cannot be installed alongside. If all, are any hard configurations
necessary from the user to make them all play together?

As always, my hat's off to you, "teacher."

Jacques Kruger

unread,
Mar 6, 2015, 8:46:21 AM3/6/15
to al...@googlegroups.com
Sorry for the late reply but was away on holiday.
It looks like mini dnla is working fine now. It was definitely the editing and saving of the file that was causing the problem. I used Notepad++ to edit the file and that seemed to help.

One other thing that I need some help with.
When I browse to the folders on my TV I have a "recently added" folder. This folder has the 50 latest files that I copied to my DNS323. This is part of the minidnla database file. I think this file should update automatically but it doesn't. I have to tick the "Rescan Shares" to update the db. This takes very long to update..

Is there a way to use Cron to schedule this database re-scan once a week?

Thanks 

João Cardoso

unread,
Mar 6, 2015, 11:19:42 AM3/6/15
to al...@googlegroups.com


On Friday, March 6, 2015 at 1:46:21 PM UTC, Jacques Kruger wrote:
Sorry for the late reply but was away on holiday.
It looks like mini dnla is working fine now. It was definitely the editing and saving of the file that was causing the problem. I used Notepad++ to edit the file and that seemed to help.

One other thing that I need some help with.
When I browse to the folders on my TV I have a "recently added" folder. This folder has the 50 latest files that I copied to my DNS323. This is part of the minidnla database file. I think this file should update automatically but it doesn't. I have to tick the "Rescan Shares" to update the db. This takes very long to update..

Is there a way to use Cron to schedule this database re-scan once a week?

Yes.
You have to stop minidlna and restart it in the "forces a full rescan" mode.
Probably you want to have the "Rescan Shares" always checked, so you only have to start/stop minidlna. This works fine if you have the box on 24/7.

Add two cron entries (Services->System->cron Configure) saying:

0 6:0 /sbin/rcminidlna stop
0 6:1 /sbin/rcminidlna start

To perform the restart every sunday at 6 in the morning

Jacques Kruger

unread,
Mar 6, 2015, 11:32:09 AM3/6/15
to al...@googlegroups.com
Thanks for the info, will give it a try

notoneofmy

unread,
Mar 7, 2015, 6:27:38 AM3/7/15
to al...@googlegroups.com

On 15-03-06 5:19 PM, João Cardoso wrote:
> Add two cron entries (Services->System->cron Configure) saying:
>
> 0 6:0 /sbin/rcminidlna stop
> 0 6:1 /sbin/rcminidlna start
>
> To perform the restart every sunday at 6 in the morning
Thanks a lot for this wonderful post "teacher" João.

Rafal B

unread,
Feb 28, 2016, 6:31:19 AM2/28/16
to al...@googlegroups.com
Would like to refresh this thread and ask for clarification because apparently I don't see miniDLNA works as I expect.
So, the case is as follow: I have configured miniDLNA: configured in config file a debug log level, added folders of my video and music content, did full scan and this is completed successfully.
Now: when I'm copying new movie file to the folder I see in the log it appearing at the very bottom line:

[2016/02/28 12:10:28] inotify.c:163: debug: Add watch to /mnt/MyNAS/2_FILMY/My_movie_023

And I see on my TV this movie when browsing "miniDLNA -> Video -> All Video" also at the bottom of the list.
But... in "miniDLNA -> Video -> Recently Added" there are only 50 movies added in the past but not that one My_movie_023 added recently.
How may I instruct miniDLNA to properly show "Recently Added" container? Of course would like to avoid forcing to rebuild DB by putting "Rescan shares" option to 1.


EDIT: I did a db rebuild, also uninstalled and installed miniDLNA again and I come to the conclusion that this is a bug in miniDLNA. Steps to reproduce the result are as follow:
- add a folder to miniDLNA containing more than 50-100 movies. Once discovery is completed all those movies will appear on TV in "miniDLNA -> Video -> All Video" and 50 of them in "miniDLNA -> Video -> Recently Added"
- copy new movie to the folder, wait until it is discovered by miniDLNA, go to "miniDLNA -> Video -> All Video" - that new movie will be available on the bottom of the list of all your movies BUT will be not available at all in "miniDLNA -> Video -> Recently Added"
I have also verified this behaviour with my friend who is using miniDLNA 1.1.5 - the same result.
Time to register that problem on miniDLNA forum.
Reply all
Reply to author
Forward
0 new messages