1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

minidlna not working on toastman

Discussion in 'Tomato Firmware' started by rs232, Mar 16, 2012.

  1. rs232

    rs232 Network Guru Member

    I've just installed the latest toastman on my RT-N16.
    I've noticed that minidlna does not scan for media (in /cifs2 in my case).

    I used to use minidlna when I had RAF installed and it was working fine. The log file is not helpful.

    Code:
    Mar 16 00:53:27 tomato daemon.warn minidlna[10494]: Starting MiniDLNA version 1.0.24 [SQLite 3.7.5].
    Mar 16 00:53:27 tomato daemon.warn minidlna[10494]: HTTP listening on port 49974
    Any help in troubleshooting this?

    Any way to increase the log verbosity of minidlna?

    Many thank!
    rs232
     
  2. Toastman

    Toastman Super Moderator Staff Member Member

    Just tested, set up cifs1 share on my server. It hasn't finished scanning yet, but Windows Media Player is showing several thousand tracks right now, and they play OK. DNLA page still shows "scan in progress".

    The logs show a considerable number of messages for different files which have no tags or are corrupted. All seems perfectly normal.

    Maybe your login password is wrong or something.
     
  3. rs232

    rs232 Network Guru Member

    I really don't know what the problem is.
    One think I noticed is that out of the two cifs I'm mounting both are reported as unmounted by the GUI, however if I use ssh into the router I can see the content inside /cifs1 and /cifs2, so I don't think this is related.
    The other think is: /cifs2 is exported by the NAS read only and I'm saving the database in RAM... I did try though to change it to read/write and save the database into /cifs2 but still no luck.
    On the DLNA TV I can see the tomato dlna server but no content.

    Where can I find the config file inside tomato? Or perhaps do it use nvram settings...?

    This is the message I got into the log this morning (still no videos available):

    Mar 16 10:06:12 tomato daemon.warn minidlna[1465]: Starting MiniDLNA version 1.0.24 [SQLite 3.7.5].
    Mar 16 10:06:12 tomato daemon.warn minidlna[1465]: Creating new database...
    Mar 16 10:06:12 tomato daemon.warn minidlna[1465]: HTTP listening on port 28364
    Mar 16 10:06:12 tomato daemon.warn minidlna[1468]: Parsing playlists...
     
  4. chocsoup

    chocsoup Networkin' Nut Member

    If you start minidlna from the command line or the GUI at Tools>System you can use a switch to get verbose logs. The command is "minidlna -d" without the "quotes" (d for debug I think). To stop minidlna use "service dlna stop"

    The config file for minidlna is at /etc/minidlna.config

    Also, if you get the database created you might want to save a copy of it, especially if it is large. A media scan of my system takes about 90 minutes and it's not hard to recreate the database by accident while playing around.

    Sorry, but I don't know what your problem is. My media and databases are on USB HDDs. Do you have a USB HDD or thumb drive to test with to eliminate or identify the cifs as the issue?
     
  5. rs232

    rs232 Network Guru Member

    database:
    If I choose RAM from the gui the /etc/minidlna.conf file contains this line:
    db_dir=/var/run/minidlna/.db
    If I choose manually a destination e.g. /cifs2 the share is indeed writable.

    I've tried lot of things, disable inotify (btw shouldn't this be disabled by default?) change port number a.s.o. running afterwards the command in debugmode.
    It just doesn't say anything about "scanning", not even if I call minidlna with -R option.

    I'm stating to think this could be a NAS problem somehow as I have 3x tomato routers and they all behave the same way.

    Finally I think it would be a good idea to have the dlna server customizable via GUI in case somebody wants to run 2 or more minidlna on the same LAN (not my case but who knows...).
     
  6. rs232

    rs232 Network Guru Member

    FYI this is the output of the debug: any problem with the presentation?

    root@tomato:/cifs2# minidlna -d -f /etc/minidlna.conf -R -L
    minidlna[21137]: minidlna.c:891: Starting MiniDLNA version 1.0.24 [SQLite 3.7.5].

    minidlna[21137]: minidlna.c:915: Creating new database...

    minidlna[21137]: minidlna.c:1002: HTTP listening on port 11973

    minidlna[21137]: minissdp.c:351: Sending SSDP notifies

    minidlna[21137]: minidlna.c:1212: HTTP connection from 10.10.10.6:53535

    minidlna[21137]: upnphttp.c:893: HTTP REQUEST: GET /rootDesc.xml HTTP/1.1
    Host: 10.10.10.1:11973
    Connection: close



    minidlna[21137]: [truncated] upnphttp.c:1208: HTTP RESPONSE: HTTP/1.1 200 OK
    Content-Type: text/xml; charset="utf-8"
    Connection: close
    Content-Length: 2236
    Server: Tomato DLNADOC/1.50 UPnP/1.0 MiniDLNA/1.0.24
    Date: Sat, 17 Mar 2012 15:41:01 GMT
    EXT:

    <?xml version="1.0"?>
    <root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVer sion><device><deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType><friendlyName>tomato< /friendlyName><manufacturer>Justin Maggard</manufacturer><manufacturerURL>http://tomatousb.org/</man ufacturerURL><modelDescription>MiniDLNA on Media Server</modelDescription><modelName>Windows Media C onnect compatible (MiniDLNA)</modelName><modelNumber>1.0.24</modelNumber><modelURL>http://tomatousb. org/</modelURL><serialNumber>00000000</serialNumber><UDN>uuid:4d696e69-444c-164e-9d41-20cf30c64f29</ UDN><dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC><presentat ionURL>https://10.10
    minidlna[21137]: minissdp.c:680: SSDP M-SEARCH from 10.10.10.99:57630 ST: urn:schemas-upnp-org:devic e:InternetGatewayDevice:1, MX: 3, MAN: "ssdp:discover"

    minidlna[21153]: inotify.c:153: Add watch to /cifs2

    minidlna[21153]: inotify.c:160: Add watch to /cifs2

    minidlna[21137]: minidlna.c:1212: HTTP connection from 10.10.10.99:59836

    minidlna[21137]: upnphttp.c:534: Added client [100/10.10.10.99/E0:CB:4E:41:31:63] to cache slot 0.

    minidlna[21137]: upnphttp.c:893: HTTP REQUEST: GET /rootDesc.xml HTTP/1.1
    Cache-Control: no-cache
    Connection: Close
    Pragma: no-cache
    Accept: text/xml, application/xml
    Host: 10.10.10.1:11973
    User-Agent: Microsoft-Windows/6.1 UPnP/1.0 Windows-Media-Player-DMS/12.0.7601.17514 DLNADOC/1.50



    minidlna[21137]: [truncated] upnphttp.c:1208: HTTP RESPONSE: HTTP/1.1 200 OK
    Content-Type: text/xml; charset="utf-8"
    Connection: close
    Content-Length: 2236
    Server: Tomato DLNADOC/1.50 UPnP/1.0 MiniDLNA/1.0.24
    Date: Sat, 17 Mar 2012 15:41:03 GMT
    EXT:

    <?xml version="1.0"?>
    <root xmlns="urn:schemas-upnp-org:device-1-0"><specVersion><major>1</major><minor>0</minor></specVer sion><device><deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType><friendlyName>tomato< /friendlyName><manufacturer>Justin Maggard</manufacturer><manufacturerURL>http://tomatousb.org/</man ufacturerURL><modelDescription>MiniDLNA on Media Server</modelDescription><modelName>Windows Media C onnect compatible (MiniDLNA)</modelName><modelNumber>1.0.24</modelNumber><modelURL>http://tomatousb. org/</modelURL><serialNumber>00000000</serialNumber><UDN>uuid:4d696e69-444c-164e-9d41-20cf30c64f29</ UDN><dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC><presentat ionURL>https://10.10
    minidlna[21137]: minidlna.c:1212: HTTP connection from 10.10.10.99:59837

    minidlna[21137]: upnphttp.c:154: Client found in cache. [type 100/entry 0]

    minidlna[21137]: upnphttp.c:893: HTTP REQUEST: GET /icons/sm.png HTTP/1.1
    Connection: Keep-Alive
    User-Agent: Windows-Media-Player-DMS/12.0.7601.17514
    Host: 10.10.10.1:11973



    minidlna[21137]: upnphttp.c:1308: Sending small PNG icon

    minidlna[21137]: minissdp.c:680: SSDP M-SEARCH from 10.10.10.99:57630 ST: urn:schemas-upnp-org:devic e:InternetGatewayDevice:1, MX: 3, MAN: "ssdp:discover"
     
  7. chocsoup

    chocsoup Networkin' Nut Member

    I don't see anything in your log, except it lacks the obvious part where minidlna simply doesn't scan your storage device. Here's part of my log:

    minidlna[6125]: minidlna.c:902: Starting MiniDLNA version 1.0.22 [SQLite 3.7.5].
    minidlna[6125]: minidlna.c:926: Creating new database...
    minidlna[6125]: minidlna.c:1005: HTTP listening on port 31106
    minidlna[6125]: minissdp.c:347: Sending SSDP notifies
    minidlna[6130]: scanner.c:764: Scanning /tmp/mnt/HDD_WD_3TB/media/media_files
    etc...

    Again, I suggest you try using another storage device. I also notice you are using a later version of minidlna than I am.
     
  8. pharma

    pharma Network Guru Member

    Perhaps I missed, but after changing from RAF to Toastman did you "erase Nvram" and re-enter settings manually?
     
  9. rs232

    rs232 Network Guru Member

    Yes, I did erase the NVRAM! This is strange to me... I'm wondering if this is related to the fact that the /cifs1 and /cifs2 are reported as not mounted by the GUI despite the fact that they are instead (verified via ssh).
     
  10. Toastman

    Toastman Super Moderator Staff Member Member

    Well, as it normally DOES show them as mounted, this would seem to be a good indication that something isn't right. Unfortunately I can't reproduce the problem here, though.

    Hmmm .. minDNLA was just updated by Shibby a few days ago, and I also updated it in this latest version 7496.2. You might try the previous Toastman issue to see if it helps.
     
  11. rs232

    rs232 Network Guru Member

    I have other two tomato on my LAN with exactly the same cifs mounting issue. It makes sense for me to now investigate the NAS instead!
    It's a freeNas 8.04 I'll go through the samba parameters to see if there's something wrong in there.
    Just one question: when I save the CIFS settings I get a single line in the log:

    Mar 19 10:10:05 tomato user.info mount-cifs[7344]: notice[cifs]: Mounting...

    Is that correct or am I supposed to get also a "Mounted something...." when the operation is successfully completed?
    Any way to increase the verbosity of the cifs to help me troubleshooting this?

    Thanks a lot!
     
  12. rs232

    rs232 Network Guru Member

    Another piece of info: using a 4th tomato (tomatovpn): Tomato Firmware v1.28.8754 ND USB vpn3.6
    The cifs mounting (pointing to exactly the same share) works perfectly --> reported as mounted.
    Was the cifs client updated on toastman recently? perhaps something changed? Or perhaps it's really just the NAS playing funny...
     
  13. rs232

    rs232 Network Guru Member

    on another tomato connect to the LAN running:

    Tomato Firmware v1.28.7633 -Toastman-VLAN-IPT-ND ND VPN
    - Linux kernel 2.4.37.11 and Broadcom Wireless Driver 4.150.10.29 updates

    cifs is reported as "mounted". I did some troubleshooting on the NAS and there's nothing it might suggest there's something wrong. I think the fact that different version of the firmware are not working in the same way could mean something (for the firmware I mean).

    still if nobody else is experiencing these problems... I don't know what to think any more
     
  14. chocsoup

    chocsoup Networkin' Nut Member

    rs232, you're our only hope :)

    In situations like this is is great when people can do some tests and get repeatable results. It is important to change only one thing and leave everything else the same.
     
  15. Toastman

    Toastman Super Moderator Staff Member Member

    Did you try setting up a share on a Windows PC and see if that works instead of the NAS? I have no NAS but the shares always work instantly when I try here.

    There may well be differences between the K2.4 builds for WRT etc. and K2.6 builds that run on later routers. However, they all work here with a Windows box.
     
  16. rs232

    rs232 Network Guru Member

    Good tip. I tried the windows share on K26 and yes! it works -> mounted and reported mounted. by the GUI. So I did some additional troubleshooting. Not sure why but on K26 only the mtab has this additional parameters that apparently the NAS doesn't like: posixpaths
    Mountin the NAS share on K24 this command is not present in the mtab and the GUI reports the share as mounted.
    Note in K26 the posixpaths is added automatically mounting the NAS samba share but NOT the windows share. It seems like tomato makes a distintion between the two. I tried to mount manually without posixpath and it does work (I can see the content of the share) but I can't verify the GUI this way.
    My guess is that posixpath is not needed and confuses tomato when it comes to verify the mounting status.
     
  17. Toastman

    Toastman Super Moderator Staff Member Member

    At least there is *some* glimmer of light now :)
     
  18. rs232

    rs232 Network Guru Member

    I can confirm that the posixpath is not the problem :-(
    Is it possible that the smbclient is not updated (or the mount.cifs code used) ?
     
  19. rs232

    rs232 Network Guru Member

    https://forum.openwrt.org/viewtopic.php?pid=27593

    Something I've found today: -148 is the error I get in the log too.

     
  20. rs232

    rs232 Network Guru Member

    I'm keep working on this.... and have 2 additional inputs:

    1)
    My media directory is pretty large and it currently needs 71MB so I've tried was to move the DB location from the default RAM into cifs1 instead.. I'm running this on a RT-N16 with 128Mb of RAM so even RAM would have been enough I guess... still, using cifs1 doesn't solve anything. So I would exclude this point.

    2)
    When I try to run the built in minidlna I can see the process activated:


    but as you can see the CPU still at 0% (no scanning).

    I've installed minidlna from optware: http://www.linksysinfo.org/index.php?threads/a-new-openwrt-based-repository.37263/
    Now calling manually: /opt/bin/minidlna -f /cifs1/minidlna.conf -R
    works fine!
    I'm starting to think that cifs and it's mounting parameters are not related to this... is it possible instead that minidlna within tomato has been compiled differently compared to this optware version?


    rs232
     
  21. joel32137

    joel32137 Serious Server Member

    hi rs232,

    Apologies for the ignorance but how do you install the optware on toastman's tomato build?

    I'm totally new to tweaking firmwares.

    The packaged minidlna from the latest toastman crashes my router after the db file hits 320kb.

    Thanks :)


     
  22. rs232

    rs232 Network Guru Member

Share This Page