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).
[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.
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...
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 ;-)
[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...?
ldd /usr/sbin/minidlna
[root@DNS-320L]# ldd /usr/sbin/minidlnalibjpeg.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'
ldconfig /usr/lib
(a "skipping /usr/X11R6/lib:" is expected), then repeat the above ldd to see if the "not found" disappears.
warn: sql_get_int_field: step failed: SQL logic error or missing databa...
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.
ldd /usr/sbin/minidlna
ldconfig /usr/lib
# 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
cat /var/log/minidlna.log
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...
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 commandand watch each output line to see if any "not found" message appears; post the command output, so I can also verify it.
ldd /usr/sbin/minidlna-If a "not found" message appears in one of the command output lines, then type the commandwhere only a "skipping /usr/X11R6/lib:" message is expected;
ldconfig /usr/lib-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 commandDoes the 'warn: sql_get_int_field: step failed: SQL logic error or missing databa...' warn message still appears?
cat /var/log/minidlna.log
-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 :-)
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]
chown -R minidlna:multimedia /mnt/sda2/MOV # change ownership of all files and folders under /mnt/sda2/MOV
OK.
[root@DLink_NAS]# cat /var/log/minidlna.log
cat: can't open '/var/log/minidlna.log': No such file or directory
rcminidlna stop
rm -f /var/log/minidlna/minidlna.log # remove the log
rcminidlna start
cat /var/log/minidlna/minidlna.log # see the log
[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]#
ls -l /mnt /mnt/sda2 /mnt/sda2/MOV # show permission and ownership of files and folders
[root@DNS-320L]# l /Public/RW/total 716000drwxrwxrwx 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 Musicdrwxr-xr-x 58 minidlna multimed 4096 Dec 7 16:48 Picturesdrwxr-xr-x 8 minidlna multimed 4096 Dec 7 16:50 Videos
warn: sql_get_int_field: step failed: SQL logic error or missing database
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 foldersI 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 716000drwxrwxrwx 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 Musicdrwxr-xr-x 58 minidlna multimed 4096 Dec 7 16:48 Picturesdrwxr-xr-x 8 minidlna multimed 4096 Dec 7 16:50 VideosYour 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 databasehas meanwhile disappear. Why?
Owner | Group | Permissions | ||
---|---|---|---|---|
Up Folder | ||||
Data_Files | Nicholas | admin | rwxrwx--- | |
MOV | minidlna | multimed | rwxrwxr-x | |
MP3 | Nicholas | users | rwxr-xr-x | |
PIC | Nicholas | users | rwxr-xr-x | |
Public | root | root | r-xr-xr-x | |
Users | Nicholas | users | rwxr-x--- | |
WallPaper | Nicholas | admin | rwxrws--- |
minidlna.c:611: error: Media directory "/mnt/sda2/MOV" not accessible [Permission denied]
log_level=info
# 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
[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.
vi /etc/minidlna.conf
check that "inotify" = yes and uncommented
vi /proc/sys/fs/inotify/max_user_watches
press I
type 65538
press ESC
type :wq and press ENTER
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
start $NAME --chuid $RC_USER:$RC_GROUP -- $RESCAN $MINIDLNA_ARGS
start minidlna --chuid username:usergroup -- -R
start minidlna --chuid root:100 -- -R
vi /etc/init.d/S80minidlna
RC_USER=$NAME -> RC_USER=nicolas
RC_USERN=11 -> RC_USERN=1000
RC_GROUP=multimedia -> RC_GROUP=users
RC_GROUPN=80 -> RC_GROUPN=100
rmdir /var/lib/minidlna
mkdir /vat/lib/minidlna
chown -R nicolas:users /var/lib/minidlna
vi /etc/minidlna.conf
uncomment 'user=minidlna'
change 'minidlna' to 'nicolas'