Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 37
  1. #1
    Senior Member
    Join Date
    Jul 2007
    Posts
    832

    Slimcenter 7.0 on Ubuntu 8.04 - apparmor issues

    Hi,

    I thought I would check out Ubuntu (haven't played with Linux for a long time) and decided to try out the release candidate of Ubuntu 8.04 with the stable, released Slimcenter 7.0.

    All went well except for one thing: apparmor (a kernel enhancement to confine programs to a limited set of resources) decided not to let mysqld do anything useful with files!

    I ended up doing "sudo aa-complain /usr/sbin/mysqld" and that allowed the MySQL deamon to do go ahead, but generate plenty of complaining messages in the system log files. Someone who actually knows how to configure apparmor could probably to a better job.

    I'm not sure if this is a known issue, or whether newer versions of slimserver will configure apparmor without user intervention, but I thought it worth mentioning since the official release of Ubuntu 8.04 (Hardy Heron) is only a few days from now.

    --dsdreamer
    ----------------------
    "Dreamer, easy in the chair that really fits you..."

  2. #2
    Robin Bowes
    Guest

    Slimcenter 7.0 on Ubuntu 8.04 - apparmorissues

    dsdreamer wrote:
    > Hi,
    >
    > I thought I would check out Ubuntu (haven't played with Linux for a
    > long time) and decided to try out the release candidate of Ubuntu 8.04
    > with the stable, released Slimcenter 7.0.
    >
    > All went well except for one thing: apparmor (a kernel enhancement to
    > confine programs to a limited set of resources) decided not to let
    > mysqld do anything useful with files!
    >
    > I ended up doing "sudo aa-complain /usr/sbin/mysqld" and that allowed
    > the MySQL deamon to do go ahead, but generate plenty of complaining
    > messages in the system log files. Someone who actually knows how to
    > configure apparmor could probably to a better job.
    >
    > I'm not sure if this is a known issue, or whether newer versions of
    > slimserver will configure apparmor without user intervention, but I
    > thought it worth mentioning since the official release of Ubuntu 8.04
    > (Hardy Heron) is only a few days from now.


    This needs someone who is familiar with apparmor to write the necessary
    configs/profiles and they can be added to the install bundles for Ubuntu.

    I did a similar thing for SELinux for the rpm builds but I'm afraid I'm
    not a DEbian/Ubuntu user and don't know anything about apparmor.

    R.


  3. #3
    formerly known as Fletch
    Join Date
    May 2005
    Posts
    2,305
    Quote Originally Posted by Robin Bowes View Post
    This needs someone who is familiar with apparmor to write the necessary configs/profiles and they can be added to the install bundles for Ubuntu.
    I think Matt already did this, but it didn't make 7.0. Try the Debian testing release of SC.

  4. #4
    Senior Member
    Join Date
    Jul 2007
    Posts
    832

    That's cool, thanks.

    Quote Originally Posted by Fletch View Post
    I think Matt already did this, but it didn't make 7.0. Try the Debian testing release of SC.
    I guessed that might be the case. But in case anyone else trips up over it, I hope this thread will help.

    --dsdreamer
    ----------------------
    "Dreamer, easy in the chair that really fits you..."

  5. #5
    Senior Member Ramage's Avatar
    Join Date
    May 2006
    Location
    Bedford UK
    Posts
    768
    Quote Originally Posted by Fletch View Post
    I think Matt already did this, but it didn't make 7.0. Try the Debian testing release of SC.
    Upgraded to ubuntu 8.04 yesterday, SC version already in situ ran OK. Latest nightly 7.0.1~19133 failed to run. Mysql is not running and SC continually tries to restart.

    Looks like the apparmor problem.

    These entries exist in /etc/apparmor.d/usr.sbin.mysqld

    /var/lib/squeezecenter/cache/ r,
    /var/lib/squeezecenter/cache/my.cnf r,
    /var/lib/squeezecenter/cache/mysql.startup rw,
    /var/lib/squeezecenter/cache/mysql-error-log.txt rw,
    /var/lib/squeezecenter/cache/squeezecenter-mysql.pid w,
    /var/lib/squeezecenter/cache/squeezecenter-mysql.sock w,
    /var/lib/squeezecenter/cache/MySQL/ r,
    /var/lib/squeezecenter/cache/MySQL/** rwk,

    apparmor also reloaded but still doesn't work

    Has this been fixed by Matt?

    Is there a work around?
    Last edited by Ramage; 2008-04-25 at 01:28. Reason: added apparmor info
    P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
    AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
    Dell 10v WinXP SBS 7.5.2 - r31264
    Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
    Players: Classic, Duet, Boom

  6. #6
    Senior Member Ramage's Avatar
    Join Date
    May 2006
    Location
    Bedford UK
    Posts
    768
    A system reboot fixed the problem for me. I'll wait and see what the next nightly brings.
    P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
    AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
    Dell 10v WinXP SBS 7.5.2 - r31264
    Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
    Players: Classic, Duet, Boom

  7. #7
    Senior Member
    Join Date
    Apr 2005
    Location
    Scotland
    Posts
    410
    Not sure if it's apparmor related or not, but I too have had problems. Same message as others, couldn't connect to MySql.

    As I already have MySql installed I've edited /var/lib/squeezecenter/prefs/server.pref and specified a db username and password (search for dbsource), and also connected to the existing instance (port 3306). I've then created the database in the main MySql instance, via phpMYAdmin, and everything is working again.


    Jim

  8. #8
    Member
    Join Date
    Nov 2005
    Location
    UK
    Posts
    87

    Here's one option

    I've installed Squeexecenter 7.01 (which I believe includes an apparmor rule to allow it to run) on Ubuntu 8.04 using the the following process:

    sudo vi /etc/apt/sources.list

    Add the following line to the end:

    deb http://debian.slimdevices.com testing main

    then

    sudo apt-get update
    sudo /etc/init.d/apparmor stop
    sudo apt-get install squeezecenter
    sudo /etc/init.d/apparmor start

    Basically, disable apparmor prior to installing Squeezecenter and all goes smoothly.

  9. #9
    Senior Member Ramage's Avatar
    Join Date
    May 2006
    Location
    Bedford UK
    Posts
    768
    There is still a problem with running 7.0.1 on Ubuntu 8.04.

    Today's nightly installed OK but will not run - same symptoms as yesterday - an apparmor problem.

    I can get it to run by stopping apparmor, restarting squeezecenter and then starting apparmor. I get the following message when restarting apparmor.

    root@esys-ubuntu:/home/ramage# service apparmor start
    Loading AppArmor profiles /sbin/apparmor_parser: Unable to add "/usr/sbin/mysqld". Profile already exists
    Profile /etc/apparmor.d/usr.sbin.mysqld.squeezecenter.orig failed to load
    : Failed.
    Apparmor status is:
    service apparmor status
    apparmor module is loaded.
    3 profiles are loaded.
    3 profiles are in enforce mode.
    /usr/sbin/mysqld
    /usr/sbin/cupsd
    /usr/lib/cups/backend/cups-pdf
    0 profiles are in complain mode.
    1 processes have profiles defined.
    1 processes are in enforce mode :
    /usr/sbin/mysqld (7518)
    0 processes are in complain mode.
    0 processes are unconfined but have a profile defined.

    Once running I can start and stop squeezecenter without problem with apparmor running (I think). I can't see a pid for apparmor in htop or system monitor - should it have one?

    It's not a show stopper but a PITA - should the bug on this be re-opened?

    Edit: Removing usr.sbin.mysqld.squeezecenter.orig from /etc/apparmor.d allows apparmor to start without the failed message shown above.
    Last edited by Ramage; 2008-04-26 at 01:58. Reason: More info
    P2 266MHz, ubuntu server 10.04 SBS 7.6.0 - r31284
    AMD64x2 ubuntu 10.04, SBS 7.5.2 - r30889
    Dell 10v WinXP SBS 7.5.2 - r31264
    Dell 10v ubuntu netbook remix 10.04, SBS 7.6.0 - r30830
    Players: Classic, Duet, Boom

  10. #10
    Senior Member
    Join Date
    Apr 2005
    Location
    Scotland
    Posts
    410
    No joy for me I'm afraid. I've just done a clean install of 8.04, and my log file

    /var/log/squeezecenter/server.log

    [08-04-26 10:01:25.5707] Slim::Utils::MySQLHelper::createSystemTables (433) FATAL: Couldn't connect to database: [Can't connect to local MySQL server through socket '/var/lib/squeezecenter/cache/squeezecenter-mysql.sock' (2)]
    2008-04-26 10:01:25 SqueezeCenter died. Restarting.

    So I'll revert back to using the existing mySql instance.


    Jim

Posting Permissions

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