Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've been struggling, trying to get my Mediatomb server to start automatically on Upstart run level 2. I can't figure it out. I guess Upstart is still new to me and I don't understand it. I even read the whole manual and it is vague and never mentions any of the inner workings of how things work.

I can obviously run mediatomb with this command and so getting it to run is not my question:

sudo mediatomb --config /etc/mediatomb/config.xml

or

mediatomb --config ~/.mediatomb/config.xml

I know Upstart supposedly will start services as superuser but what happens when running Upstart commands as a normal user? Do priviledges get escalated? I can't seem to figure it out.

These commands don't work:

service mediatomb start
/etc/init.d/mediatomb start 
sudo initctl start mediatomb (says it started but not really)

To me, this all seems to be some kind of permissions issue but I don't understand enough about Upstart to figure this out. Very frustrating.

me@linux:/etc/init$ start mediatomb
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.58"
(uid=1000 pid=2665 comm="start mediatomb ") interface="com.ubuntu.Upstart0_6.Job"
member="Start" error name="(unset)" requested_reply="0"
destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Re-installed system using XBuntu. This time Mediatomb autostarts but the port 47152 is only visble on localhost. The service can also be restarted using "sudo service mediatomb start". My external media device cannot see mediatomb.

I learned:

  1. Mediatomb puts the db in the /var/lib/mediatomb.db , owned by the mediatomb user
  2. The config.xml is owned by root in /etc/mediatomb/config.xml
  3. The web files are at /usr/share/mediatomb and owned by root.
  4. The /etc/init directory contains the Upstart script and I made no modifications to it.
  5. The /etc/init.d directory contains the old, unused init script.
  6. The media disk I am sharing is auto-mounted by root and has 777 permissions.

At this point I think this may be related to the fact that my XBuntu is a 64-bit system and that, for some reason the listener binds to localhost rather than my external IP?


UPDATE: finally figured out that it was a misconfiguration in my config.xml that caused the server to think there wasn't any files to serve. My library is all .avi files and I had the .avi profile misconfigured in the config.xml and so it couldn't render anything.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.