Author Topic: SqueeseCenter (slimserver) on Ubuntu  (Read 2261 times)

woollypigs

  • Mr Peli
    • woollypigs
SqueeseCenter (slimserver) on Ubuntu
« on: 11 May, 2008, 01:44:55 pm »
I got a PC running ubuntu 8.04 with all my music on one of it's hard drives. I would like to play that music from my laptop also running ubuntu 8.04 over wifi (version g).

I have tried the way of sharing/mounting the drive but for some reason the players I have tried Songbird, RhythmBox, Amorak and Kaffeine etc all either crash when they try to load the 120Gb (around 27.000 songs) or if they survive they "jump" while playing the track.

I have notices on my network history the player load some of the song and then sit and wait until it have played that and then load the next bit which causes the song to end up with gaps (jump).

People have recommended that I should try out SqueeseCenter and I manged to install it just fine, using this guide http://wiki.slimdevices.com/index.php/DebianPackage . Though using this command /etc/init.d/squeezecenter start I get no error but when I try out localhost:9000 I get a failed to connect.

And from that point I'm pretty much stuck on what to do now. Any pointers ?
Current mood: AARRRGGGGHHHHH !!! #bollockstobrexit

rae

Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #1 on: 11 May, 2008, 02:04:13 pm »
I assume this is the same as slimserver.

Is it actually running?

pig ~ #  ps -eaf | grep slim
slim      5497     1  0 Mar10 ?        00:00:02 /usr/bin/perl -w /usr/local/slimserver/slimserver.pl --daemon --prefsfile=/etc/slimserver.pref --cachedir=/var/cache/slimserver --pidfile=/var/run/slimserver/slimserver.pid --user=slim --logfile=/var/log/slimserver/messages --d_scan



woollypigs

  • Mr Peli
    • woollypigs
Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #2 on: 11 May, 2008, 02:18:31 pm »
did

ps -eaf | grep slim

got

7290  6890  0 14:17 pts/0    00:00:00 grep slim
Current mood: AARRRGGGGHHHHH !!! #bollockstobrexit

Lonewolff

Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #3 on: 11 May, 2008, 02:29:30 pm »
It's not running then - I know that doesn't help much, try checking logs to see if there is any indication as to why it has not started.

rae

Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #4 on: 11 May, 2008, 03:29:24 pm »
Agreed, slimserver isn't running.   It looks like on ubuntu you have squeezecentre on top of slim server.   Have you actually started slim server?


Thor

  • Super-sonnicus idioticus
Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #5 on: 11 May, 2008, 03:34:23 pm »
If you're running Squeezecenter rather than Slimserver, you need to grep for "squeeze"

i.e.


$ ps -ef|grep squeeze
112       5088     1  0 09:10 ?        00:00:00 /bin/bash /usr/sbin/squeezecenter_safe /usr/sbin/squeezecenter-server --prefsdir /var/lib/squeezecenter/prefs --logdir /var/log/squeezecenter/ --cachedir /var/lib/squeezecenter/cache
112       5171  5088  1 09:10 ?        00:04:55 /usr/bin/perl -w /usr/sbin/squeezecenter-server --prefsdir /var/lib/squeezecenter/prefs --logdir /var/log/squeezecenter/ --cachedir /var/lib/squeezecenter/cache
112       6098  5171  0 09:11 ?        00:01:48 /usr/sbin/mysqld --defaults-file=/var/lib/squeezecenter/cache/my.cnf
It was a day like any other in Ireland, only it wasn't raining

Thor

  • Super-sonnicus idioticus
Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #6 on: 11 May, 2008, 03:35:39 pm »
squeezecenter logs on my Ubuntu installation are at

/var/log/squeezecenter
It was a day like any other in Ireland, only it wasn't raining

woollypigs

  • Mr Peli
    • woollypigs
Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #7 on: 11 May, 2008, 05:38:46 pm »
ok I tried

ps -eaf | grep squeeze

and got this

114       5311     1  0 17:14 ?        00:00:00 /bin/bash /usr/sbin/squeezecenter_safe /usr/sbin/squeezecenter-server --prefsdir /var/lib/squeezecenter/prefs --logdir /var/log/squeezecenter/ --cachedir /var/lib/squeezecenter/cache
114       6167     1  0 17:25 ?        00:00:00 /bin/bash /usr/sbin/squeezecenter_safe /usr/sbin/squeezecenter-server --prefsdir /var/lib/squeezecenter/prefs --logdir /var/log/squeezecenter/ --cachedir /var/lib/squeezecenter/cache
114       6169  6167 11 17:25 ?        00:00:01 /usr/bin/perl -w /usr/sbin/squeezecenter-server --prefsdir /var/lib/squeezecenter/prefs --logdir /var/log/squeezecenter/ --cachedir /var/lib/squeezecenter/cache
114       6176  5311 21 17:25 ?        00:00:01 /usr/bin/perl -w /usr/sbin/squeezecenter-server --prefsdir /var/lib/squeezecenter/prefs --logdir /var/log/squeezecenter/ --cachedir /var/lib/squeezecenter/cache
sulivan   6181  6140  0 17:25 pts/0 /var/log

and then I looked into the /var/log/squeezecenter where this is 

2008-05-11 17:33:45 SqueezeCenter died. Restarting.
[08-05-11 17:33:45.9317] 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)]
[08-05-11 17:33:45.9332] Slim::Schema::forceCommit (1363) Warning: Trying to commit transactions before DB is initialized!
2008-05-11 17:33:46 SqueezeCenter died. Restarting.

So I guess that it is MySQL problem, I know when I installed squeezecenter it asked me for password for MySQL while installing MySQL and I was sure that was all I needed.
Current mood: AARRRGGGGHHHHH !!! #bollockstobrexit

Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #8 on: 12 May, 2008, 12:05:11 am »
http://forums.slimdevices.com/showthread.php?p=284363

says the problem is something called "apparmor" (whatever that is). The workaround is to use the permanently running main instance of the MySQL server, like this:

Quote
# mysql -u root -p
Enter password: admin_password
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 103 to server version: 5.0.24a-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database slimserver;
Query OK, 1 row affected (0.22 sec)

mysql> grant all on slimserver.* to slimserver identified by 'password';
Query OK, 0 rows affected (0.13 sec)

mysql> flush privileges;
Query OK,

mysql> quit

Then look for this in /var/log/syslog
Mar 27 16:07:10 localhost mysqld[32326]: Version: '5.0.51a-3ubuntu3' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)

Thus edit /var/lib/squeezecenter/prefs/server.prefs :
Quote
dbpassword: password
dbsource: dbi:mysql:hostname=127.0.0.1;port=3306;database=%s;mysql_socket=/var/run/mysqld/mysqld.sock
dbusername: slimserver

Re: SqueeseCenter (slimserver) on Ubuntu
« Reply #9 on: 12 May, 2008, 12:26:33 am »
Oh, after the MySQL create database statement, you may need to create the MySQL user as well, so the sequence of commands in the MySQL client would be:

mysql> create database slimserver;
mysql> insert into user (host,user,password) values('localhost', 'slimserver', password('password'));
mysql> flush privileges;
mysql> grant all on slimserver.* to slimserver identified by 'password';
mysql> flush privileges;
mysql> quit