Results 1 to 2 of 2

Thread: mediatomb-sqlite daemon

  1. #1

    Default mediatomb-sqlite daemon

    Opensuse 13.1 64bit on intel iron

    This is my saga on getting the mediatomb daemon to run. I'd appreciate any comments since at the moment I have it running but it doesn't seem to work over the network, which could be an unrelated issue to the daemon.

    ======================================================================================================================================
    If you install mediatomb via packman, you have two options. One to use mysql (presumably mariadb) or a preinstalled (if that is the right word) sqlite. Having ripped out enough hair using mysql, anything that is configured automatically is fine with me. Well that was the theory.

    I got mediatomb to run and watched video via XMBC. [Kind of confused me that XMBC treats the video as a file, but whatever.] That was a few days and many boots ago. It isn't working at the moment. I never had the daemon automatically loaded, which is something I figured I should do to prevent things from working once then not again after booting!

    The problem is getting mediatomb to run as a daemon. I don't see it in yast2 service at all.

    Reading what I can find on the internet about the mediatomb daemon, you need to edit /etc/mediatomb.conf and state the ethernet interface. Odd this is required, but easy enough to do. This is the file, modified for my ethernet interface eno1. [Why it isn't eth0 is something for the gurus. I just yanked the name from ifconfig.]
    Code:
    ## This is a sambel configuration file for the MediaTomb daemon script
    ## used on Fedora Core
    
    ## By default the configuration will be created in /etc/mediatomb
    
    ## Network interface on which the server will run, you need to edit this!
    MT_INTERFACE="eno1"
    
    ## User defined command line options that may be passed to the server
    MT_OPTIONS=""
    
    ## MediaTomb will be started on port 50500
    MT_PORT="50500"
    
    ## MediaTomb will run as mediatomb
    MT_USER="mediatomb"
    MT_GROUP="mediatomb"
    
    ## Location of the PID file
    MT_PIDFILE="/var/run/mediatomb.pid"
    
    ## Location of the log file
    MT_LOGFILE="/var/log/mediatomb"
    
    ## Location of the config file/database
    MT_HOME="/etc"
    MT_CFGDIR="mediatomb"
    One issue I came across is there is no /usr/bin/mediatomb, but rather /usr/bin/mediatomb-sqlite . Unfortunately the scripting is set up for mediatomb, not mediatomb-sqlite .

    There is a file /etc/init.d/mediatomb . I am assuming the following change has to be made so that mediatomb-sqlite is called, not mediatomb. Otherwise you get the mediatomb not installed message.
    Code:
    ###############################
    # make sure to run it as $MT_USER
    MEDIATOMB="-d -u $MT_USER -g $MT_GROUP -P $MT_PIDFILE -l $MT_LOGFILE -m $MT_HOME -f $MT_CFGDIR -p $MT_PORT"
    
    test -x "/usr/bin/mediatomb-sqlite" || { echo "/usr/bin/mediatomb not installed";
            if [ "$1" = "stop" ]; then exit 0;
            else exit 5; fi; }
    However, there must be another place to change mediatomb to mediatomb-sqlite.

    Since yast2 doesn't see the daemon under services, possibly it is located in the wrong place. Using the services from command line, I get the following:
    Code:
    linux-wh01:/etc/init.d # service mediatomb start
    Warning: Unit file of mediatomb.service changed on disk, 'systemctl daemon-reload' recommended.
    Job for mediatomb.service failed. See 'systemctl status mediatomb.service' and 'journalctl -xn' for details.
    Running systemctl:
    Code:
    linux-wh01:/etc/init.d # systemctl status mediatomb.service
    mediatomb.service - LSB: MediaTomb daemon
       Loaded: loaded (/etc/init.d/mediatomb)
       Active: failed (Result: resources) since Sat 2014-01-18 18:57:10 PST; 1min 23s ago
      Process: 14702 ExecStart=/etc/init.d/mediatomb start (code=exited, status=0/SUCCESS)
    
    Jan 18 18:57:09 linux-wh01 systemd[1]: Starting LSB: MediaTomb daemon...
    Jan 18 18:57:10 linux-wh01 mediatomb[14702]: Applying multicast settings to eno1... Starting mediatomb: /etc/init.d/mediatomb: line 71: mediatomb: command not found
    Jan 18 18:57:10 linux-wh01 mediatomb[14702]: ..done
    Jan 18 18:57:10 linux-wh01 systemd[1]: Failed to read PID from file /var/run/mediatomb.pid: Invalid argument
    Jan 18 18:57:10 linux-wh01 systemd[1]: Failed to start LSB: MediaTomb daemon.
    Jan 18 18:57:10 linux-wh01 systemd[1]: Unit mediatomb.service entered failed state.
    
    Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.

    Running the journal command:
    Code:
    linux-wh01:/etc/init.d # journalctl -xn
    -- Logs begin at Sat 2014-01-18 02:10:22 PST, end at Sat 2014-01-18 18:57:10 PST. --
    Jan 18 18:53:01 linux-wh01 dbus[1300]: [system] Activating service name='org.kde.powerdevil.backlighthelper' (using servicehelper)
    Jan 18 18:53:01 linux-wh01 dbus[1300]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'
    Jan 18 18:54:16 linux-wh01 dbus[1300]: [system] Activating service name='org.kde.powerdevil.backlighthelper' (using servicehelper)
    Jan 18 18:54:16 linux-wh01 dbus[1300]: [system] Successfully activated service 'org.kde.powerdevil.backlighthelper'
    Jan 18 18:57:09 linux-wh01 systemd[1]: Starting LSB: MediaTomb daemon...
    -- Subject: Unit mediatomb.service has begun with start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- 
    -- Unit mediatomb.service has begun starting up.
    Jan 18 18:57:10 linux-wh01 mediatomb[14702]: Applying multicast settings to eno1... Starting mediatomb: /etc/init.d/mediatomb: line 71: mediatomb: command not found
    Jan 18 18:57:10 linux-wh01 mediatomb[14702]: ..done
    Jan 18 18:57:10 linux-wh01 systemd[1]: Failed to read PID from file /var/run/mediatomb.pid: Invalid argument
    Jan 18 18:57:10 linux-wh01 systemd[1]: Failed to start LSB: MediaTomb daemon.
    -- Subject: Unit mediatomb.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    -- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/be02cf6855d2428ba40df7e9d022f03d
    -- 
    -- Unit mediatomb.service has failed.
    -- 
    -- The result is failed.
    Jan 18 18:57:10 linux-wh01 systemd[1]: Unit mediatomb.service entered failed state.
    Changing line 71 to mediatomb-sqlite changes the errors a bit.

    Code:
    linux-wh01:/etc/init.d # service mediatomb start
    Warning: Unit file of mediatomb.service changed on disk, 'systemctl daemon-reload' recommended.
    Now the daemon shows up in yast2 under services. Starting it yields this message:

    Code:
    mediatomb.service - LSB: MediaTomb daemon
       Loaded: loaded (/etc/init.d/mediatomb)
       Active: active (running) since Sat 2014-01-18 19:02:31 PST; 4min 5s ago
     Main PID: 14788 (mediatomb-sqlit)
       CGroup: /system.slice/mediatomb.service
               `-14788 mediatomb-sqlite -d -u mediatomb -g mediatomb -P /var/run/mediatomb.pid -l /var/log/mediatomb -m /etc -f mediatomb -p 50500 -i 192.168.123.59
    
    Jan 18 19:02:30 linux-wh01 systemd[1]: Starting LSB: MediaTomb daemon...
    Jan 18 19:02:31 linux-wh01 mediatomb[14767]: Applying multicast settings to eno1... Starting mediatomb: ..done
    Jan 18 19:02:31 linux-wh01 systemd[1]: Started LSB: MediaTomb daemon.
    Jan 18 19:05:40 linux-wh01 systemd[1]: Started LSB: MediaTomb daemon.
    In hindsight, I wonder if it would have been better just to create a symbolic link from mediatomb to mediatomb-sqlite . I can go back and change the edits if that is a better plan.

    At the moment, I can;t get mediatomb to work with xmbc over the network, and xbmc won't start on this linux box (i.e. not go over the network) due to a sound card issue (which will be the topic of another thread).

  2. #2

    Default Re: mediatomb-sqlite daemon

    As a follow up, I got mediatomb to feed xmbc across the network. I had to set up the upnp against on the PC with Xmbc running and also force mediatomb to scan my library.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •