#4 Issues with autoscan

pre 0.9 SVN
closed-works-for-me
Jin
5
2007-03-05
2007-01-05
No

Autoscan does not seem to work as expected. As I add new files to the directory which I have as autoscan in my database they never show up.

Also when I delete files which I don't need anymore, they stay in the database.

My current workaround is to delete that directory again and add it back.

What scares me: I would have sweared it had worked before, at least when it comes to adding files. I did not test removing files before.

Please advice if you need any logs or debug output to diagnose.

Discussion

  • Jin
    Jin
    2007-01-07

    Logged In: YES
    user_id=1205152
    Originator: NO

    Could you please compile with debug output ./configure --enable-tombdebug and look at the output? It will print out when it is attempting to scan, it you should also see if it is trying to remove or add something.

    What kind of autoscan are you using? Did you set it via the Web UI or via the config file? Do you use basic or full scan, what is the specified time interval?

     
  • Jin
    Jin
    2007-01-07

    • milestone: --> pre 0.9 SVN
     
  • Logged In: YES
    user_id=726709
    Originator: YES

    > Could you please compile with debug output ./configure --enable-tombdebug
    > and look at the output?

    Done that, using a clean SVN checkout from today's date. I've started with

    mediatomb -l /var/log/mediatomb.log -d

    and watched the logfile.

    The last lines there are

    2007-00-21 16:56:45 INFO: Initialized port: 49152
    2007-00-21 16:56:45 INFO: Server bound to: 10.0.0.22

    then nothing for more than one hour.

    > Did you set it via the Web UI or via
    > the config file?

    Web UI. How would I set this through the config file?

    > Do you use basic or full scan,

    No idea what the difference might be. So I am using basic scan.

    > what is the specified time interval?

    1800

    I guess this is seconds, so it should re-scan every 30 minutes?

    Regards,
    Torsten

     
  • Jin
    Jin
    2007-01-21

    Logged In: YES
    user_id=1205152
    Originator: NO

    >> Could you please compile with debug output ./configure --enable-tombdebug
    >> and look at the output?
    >>
    >Done that, using a clean SVN checkout from today's date. I've started
    >with mediatomb -l /var/log/mediatomb.log -d and watched the logfile.
    >
    >The last lines there are
    >
    >2007-00-21 16:56:45 INFO: Initialized port: 49152
    >2007-00-21 16:56:45 INFO: Server bound to: 10.0.0.22
    >
    >then nothing for more than one hour.

    Hmm.. that means that your autoscan directory somehow got lost.
    If you specify an autoscan directory via the UI and then delete it from the database, it will be gone. Do you still see your autoscan directory in the tree in the UI, is the folder icon marked with the arrows?

    Another possibility is, that something went wrong and that the directory is not being added to the scanlist upon server startup. We had a problem with that but I believe it should be fixed... can you start from scratch with a fresh database and reproduce this problem with the latest revision?

    >> Did you set it via the Web UI or via the config file?
    >
    >Web UI. How would I set this through the config file?

    In the <import> section, use something like that:
    <autoscan>
    <directory location="/tmp/test" mode="timed" interval="1800" level="basic" recursive="yes"/>
    </autoscan>

    The difference to UI-added autoscan directories: you can erase the autoscan container in the UI, but it will be added again upon next scan. So you can only get rid of it by taking it out of the config file.

    >> Do you use basic or full scan,
    >
    >No idea what the difference might be. So I am using basic scan.

    "basic" will only look if any files were added or removed, "full" will look at the modification times of the files and will reimport the media if anything has changed. This is useful when you edit id3 tags of your mp3 files and want the server layout to be updated accordingly.

    >> what is the specified time interval?
    >
    >1800
    >
    >I guess this is seconds, so it should re-scan every 30 minutes?

    Yes, correct.

    Well.. I can't reproduce the problem here. Either you got a revision that has an autoscan related problem - we have been fixing a lot of autoscan related stuff, or you have found a bug.

    Please try to reproduce with current revision and tell us the exact steps .

    Thanks,
    Jin

     
  • Logged In: YES
    user_id=726709
    Originator: YES

    > Please try to reproduce with current revision and tell us the exact steps.

    I got a SVN checkout from yesterday, used a fresh database and got this problem here:

    2007-00-22 22:52:02 ERROR: mysql_error (1064): "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '57)' at line 1"
    Exception raised in [../src/storage/mysql/mysql_storage.cc:247] select(): Mysql: mysql_real_query() failed: mysql_error (1064): "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '57)' at line 1"; query: SELECT `id`,`object_type` FROM `mt_cds_object` WHERE `id` IN (,57)

    The server seems to work anyway, though.

     
  • export of Mediatomb database

     
    Attachments
  • Logged In: YES
    user_id=726709
    Originator: YES

    Well, I think I found at least part of the problem. I have been looking at the mt_autoscan table, especially at the LOCATION field. But this contains NULL.

    The two directries I tried to add to autoscan were:

    /mnt/tmp/tmpvid02
    /mnt/video1

    I will attach an export of my database.

    File Added: mediatomb-2.sql

     
  • Logged In: NO

    Hi!

    Regarding the NULL in the "location" field: Which "object_id" do you mean?

    The mysql syntax error you reported should have been fixed in revision 969 (11 Jan) so it's kinda weird.. could you look at the "$Id..." tag at the beginning of the file "src/storage/sql_storage.cc"? Please tell us which version you're using.

    If you want, you can join us in our IRC channel ("#mediatomb" at irc.freenode.net), so we can do some "realtime" debugging.

    thanks and greets,
    Leo

     
  • Jin
    Jin
    2007-02-18

    • status: open --> pending-works-for-me
     
  • Jin
    Jin
    2007-02-18

    Logged In: YES
    user_id=1205152
    Originator: NO

    Well.. we were not able to reproduce this problem. Do you still experience difficulties?

    Thx,
    Jin

     
    • status: pending-works-for-me --> closed-works-for-me
     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).