miniDLNA not showing all media files

15,031 views
Skip to first unread message

Robert Fargher

unread,
Jan 15, 2014, 6:19:25 PM1/15/14
to al...@googlegroups.com
Hi folks,

  There was a recent discussion on this list that introduced me to DLNA in general and miniDLNA in specific.  I've been using my DNS-323 Revision B to back up my video and music collections, which are located on three different machines. I fell in love with the idea of DNLA and eagerly installed miniDLNA on my Alt-F (wonderful software, many thanks João!) and configured it to scan the appropriate directories on my 323 that hold the backup copies of the video files.

  However, the scan of these directories never works properly.  The files are in /mnt/md0/Public/RW/Videos2 & Videos5 which together hold about 1.5 TB of files.  The scan starts in the Videos2 directory, gets about 1/3 of the way through the directory and then is finished. This incompletion is reproducible and results in a 718 KB files.db.  If I run miniDLNA on my desktop machine (Kubuntu Saucy) set to scan the NFS mounted videos2 and videos5 from the original machines, it works fine and the files.db file is many GB in size (over 100GB).

 In the config page for miniDLNA on Alt-F, the only things I've set are Storage Directory to /mnt/md0/Public and set it to Videos.  I've also set the Server Name and checked Rescan Shares only.

 Does anyone know why miniDNLA is stopping the scan of my videos long before it should?

--
Cheers,
R0b

João Cardoso

unread,
Jan 16, 2014, 11:03:05 AM1/16/14
to al...@googlegroups.com


On Wednesday, January 15, 2014 11:19:25 PM UTC, Robert Fargher wrote:
Hi folks,

  There was a recent discussion on this list that introduced me to DLNA in general and miniDLNA in specific.  I've been using my DNS-323 Revision B to back up my video and music collections, which are located on three different machines. I fell in love with the idea of DNLA and eagerly installed miniDLNA on my Alt-F (wonderful software, many thanks João!) and configured it to scan the appropriate directories on my 323 that hold the backup copies of the video files.

  However, the scan of these directories never works properly.  The files are in /mnt/md0/Public/RW/Videos2 & Videos5 which together hold about 1.5 TB of files.  The scan starts in the Videos2 directory, gets about 1/3 of the way through the directory and then is finished. This incompletion is reproducible and results in a 718 KB files.db.  If I run miniDLNA on my desktop machine (Kubuntu Saucy) set to scan the NFS mounted videos2 and videos5 from the original machines, it works fine and the files.db file is many GB in size (over 100GB).

There are several possible causes:

-does the Alt-F folder resides on a big enough filesystem?
Because the minidlna folder, /var/lib/minidlna, actually resides under /Alt-F

# realpath  /Alt-F/var/lib/minidlna/
/mnt/sda4/Alt-F/var/lib/minidlna

# df -h /mnt/sda4
Filesystem                Size      Used Available Use% Mounted on
/dev/sda4               486.2M     40.3M    445.9M   8% /mnt/sda4

This is not likely to be the reason, but first things first, as your minidlna  database has 100GB.

-Have you examined the minidlna log for possible errors? System->Utilities->View Logs
--it might be that some particular file is getting minidlna stuck. You have to move suspicious files to a non-scanned folder and retry.
--You might have a warning about "inotify" not having enough resources, and you want to not use "inotify" (at start) by setting inotify=no in /etc/minidlna
--remember that having "Rescan share" checked will rebuild the database every time minidlna starts; you want it checked during initial setup, or during the following detective work, or if you suspect that the database is corrupted, but not after that, as it is lengthy; after initial successful setup you want to disable it and enable inotify

-If the above does not give any clues, you have to restrict/segment the base folder to scan, perhaps using *only* Videos2, then *only* Videos5, then perhaps  *only* Videos2/Comedy... a detective work.

-I would also use the desktop computer minidlna to scan through NFS the Alt-F box, just in case some file is causing trouble after being copied?

-it is also possible, and it is the most likely cause, that minidlna (or any of the resources that it uses, such as ffmpeg or other video libraries) is badly built for Alt-F.
I'm updating most of the packages to their last releases, but I can't do thorough tests on them all -- that's the inconvenient of updating software versions, one tests it for a specific version when one first create it, but doing the same for tens of software packages is out of my resources.
If you identify some files, file types (or codecs), that cause the issue and report it back (or even better, post a small 5 seconds fragment of it), that could help others.

nesta...@gmail.com

unread,
Jan 18, 2014, 4:40:35 PM1/18/14
to al...@googlegroups.com
Further to all what João has said, which is important: when you're done doing them, delete the database file, restart and it will repopulate. If you don't it won't work, despite implementing all these good ideas. Use WinSCP to log into the box and delete the file. If you won't know how, let me know. 

Nicholas...

unread,
Mar 3, 2016, 10:23:12 AM3/3/16
to Alt-F
Hi João Cardoso

I've been using Alf-f on my D-Link 323 for about a year...  However I've been streaming or should saying playing videos and music by direct accessing the files and then playing them...  Although not complicated but it is cumbersome.

Lately it was suggested to simply add the minidlna to the alt-f and you can easily stream...  Sounded great, but it has been the start of a nightmare in debugging.

Diagnostics:

I can see the mimiDLNA server name but can't see the directories or file names in VLC or Windows Media Player.  So, it looks like VLC and Windows Media Player is working correctly but miniDLNA or Alf-F is not serving properly.

I have full access to all the directories and files when browsing using windows explorer.  I can also play the files through explorer using VLC and other programs.

I've also rebooted alt-f with rescan shares check box (checked) then rebooted again with it unchecked.  Still no life to file names or directories.  Can only see the server name (minidlna)

I noted there were several issues in the minidlna log file (attached immediately below):

[2016/03/03 09:59:18] minidlna.c:1026: warn: Starting MiniDLNA version 1.1.4.
[2016/03/03 09:59:18] minidlna.c:355: warn: Creating new database at /var/lib/minidlna/files.db
[2016/03/03 09:59:18] minidlna.c:1065: warn: HTTP listening on port 8200
[2016/03/03 09:59:18] playlist.c:125: warn: Parsing playlists...
[2016/03/03 09:59:18] playlist.c:259: warn: Finished parsing playlists.
[2016/03/03 09:59:18] sql.c:117: warn: sql_get_int_field: step failed: SQL logic error or missing database
SELECT count(*) from OBJECTS where PARENT_ID = '0';
[2016/03/03 09:59:19] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [0] 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.

I'm sure you've heard this all before.  As such I've read everything I could and tried many and all your previous noted suggestion in this chat and other threads.  But still no joy...

Any assistance would be appreciated...

Regards
Nicholas

João Cardoso

unread,
Mar 3, 2016, 12:06:14 PM3/3/16
to Alt-F


On Thursday, 3 March 2016 15:23:12 UTC, Nicholas... wrote:
Hi João Cardoso

I've been using Alf-f on my D-Link 323 for about a year...  However I've been streaming or should saying playing videos and music by direct accessing the files and then playing them...  Although not complicated but it is cumbersome.

Lately it was suggested to simply add the minidlna to the alt-f and you can easily stream...  Sounded great, but it has been the start of a nightmare in debugging.

Diagnostics:

I can see the mimiDLNA server name but can't see the directories or file names in VLC or Windows Media Player.

I can, but using an (old?) MS-media player. I don't use MS-Win often.
 
  So, it looks like VLC and Windows Media Player is working correctly but miniDLNA or Alf-F is not serving properly.

DLNA and uPnP is a mess, it works with some devices and not others. Implementations varies, and that must be your problem. Some users can use minidlna with some TV's and not another... I also test minidlna using Android and Linux clients, but some clients works better then other.
 

I have full access to all the directories and files when browsing using windows explorer.  I can also play the files through explorer using VLC and other programs.

You are using Samba/CIFS/SMB when using Windows Explorer, not minidlna.
 

I've also rebooted alt-f with rescan shares check box (checked) then rebooted again with it unchecked.  Still no life to file names or directories.  Can only see the server name (minidlna)

I noted there were several issues in the minidlna log file (attached immediately below):

[2016/03/03 09:59:18] minidlna.c:1026: warn: Starting MiniDLNA version 1.1.4.
[2016/03/03 09:59:18] minidlna.c:355: warn: Creating new database at /var/lib/minidlna/files.db
[2016/03/03 09:59:18] minidlna.c:1065: warn: HTTP listening on port 8200
[2016/03/03 09:59:18] playlist.c:125: warn: Parsing playlists...
[2016/03/03 09:59:18] playlist.c:259: warn: Finished parsing playlists.
[2016/03/03 09:59:18] sql.c:117: warn: sql_get_int_field: step failed: SQL logic error or missing database
SELECT count(*) from OBJECTS where PARENT_ID = '0';

That I never saw! But it is a warning, not an error. What does minidlna status page says after rescanning? Services->User->Minidlna->Configure->webpage? It should show the number and types of scanned files.

 

[2016/03/03 09:59:19] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [0] 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.

That is know and harmless (and it makes no sense, when is 8192 low or close to 0?) But 0 is odd, can it be that the 'warn: sql_get_int_field' warning is deploying that?
Does minidlna has all libraries available? What does 'ldd /usr/sbin/minidlna' says? (please post it output).
If a "not found" appears, try using the command 'ldconfig /usr/lib' (a "skipping /usr/X11R6/lib:" is expected), then repeat the above ldd to see if the "not found" disappears.


I'm sure you've heard this all before.
Not really... 
  As such I've read everything I could and tried many and all your previous noted suggestion in this chat and other threads.  But still no joy...
Try the above commands and other (Android?) dlna clients (plural ;-)

Nicholas...

unread,
Mar 3, 2016, 2:39:34 PM3/3/16
to Alt-F


On Thursday, March 3, 2016 at 12:06:14 PM UTC-5, João Cardoso wrote:


On Thursday, 3 March 2016 15:23:12 UTC, Nicholas... wrote:
Hi João Cardoso

I've been using Alf-f on my D-Link 323 for about a year...  However I've been streaming or should saying playing videos and music by direct accessing the files and then playing them...  Although not complicated but it is cumbersome.

Lately it was suggested to simply add the minidlna to the alt-f and you can easily stream...  Sounded great, but it has been the start of a nightmare in debugging.

Diagnostics:

I can see the mimiDLNA server name but can't see the directories or file names in VLC or Windows Media Player.

I can, but using an (old?) MS-media player. I don't use MS-Win often.

I've tried a Android, several programs including android VLC
I've tried on MS Win7 VLC, MSWinPlayer ONLY...  I have no other program sources for streaming.
 
  So, it looks like VLC and Windows Media Player is working correctly but miniDLNA or Alf-F is not serving properly.

DLNA and uPnP is a mess, it works with some devices and not others. Implementations varies, and that must be your problem. Some users can use minidlna with some TV's and not another... I also test minidlna using Android and Linux clients, but some clients works better then other.
 

I have full access to all the directories and files when browsing using windows explorer.  I can also play the files through explorer using VLC and other programs.

You are using Samba/CIFS/SMB when using Windows Explorer, not minidlna.

Surprised I said that...  Clearly you're correct...  I should have known this...  ;-(
 

I've also rebooted alt-f with rescan shares check box (checked) then rebooted again with it unchecked.  Still no life to file names or directories.  Can only see the server name (minidlna)

I noted there were several issues in the minidlna log file (attached immediately below):

[2016/03/03 09:59:18] minidlna.c:1026: warn: Starting MiniDLNA version 1.1.4.
[2016/03/03 09:59:18] minidlna.c:355: warn: Creating new database at /var/lib/minidlna/files.db
[2016/03/03 09:59:18] minidlna.c:1065: warn: HTTP listening on port 8200
[2016/03/03 09:59:18] playlist.c:125: warn: Parsing playlists...
[2016/03/03 09:59:18] playlist.c:259: warn: Finished parsing playlists.
[2016/03/03 09:59:18] sql.c:117: warn: sql_get_int_field: step failed: SQL logic error or missing database
SELECT count(*) from OBJECTS where PARENT_ID = '0';

That I never saw! But it is a warning, not an error. What does minidlna status page says after rescanning? Services->User->Minidlna->Configure->webpage? It should show the number and types of scanned files.
 

[2016/03/03 09:59:19] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [0] 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.

That is know and harmless (and it makes no sense, when is 8192 low or close to 0?) But 0 is odd, can it be that the 'warn: sql_get_int_field' warning is deploying that?
Does minidlna has all libraries available? What does 'ldd /usr/sbin/minidlna' says? (please post it output).
 
I've found the file "/usr/sbin/minidlna" but uncertain as to how to post the output of this file...  Please advise what to use...?

If a "not found" appears, try using the command 'ldconfig /usr/lib' (a "skipping /usr/X11R6/lib:" is expected), then repeat the above ldd to see if the "not found" disappears.


I'm sure you've heard this all before.
Not really... 
  As such I've read everything I could and tried many and all your previous noted suggestion in this chat and other threads.  But still no joy...
Try the above commands and other (Android?) dlna clients (plural ;-)

I've tried all applications on my main desktop, laptop, and android...  Needless to say...  Nada, Nothing, Nitche, you get the idea.  No Joy...!!!!
Auto Generated Inline Image 1

Joao Cardoso

unread,
Mar 3, 2016, 7:24:29 PM3/3/16
to Alt-F
No files were found, 0 Audio/Video/Images, so that's really a minidlna issue.
 

[2016/03/03 09:59:19] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [0] 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.

That is know and harmless (and it makes no sense, when is 8192 low or close to 0?) But 0 is odd, can it be that the 'warn: sql_get_int_field' warning is deploying that?
Does minidlna has all libraries available? What does 'ldd /usr/sbin/minidlna' says? (please post it output).
 
I've found the file "/usr/sbin/minidlna" but uncertain as to how to post the output of this file...  Please advise what to use...?
Just type

ldd /usr/sbin/minidlna

You should get something similar (not equal!) to

[root@DNS-320L]# ldd /usr/sbin/minidlna
        libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0xb6ebf000)
        libid3tag.so.0 => /usr/lib/libid3tag.so.0 (0xb6ea6000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb6df7000)
        libavformat.so.56 => /usr/lib/libavformat.so.56 (0xb6c8f000)
        libavutil.so.54 => /usr/lib/libavutil.so.54 (0xb6c49000)
        libexif.so.12 => /usr/lib/libexif.so.12 (0xb6c10000)
        libiconv.so.2 => /usr/lib/libiconv.so.2 (0xb6b28000)
        libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0xb6af3000)
        libogg.so.0 => /usr/lib/libogg.so.0 (0xb6ae7000)
        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb6ab3000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb6a9a000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6a87000)
        libc.so.0 => /lib/libc.so.0 (0xb6a26000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb6a0b000)
        libdl.so.0 => /lib/libdl.so.0 (0xb6a01000)
        libavcodec.so.56 => /usr/lib/libavcodec.so.56 (0xb5d39000)
        libm.so.0 => /lib/libm.so.0 (0xb5d20000)
        libswresample.so.1 => /usr/lib/libswresample.so.1 (0xb5d04000)
        libmp3lame.so.0 => /usr/lib/libmp3lame.so.0 (0xb5c88000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb6efe000)


If a "not found" appears, try using the command 'ldconfig /usr/lib'
 
If a "not found" appears, just type

ldconfig /usr/lib

(a "skipping /usr/X11R6/lib:" is expected), then repeat the above ldd to see if the "not found" disappears.

If a "not found" appears before but not after the ldconfig command, try again restarting minidlna and see if the suspicious 
warn: sql_get_int_field: step failed: SQL logic error or missing databa...
disappears.
You don't need a reboot, just stop minidlna, wait a couple of seconds and restart it.

Nicholas...

unread,
Mar 3, 2016, 10:51:42 PM3/3/16
to Alt-F
Hi João

It's great you're trying to help...  I'm very puzzled by this...  I've reviewed all the permissions and names for the user and groups...  All seems to be correct, although at this point I'm not 100% sure anymore...

I'm not sure where you wanted me to type in those commands.  I assume they are to be typed in the RUN... command under the START menu's in the left hand corner...?  If so, I've attached the results...  Both commands can't be found...  I'm guessing you want me to type these commands elsewhere?


Regards
Nicholas...
Auto Generated Inline Image 1

João Cardoso

unread,
Mar 4, 2016, 8:07:26 AM3/4/16
to Alt-F


On Friday, 4 March 2016 03:51:42 UTC, Nicholas... wrote:
Hi João

It's great you're trying to help...  I'm very puzzled by this...  I've reviewed all the permissions and names for the user and groups...  All seems to be correct, although at this point I'm not 100% sure anymore...

I'm not sure where you wanted me to type in those commands.

My mistake. Step by step:

-You have to login the DNS box using either the 'telnet' command (which is/was generally available on MS-Win) or the 'ssh' or 'putty' programs, a MS-Win lightweight ssh client. You should supply at login 'root' (without commas) as the user name and as password use the same password you use in the webUI.

-You will be dropped in a command line whose prompt message will be similar to '[root@DNS-320L]# ' where you can type commands. Don't make mistakes, you are using the SUPER-USER/Administrator login, which can do everything in the box, including removing all you files without asking for confirmation!

-type the command
ldd /usr/sbin/minidlna
and watch each output line to see if any "not found" message appears; post the command output, so I can also verify it.

-If a "not found" message appears in one of the command output lines, then type the command
ldconfig /usr/lib
where only  a "skipping /usr/X11R6/lib:" message is expected;

-Then repeat the above 'ldd /usr/sbin/minidlna' command to see if the "not found" message disappeared.

-If it disappeared, stop minidlna and restart it. You can do it also from the command line by typing
# everything after a '#' is a comment, you don't need to type it
rcminidlna stop
# stops minidlna, should display OK
rcminidlna start
# starts minidlna, should display OK


-watch minildna log output. You can do that from the command line also, by using (and repeating) the command
cat /var/log/minidlna.log
Does the 'warn: sql_get_int_field: step failed: SQL logic error or missing databa...' warn message still appears?

-If it does, we will have more diagnostics to do, probably a miss-installed package.

-Congrats, you executed your first linux commands using the command line :-)

  I assume they are to be typed in the RUN... command under the START menu's in the left hand corner...?  If so, I've attached the results...  Both commands can't be found...  I'm guessing you want me to type these commands elsewhere?

I hope that you have now understood that the only commands that you have to execute on the PC is 'telnet' or 'putty', which you will use to connect to the DNS box.  I hope that at least telnet is available either at the Run command or as one of the availables programs.

...
 
Regards
Nicholas...

...
 

Nicholas...

unread,
Mar 4, 2016, 10:27:48 AM3/4/16
to Alt-F


On Friday, March 4, 2016 at 8:07:26 AM UTC-5, João Cardoso wrote:


On Friday, 4 March 2016 03:51:42 UTC, Nicholas... wrote:
Hi João

It's great you're trying to help...  I'm very puzzled by this...  I've reviewed all the permissions and names for the user and groups...  All seems to be correct, although at this point I'm not 100% sure anymore...

I'm not sure where you wanted me to type in those commands.

My mistake. Step by step:

-You have to login the DNS box using either the 'telnet' command (which is/was generally available on MS-Win) or the 'ssh' or 'putty' programs, a MS-Win lightweight ssh client. You should supply at login 'root' (without commas) as the user name and as password use the same password you use in the webUI.

-You will be dropped in a command line whose prompt message will be similar to '[root@DNS-320L]# ' where you can type commands. Don't make mistakes, you are using the SUPER-USER/Administrator login, which can do everything in the box, including removing all you files without asking for confirmation!

-type the command
ldd /usr/sbin/minidlna
and watch each output line to see if any "not found" message appears; post the command output, so I can also verify it.

-If a "not found" message appears in one of the command output lines, then type the command
ldconfig /usr/lib
where only  a "skipping /usr/X11R6/lib:" message is expected;

-Then repeat the above 'ldd /usr/sbin/minidlna' command to see if the "not found" message disappeared.

-If it disappeared, stop minidlna and restart it. You can do it also from the command line by typing
# everything after a '#' is a comment, you don't need to type it
rcminidlna stop
# stops minidlna, should display OK
rcminidlna start
# starts minidlna, should display OK


-watch minildna log output. You can do that from the command line also, by using (and repeating) the command
cat /var/log/minidlna.log
Does the 'warn: sql_get_int_field: step failed: SQL logic error or missing databa...' warn message still appears?
 
-If it does, we will have more diagnostics to do, probably a miss-installed package.

-Congrats, you executed your first linux commands using the command line :-)

I've typed in the commands... 
No errors in the ldd /usr/sbin/minidlna... 
Stopped and Started minidlna...  ERROR...  Permission Denial...?
ERROR / Issue in the cat /var/log/minidlna.log...  ERROR...  Can't open the log file...?

DLink_NAS login: root
Password:
COLUMNS=120;LINES=50;export COLUMNS LINES;
[root@DLink_NAS]# ldd /usr/sbin/minidlna
        libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0xb6ef8000)
        libid3tag.so.0 => /usr/lib/libid3tag.so.0 (0xb6edf000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb6e30000)
        libavformat.so.54 => /usr/lib/libavformat.so.54 (0xb6d12000)
        libavutil.so.52 => /usr/lib/libavutil.so.52 (0xb6ce7000)
        libexif.so.12 => /usr/lib/libexif.so.12 (0xb6cae000)
        libiconv.so.2 => /usr/lib/libiconv.so.2 (0xb6bc6000)
        libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0xb6b91000)
        libogg.so.0 => /usr/lib/libogg.so.0 (0xb6b85000)
        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb6b51000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb6b38000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6b25000)
        libc.so.0 => /lib/libc.so.0 (0xb6ac4000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb6aa9000)
        libdl.so.0 => /lib/libdl.so.0 (0xb6a9f000)
        libavcodec.so.54 => /usr/lib/libavcodec.so.54 (0xb6091000)
        libm.so.0 => /lib/libm.so.0 (0xb6078000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb6f37000)
[root@DLink_NAS]# rcminidlna stop
Stopping minidlna: OK.
[root@DLink_NAS]# rcminidlna start
Starting minidlna: [2016/03/04 10:07:07] minidlna.c:611: error: Media directory "V,/mnt/sda2/MOV" not accessible [Permission denied]
OK.
[root@DLink_NAS]# cat /var/log/minidlna.log
cat: can't open '/var/log/minidlna.log': No such file or directory
[root@DLink_NAS]#

not sure why it's not finding the log...?

Any further thoughts and suggestions...


João Cardoso

unread,
Mar 4, 2016, 12:25:42 PM3/4/16
to Alt-F
OK, read bellow
 

DLink_NAS login: root
Password:
COLUMNS=120;LINES=50;export COLUMNS LINES;
[root@DLink_NAS]# ldd /usr/sbin/minidlna
        libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0xb6ef8000)
        libid3tag.so.0 => /usr/lib/libid3tag.so.0 (0xb6edf000)
        libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0xb6e30000)
        libavformat.so.54 => /usr/lib/libavformat.so.54 (0xb6d12000)
        libavutil.so.52 => /usr/lib/libavutil.so.52 (0xb6ce7000)
        libexif.so.12 => /usr/lib/libexif.so.12 (0xb6cae000)
        libiconv.so.2 => /usr/lib/libiconv.so.2 (0xb6bc6000)
        libFLAC.so.8 => /usr/lib/libFLAC.so.8 (0xb6b91000)
        libogg.so.0 => /usr/lib/libogg.so.0 (0xb6b85000)
        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb6b51000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb6b38000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6b25000)
        libc.so.0 => /lib/libc.so.0 (0xb6ac4000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb6aa9000)
        libdl.so.0 => /lib/libdl.so.0 (0xb6a9f000)
        libavcodec.so.54 => /usr/lib/libavcodec.so.54 (0xb6091000)
        libm.so.0 => /lib/libm.so.0 (0xb6078000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0xb6f37000)

everything looks OK with minidlna, it can find all libraries it depends on
 
[root@DLink_NAS]# rcminidlna stop
Stopping minidlna: OK.
[root@DLink_NAS]# rcminidlna start
Starting minidlna: [2016/03/04 10:07:07] minidlna.c:611: error: Media directory "V,/mnt/sda2/MOV" not accessible [Permission denied]

For "security" reasons, the minidlna server runs as the (system) user "minidlna", which belongs to the (system) group "multimedia". The folders you want minidlna to scan and serve must be accessible for them.
The best procedure is to make all those files and folders to belong to group "multimedia" and allow read and browse permissions for the files and folders to group. Then your should add yourself to the multimedia group. That has been discussed already on the forum and there are tutorials out there.

But to simplify things for now, lets make all those files belong to the user minidlna by executing the command:

chown -R minidlna:multimedia /mnt/sda2/MOV # change ownership of all files and folders under /mnt/sda2/MOV

You can latter play with file/folders ownership and permissions and make yourself the file/folder owner again (you will have to do it, as you will not be able to access the files as they now are owned by minidlna)
For now we just want to see if minidlna works or not.

 As those files are probably yours
 
OK.
[root@DLink_NAS]# cat /var/log/minidlna.log
cat: can't open '/var/log/minidlna.log': No such file or directory

My mistake, the log is at  /var/log/minidlna/minidlna.log

rcminidlna stop
rm
-f /var/log/minidlna/minidlna.log # remove the log
rcminidlna start
cat
/var/log/minidlna/minidlna.log # see the log

Please wait a couple of seconds, repeat  the 'cat' command and post the log contents when it stops changing


Nicholas...

unread,
Mar 4, 2016, 1:08:37 PM3/4/16
to Alt-F


 
Auto Generated Inline Image 1

Nicholas...

unread,
Mar 4, 2016, 1:25:30 PM3/4/16
to Alt-F
[root@DLink_NAS]# rm -f /var/log/minidlna/minidlna.log
[root@DLink_NAS]# rcminidlna start
Starting minidlna: [2016/03/04 13:19:13] minidlna.c:611: error: Media directory "V,/mnt/sda2/MOV" not accessible [Permission denied]
OK.
[root@DLink_NAS]# cat /var/log/minidlna/minidlna.log
[2016/03/04 13:19:13] minidlna.c:1026: warn: Starting MiniDLNA version 1.1.4.
[2016/03/04 13:19:13] minidlna.c:1065: warn: HTTP listening on port 8200
[2016/03/04 13:19:13] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [0] 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.
[root@DLink_NAS]#

João Cardoso

unread,
Mar 4, 2016, 3:08:14 PM3/4/16
to Alt-F
That message looks  also suspicious to me, "V,/mnt/sda2/MOV" it shouldn't have the "V," but it can be a log artifact.
The "V" is in the configuration file, specifying that you only want to index Video files, and should not appear as such in the folder path.
Using the minidlna webUI, change the Folder Type from "Video" to "Any", then Submit, and restarting minidlna watch the log file to see if the error turns to "/mnt/sda2/MOV" not accessible instead. After sorting out it what is wrong you can put it again as "Video".

In any case, what is the output of the following commands:

ls -l /mnt /mnt/sda2 /mnt/sda2/MOV # show permission and ownership of files and folders

I was assuming that the folder hierarchy /mnt/sda2/MOV could be read and browsed by the files owner, after all you put the files there...

[root@DNS-320L]# l /Public/RW/
total 716000
drwxrwxrwx    5 minidlna multimed      4096 Feb 24 16:52 .
dr-xr-xr-x    4 root     root          4096 Dec 29 16:51 ..
drwxr-xr-x   73 minidlna multimed      4096 Dec  7 16:44 Music
drwxr-xr-x   58 minidlna multimed      4096 Dec  7 16:48 Pictures
drwxr-xr-x    8 minidlna multimed      4096 Dec  7 16:50 Videos

Your files/folders permissions should be identical to as the ones colored above, with a 'd' meaning a folder (directory),  'r' read, 'w' write, 'x' browsable; letters appears in groups of three, the first three are relative to the files/folders owner (minidlna), the next tree to the files/folder group (multimedia) and the last three to everybody else.
So in the example above, the files owner can read,write and browse the files/folder, and members of the group and everybody else can read and browse but can not write.

The odd error, 
warn: sql_get_int_field: step failed: SQL logic error or missing database
has meanwhile disappear. Why?

Nicholas...

unread,
Mar 4, 2016, 3:32:31 PM3/4/16
to Alt-F
++++++++++++++++++++++++++++++++
I've made the correction from Video to ANY

DLink_NAS login: root
Password:
COLUMNS=120;LINES=50;export COLUMNS LINES;
[root@DLink_NAS]# rcminidlna stop
Stopping minidlna: OK.
[root@DLink_NAS]# rm -f /var/log/minidlna/minidlna.log
[root@DLink_NAS]# rcminidlna start
Starting minidlna: [2016/03/04 15:18:37] minidlna.c:611: error: Media directory "/mnt/sda2/MOV" not accessible [Permission denied]

OK.
[root@DLink_NAS]# cat /var/log/minidlna/minidlna.log
[2016/03/04 15:18:37] minidlna.c:1026: warn: Starting MiniDLNA version 1.1.4.
[2016/03/04 15:18:37] minidlna.c:1065: warn: HTTP listening on port 8200
[2016/03/04 15:18:37] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [0] 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.
[root@DLink_NAS]#
+++++++++++++++++++++++++++++++++++++++

In any case, what is the output of the following commands:

ls -l /mnt /mnt/sda2 /mnt/sda2/MOV # show permission and ownership of files and folders

I was assuming that the folder hierarchy /mnt/sda2/MOV could be read and browsed by the files owner, after all you put the files there...

[root@DNS-320L]# l /Public/RW/
total 716000
drwxrwxrwx    5 minidlna multimed      4096 Feb 24 16:52 .
dr-xr-xr-x    4 root     root          4096 Dec 29 16:51 ..
drwxr-xr-x   73 minidlna multimed      4096 Dec  7 16:44 Music
drwxr-xr-x   58 minidlna multimed      4096 Dec  7 16:48 Pictures
drwxr-xr-x    8 minidlna multimed      4096 Dec  7 16:50 Videos

Your files/folders permissions should be identical to as the ones colored above, with a 'd' meaning a folder (directory),  'r' read, 'w' write, 'x' browsable; letters appears in groups of three, the first three are relative to the files/folders owner (minidlna), the next tree to the files/folder group (multimedia) and the last three to everybody else.
So in the example above, the files owner can read,write and browse the files/folder, and members of the group and everybody else can read and browse but can not write.

++++++++++++++++++++++++++++
[root@DLink_NAS]# ls -l /mnt /mnt/sda2 /mnt/sda2/MOV
/mnt:
total 8
drwxr-x---   10 Nicholas users         4096 Mar  3 14:51 sda2
drwxrws---   10 root     admin         4096 Mar  3 14:51 sdb2

/mnt/sda2:
total 180
drwxrwx---   35 Nicholas admin         4096 Mar  2 18:21 Data_Files
drwxrwxr-x  399 minidlna multimed     36864 Mar  4 02:10 MOV
drwxr-xr-x  432 Nicholas users        20480 Jan 28 21:25 MP3
drwxr-xr-x  510 Nicholas users        36864 Feb 19 21:30 PIC
dr-xr-xr-x    4 root     root          4096 Mar 29  2015 Public
drwxr-x---    6 Nicholas users         4096 Apr 29  2015 Users
drwxrws---  174 Nicholas admin        12288 Feb 24 10:08 WallPaper
-rw-rw-rw-    1 root     root         40193 Mar  3 14:51 alt-f.log
drwx------    2 root     root         16384 Mar 29  2015 lost+found

/mnt/sda2/MOV:
total 1588
drwxrwxr-x    3 minidlna multimed      4096 Dec  2 21:01 10,000 Saints (2015) [1080p]
drwxrwsr-x    3 minidlna multimed      4096 Apr 12  2015 1984 (1984) [1080p]
drwxrwxr-x    3 minidlna multimed      4096 Dec 23 21:18 400 Days (2015) - 1080p - SciFi
[root@DLink_NAS]#
+++++++++++++++++++++++++++++++++

The odd error, 
warn: sql_get_int_field: step failed: SQL logic error or missing database
has meanwhile disappear. Why?

I don't really know why it stopped...  Could it have something to do with the permission change we did earlier?

Nicholas...

unread,
Mar 4, 2016, 4:25:59 PM3/4/16
to Alt-F

+++++++++++++++++++++++++++++++++++

FYI;  I just checked the MOV folder

It is set as owner: minidlna daemon   users in group: root

When I look at the main section it shows as:

Folder: /mnt/sda2 (hit path component to visit it)

OwnerGroupPermissions
Up Folder
Data_Files    Nicholas    
adminrwxrwx---
MOV    minidlnamultimed    
rwxrwxr-x
MP3    Nicholasusersrwxr-xr-x
PIC    Nicholasusersrwxr-xr-x
Public    rootrootr-xr-xr-x
Users    Nicholasusersrwxr-x---
WallPaper    Nicholasadminrwxrws---

+++++++++++++++++++++++++++++++++++

João Cardoso

unread,
Mar 8, 2016, 11:47:04 AM3/8/16
to Alt-F


On Friday, 4 March 2016 20:32:31 UTC, Nicholas... wrote:
...
I see nothing wrong with files and folders Permissions and Ownership, and I can't reproduce you error

minidlna.c:611: error: Media directory "/mnt/sda2/MOV" not accessible [Permission denied]

I have even downgraded one box to RC4.1, and your error doesn't appears when using the same ownership/permissions

You could increase minidlna log verbosity, but that involves editing /etc/minidlna.conf and set 

log_level=info

or even at a higher level:

# set this to change the verbosity of the information that is logged
# each section can use a different level: off, fatal, error, warn, info, or debug
#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn

You can also drop a few jpeg or mp3 files into the folder, to see if they are indexed.

Sorry, can't help more...
 

Nicholas...

unread,
Mar 8, 2016, 8:48:18 PM3/8/16
to Alt-F

Tried your suggestions...  Still no-go...

Appreciate all your help...  Would have been nice if it would have worked...

Regards...  NK
 

Артемий Александрович

unread,
Apr 17, 2016, 5:41:17 PM4/17/16
to Alt-F
Hi there! I found this topic because I faced similar problem like Nicolas. I'm using minidlna 1.1.4 on DNS-320L Alt-F 0.1RC4.1 with kernel 3.10.32 and after updating to ffp0.7 I get same error:

[2016/03/03 09:59:18] minidlna.c:1026: warn: Starting MiniDLNA version 1.1.4.
[2016/03/03 09:59:18] minidlna.c:355: warn: Creating new database at /var/lib/minidlna/files.db
[2016/03/03 09:59:18] minidlna.c:1065: warn: HTTP listening on port 8200
[2016/03/03 09:59:18] playlist.c:125: warn: Parsing playlists...
[2016/03/03 09:59:18] playlist.c:259: warn: Finished parsing playlists.
[2016/03/03 09:59:19] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [0] 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.

(everything is similar except SQL error which you already solved as I understood)

I already faced this problem few years ago and I solved it only via restoring all settings and re-flashing my box because reverting to ffp0.5 doesn't help me for some reason. This time I've tried to google more deeply. First of all, you must enable notify in minidlna.conf. Joao already explained how to use SSH (command line) so I'll write only commands that you must type after login as root:

vi /etc/minidlna.conf

check that
"inotify" = yes and uncommented

Then you must set up number of watches by this commands:

vi /proc/sys/fs/inotify/max_user_watches
press I
type
65538
press ESC
type
:wq and press ENTER

This way you will add enough maximum watches. But this is temporary values so you must set it permanently by this commands:

vi /etc/sysctl.conf
press I
navigate to
new line and type this: fs.inotify.max_user_watches=66538
press ESC
type
:wq and press ENTER

Perfect, now you can reboot your box and see minidlna logs, error "Inotify max_user_watches [8192] is low or close blah-blah..." will gone. Now we must deal with permissions error which broke library scan. I spent about two days trying to kick it off - I've tried to reinstall minidlna, tried to switch folder's (share's) permissions, played with minidlna.conf and user which start process, tried to add 'minidlna' user to all groups, even tried give chmod 777 to all my shares - nothing helped me. If you turn on debug level log you will see that minidlna for some reason can't access to the shares. Why? NOBODY KNOWS. So we must just accept it 'as is' and do something to make it work. I found some tricky command in startup script which very helped me to debug this error:

start $NAME --chuid $RC_USER:$RC_GROUP -- $RESCAN $MINIDLNA_ARGS

We can convert it to:

start minidlna --chuid username:usergroup -- -R

For me it:

start minidlna --chuid root:100 -- -R

By this command you will launch minidlna process from some user (root, for example) and see how it works in logs. So you can realize which user have enough rights to access shares and everything else. For me it was mine main user which I use to access my data via SMB/AFP etc.

So now we do following.

1) Open startup script by this command:
vi /etc/init.d/S80minidlna

2) Edit it. You must replace all variables linked to username and it's group that have enough rights to access shares (probably it will be your main user in group 'users' which have ID 100). For example, let it be user 'nicolas' with ID=1000 in group 'users' with ID=100 (you can see all user's and group's IDs via commaind 'cat /etc/group' and 'cat /etc/passwd'). So:

RC_USER=$NAME -> RC_USER=nicolas
RC_USERN
=11 -> RC_USERN=1000
RC_GROUP
=multimedia -> RC_GROUP=users
RC_GROUPN
=80 -> RC_GROUPN=100

It will be enough to run minidlna from another user.

3) Next, you need to create /var/lib/minidlna from 'nicolas' because minidlna have no rights to access old folder that was created from 'minidlna'. Use this commands:

rmdir /var/lib/minidlna
mkdir
/vat/lib/minidlna
chown
-R nicolas:users /var/lib/minidlna

Now it can access it's database. For some reason process will also create folder 'nicolas' after every start in /var/lib but we can live with it, right? :)

Actually you can do this all by...

vi /etc/minidlna.conf
uncomment
'user=minidlna'
change
'minidlna' to 'nicolas'

...but for some reason it will not affect anything. So we went deeper and made it manually :) Now you can go to webUI and configure shares, check 'force rescan' and press 'submit'. After that you can open yourboxip:8200 (or other port that was specified in minidlna.conf) and see that everything is ok. After rescan will complete you can uncheck 'force rescan', SAVE YOUR SETTINGS (!), reboot your box and check minidlna logs on errors. Everything must be good.

Good luck!

P.S: Also you can use this init that Joao already posted on this forum: https://groups.google.com/d/msg/alt-f/QXwXetpULgA/LTaA9tLU6VAJ But it will start minidlna from root which is not good for security reasons so I prefer to launch it from any other user with enough permissions. Hope it will help you.

среда, 9 марта 2016 г., 4:48:18 UTC+3 пользователь Nicholas... написал:
Reply all
Reply to author
Forward
0 new messages