mediatomb -d does not work

Help
2005-07-30
2013-05-30
  • Hi,

    on the same machine, I can run mediatomb in the foreground without any problems and it works fine.

    But trying to start it as a daemon with

    mediatomb -d

    I get:

    satserver1:~# mediatomb -d
    2005-06-30 19:58:54 INFO: ======== MediaTomb UPnP Server version 0.8.0 ========
    2005-06-30 19:58:54 INFO: Loading configuration from ~/.mediatomb/config.xml
    2005-06-30 19:58:54 INFO: Loading configuration from: /root/.mediatomb/config.xml
    2005-06-30 19:58:54 INFO: Checking configuration...
    2005-06-30 19:58:54 INFO: Config: option not found: /import/metadata-charset using default value: ISO-8859-1
    2005-06-30 19:58:54 INFO: checking ip..
    2005-06-30 19:58:54 INFO: Config: option not found: /server/ip using default value:
    2005-06-30 19:58:54 INFO: Config: option not found: /server/bookmark using default value: mediatomb.html
    2005-06-30 19:58:54 INFO: Config: option not found: /server/port using default value: 0
    2005-06-30 19:58:54 INFO: Config: option not found: /server/alive using default value: 180
    2005-06-30 19:58:54 INFO: Configuration check succeeded.
    2005-06-30 19:58:54 INFO: Config: option not found: /server/ip using default value:
    2005-06-30 19:58:54 INFO: got ip: (null)
    satserver1:~# Exception: upnp_init: UpnpInit failed
    _STRACE_ 0 mediatomb [0x80844c4]
    _STRACE_ 1 mediatomb [0x80579cd]
    _STRACE_ 2 mediatomb [0x8059892]
    _STRACE_ 3 mediatomb [0x804b4d7]
    _STRACE_ 4 /lib/tls/libc.so.6(__libc_start_main+0xf4) [0xb7c81974]
    _STRACE_ 5 mediatomb(__gxx_personality_v0+0x439) [0x804af51]
    2005-06-30 19:58:54 INFO: main: upnp error -205
    Exception: upnp_cleanup: UpnpUnRegisterRootDevice failed
    _STRACE_ 0 mediatomb [0x80844c4]
    _STRACE_ 1 mediatomb [0x80579cd]
    _STRACE_ 2 mediatomb [0x805a4fd]
    _STRACE_ 3 mediatomb [0x804bc00]
    _STRACE_ 4 /lib/tls/libc.so.6(__libc_start_main+0xf4) [0xb7c81974]
    _STRACE_ 5 mediatomb(__gxx_personality_v0+0x439) [0x804af51]

     
    • Jin
      Jin
      2005-07-30

      Hi,

      indeed, there seems to be a problem. I retested it - it works on one machine but fails on the other two, so I can reproduce this problem here. The error that you are seeing comes from the UPnP SDK, -205 means UPNP_E_OUTOF_SOCKET and signifies that the SDK can not create any more sockets (at least that's what the SDK documentatin says)

      However, I suspect that the problem may be elsewhere, I have already seen some irregularities with the SDK so it would not surprise me if there is another one.

      I will investigate the problem and we will try to provide a fix for it.

      Thanks for reporting,
      Jin

       
    • Jin
      Jin
      2005-07-30

      in the terminal where you are going to run mediatomb with the -d option do the following (assuming bash):
      export LD_ASSUME_KERNEL=2.2.5

      then it should work.

      turned out I already encountered and solved this problem once.. it's even very briefly mentioned in the README, but not at a spot where one would look for it :) And then I just forgot about it... I had this problem when messing around with the init.d script.

      I think time has come to put together a FAQ :)

      Kind regards,
      Jin

       
    • Solan
      Solan
      2006-04-23

      Hi,
      I'm having the same problem, but running
      export LD_ASSUME_KERNEL=2.2.5
      doesn't fix it. I don't get the exact same error, this is whay I get:

      solan@ubuntu:~$ sudo mediatomb -d
      2006-03-23 16:39:25 INFO: ======== MediaTomb UPnP Server version 0.8.1 ========
      2006-03-23 16:39:25 INFO: Loading configuration from ~/.mediatomb/config.xml
      2006-03-23 16:39:25 INFO: Loading configuration from: /home/solan/.mediatomb/config.xml
      2006-03-23 16:39:25 INFO: Checking configuration...
      2006-03-23 16:39:25 INFO: Config: option not found: /server/servedir using default value:
      2006-03-23 16:39:25 INFO: Config: option not found: /import/metadata-charset using default value: ISO-8859-1
      2006-03-23 16:39:25 INFO: checking ip..
      2006-03-23 16:39:25 INFO: Config: option not found: /server/bookmark using default value: mediatomb.html
      2006-03-23 16:39:25 INFO: Config: option not found: /server/port using default value: 0
      2006-03-23 16:39:25 INFO: Config: option not found: /server/alive using default value: 180
      2006-03-23 16:39:25 INFO: Config: option not found: /import/magic-file using default value:
      2006-03-23 16:39:25 INFO: Config: option not found: /server/storage/password using default value:
      2006-03-23 16:39:25 INFO: Configuration check succeeded.
      2006-03-23 16:39:25 INFO: got ip: 192.168.2.100
      solan@ubuntu:~$ Exception: upnp_init: UpnpInit failed
      _STRACE_ 0 mediatomb [0x80717be]
      _STRACE_ 1 mediatomb [0x8056141]
      _STRACE_ 2 mediatomb [0x8056cad]
      _STRACE_ 3 mediatomb [0x804b561]
      _STRACE_ 4 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2) [0xb7a46ec2]
      _STRACE_ 5 mediatomb(__gxx_personality_v0+0xc1) [0x804afb1]
      2006-03-23 16:39:25 INFO: main: upnp error -205
      2006-03-23 16:39:25 INFO: threadProc: update thread shut down.

      Cheers,
        Solan

       
    • Jin
      Jin
      2006-04-23

      Very interesting... I will need your help on this.

      Could you please do teh following:
      download the traceinfo script fromhttp://www.deadlock.dhs.org/jin/traceinfo

      put the script into the mediatomb build directory (I fear you will have to recompile the package yourself if you have not done so)

      chmod u+x traceinfo

      run the script: ./traceinfo

      fist you will not see any output, you have to paste in the _STRACE_ lines from the exception, so just cut and paste only the _STRACE_ lines into the terminal window where you launched the script.

      it should print out some information, like which source files are affected and the line numbers.

      please paste me that information, this will give me some information on what might have gone wrong.

      thanks,
      Jin

       
      • Per Larsson
        Per Larsson
        2006-04-26

        Although I am not the original poster, I have a very similar problem.

        I ran your traceinfo script and this is what I got (with mediatomb -d):

        _STRACE_ 0 build/mediatomb [0x8074a01]
        0 zmm::Exception::Exception(zmm::String) exception.cc:36
        _STRACE_ 1 build/mediatomb [0x8056e5d]
        1 UpnpException::UpnpException(int, zmm::String) exceptions.cc:26
        _STRACE_ 2 build/mediatomb [0x8057c02]
        _STRACE_ 3 build/mediatomb [0x804ba37]
        _STRACE_ 4 /lib/tls/libc.so.6(__libc_start_main+0xdb) [0xb78cffcb]
        _STRACE_ 5 build/mediatomb(__gxx_personality_v0+0x491) [0x804b4b1]
        2 Server::upnp_init(zmm::String, unsigned short) server.cc:84
        3 main ref.h:76
        4 ?? ??:0
        5 _start start.S:122

        Any help would be appreciated. For the moment I run mediatomb in a "screen" session but it would be neat if it could be started automatically as a daemon from my init scripts.

        And by the way, this is on a Slackware 10.2 with gcc 3.3.6 and glibc 2.3.5.

         
        • Jin
          Jin
          2006-04-26

          OK... as I feared it is the same old problem that we were already confronted with.

          The solution that worked so far is described here:
          http://sourceforge.net/forum/message.php?msg_id=3272957

          but as I did understand you did set this environment variable, and it seems that this no longer works.

          This environment setting is now also causing problems on Fedora Core 5.

          To sum it up: the code that is causing the trouble is in libupnp, so I'll have to debug the library and try to find and a solution.

          I am anyway integrating libupnp sources into the mediatomb source tree in order to be able to modify it more freely.

          For now I can not offer any quick solution, I'll have to debug the SDK.

          Greetings,
          Jin