PDA

View Full Version : Squeezecenter scan not finding any music



cjbrooker
2008-04-06, 07:28
I have Squeezecenter 7.0 running on Ubuntu Gutsy.

When I scan (clear everything or look for new) it finds no music.

I noticed error messages in the server.log relating to connecting to the MySQL database as well as some other problems.

I've tried removing and reinstalling (from debian packages) but still the same.

Here's a snippet of the log after a restart of the server and rescan:
2008-04-06 15:10:44 squeezecenter_safe started.
[08-04-06 15:10:46.7927] Slim::Schema::forceCommit (1363) Warning: Trying to commit transactions before DB is initialized!
[08-04-06 15:10:46.7945] Slim::Schema::Storage::throw_exception (67) Error: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=sli mserver:mysql_socket=/var/lib/squeezecenter/cache/squeezecenter-mysql.sock','slimserver',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /usr/share/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 652
[08-04-06 15:10:46.7949] Slim::Schema::Storage::throw_exception (67) Backtrace:

frame 0: Slim::Utils::Log::logBacktrace (/usr/share/perl5/Slim/Schema/Storage.pm line 67)
frame 1: Slim::Schema::Storage::throw_exception (/usr/share/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 658)
frame 2: DBIx::Class::Storage::DBI::_connect (/usr/share/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 616)
frame 3: DBIx::Class::Storage::DBI::_populate_dbh (/usr/share/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 543)
frame 4: DBIx::Class::Storage::DBI::ensure_connected (/usr/share/perl5/Slim/Schema/Storage.pm line 27)
frame 5: (eval) (/usr/share/perl5/Slim/Schema/Storage.pm line 27)
frame 6: Slim::Schema::Storage::dbh (/usr/share/perl5/Slim/Schema.pm line 244)
frame 7: (eval) (/usr/share/perl5/Slim/Schema.pm line 244)
frame 8: Slim::Schema::disconnect (/usr/sbin/squeezecenter-server line 964)
frame 9: main::cleanup (/usr/share/perl5/Slim/bootstrap.pm line 368)
frame 10: Slim::bootstrap::sigint (/usr/share/perl5/Slim/bootstrap.pm line 402)
frame 11: Slim::bootstrap::theEND (/usr/sbin/squeezecenter-server line 1001)
frame 12: main::END (/usr/sbin/squeezecenter-server line 0)
frame 13: (eval) (/usr/sbin/squeezecenter-server line 0)

[08-04-06 15:10:46.7956] Slim::Schema::Storage::dbh (38) Warning: Unable to connect to the database - trying to bring it up!
[08-04-06 15:11:03.2554] main::checkDataSource (870) Warning: Schema updated or tracks in the database, initiating scan.
[08-04-06 15:11:03.3598] Slim::Networking::mDNS::startAdvertising (110) Error: Couldn't find mDNSResponderPosix binary! Aborting!
[08-04-06 15:20:16.8716] Slim::Networking::Select::select (245) Error: Select task failed: Can't use an undefined value as a SCALAR reference at /usr/share/perl5/Slim/Web/HTTP.pm line 1673.

Any help on this would be much appreciated.

cjbrooker
2008-04-07, 04:50
Is anyone able to help me on this?

Could it be a problem with the MySQL database or the perl code?

I really would like to get my music back in Squeezecenter.

davis
2008-04-07, 05:44
Have you ever had SqueezeCenter finding your music?

What directory have you told SqueezeCenter to search? Does the user "squeezecenter" have permission to view your music?

Here's what I've just tried (as root):
====
chsh -s /bin/bash squeezecenter # Set sc's shell to bash to allow login
su - squeezecenter # change to sc user
ls -al /home/public/music/06_the_sunshine_underground.flac #list file info
###Output omitted, but successful
metaflac --list /home/public/music/06_the_sunshine_underground.flac
###Output omitted, but successful
exit # exit sc user shell
chsh -s /sbin/nologin squeezecenter # set shell back as it was
====

If you're using e.g. Oggs or MP3s you'll have to change the "metaflac --list" to ogginfo or mp3info or whatever.

Basically you're just checking that the user "squeezecenter" can view stuff inside the path you've given to SqueezeCenter (check, and double-check the paths).

cheers

cjbrooker
2008-04-07, 07:57
Thanks for the reply. I will try this tonight when I get home.

I think it may be related to permissions as I have been playing around with these recently and Squeezecenter was working fine before I started 'meddling'.

All music directories and files have my local user (not squeezecenter user) as the owner.
I have the following permissions for directories: drwxr--r--
and the following for files:-rw-r--r--

What are the recommended permissions for music files and directories in *nix environments in order for squeezecenter to access them? I thought squeezecenter would only need read access.

davis
2008-04-07, 08:42
I have the following permissions for directories: drwxr--r--
and the following for files:-rw-r--r--

What are the recommended permissions for music files and directories in *nix environments in order for squeezecenter to access them? I thought squeezecenter would only need read access.

That's the problem (probably). In Unix-style systems, the relevant user (squeezecenter) *must* have Execute "x" access on *all* *parent* directories.

I.e. if, for example, your music is in /home/public/music/foo/track.ogg, you want world-executable and world-readable (mode 755) on "/home", "/home/public/", "/home/public/music", and "/home/public/music/foo/".

The following commands will probably sort it out for you

===
cd /home/public/music #or wherever your music is
chmod -R a+r * # add read permission recursively to everything
find . -type d -exec chmod go+rx {} \; # Add read+exec perms to directories
===

The punctuation at the end of the "find" command is important: it reads "open-braces, close-braces, space, backslash, semi-colon".

cheers

cjbrooker
2008-04-07, 10:05
Thanks so much, davis, that did the trick.

My music is back being scanned as before.

I shall tread more carefully next time I fiddle with my permissions.

Millwood
2008-04-07, 12:48
another poster taught me about

chmod -R a+rX

where the capitol X adds x perms automgically where needed.

cjbrooker
2008-04-08, 02:18
Thanks for the tip!

I've added a section to the wiki about permissions to help others (under 'Note: Linux / UNIX file and directory permissions'):

http://wiki.slimdevices.com/index.cgi?BeginnersGuideToOrganising

Could someone read through it to check it makes sense and is correct?

davis
2008-04-08, 05:27
Could someone read through it to check it makes sense and is correct?


Looks good to me; nice work.

GoodVibrations
2008-06-27, 14:19
Here's what I've just tried (as root):
====
chsh -s /bin/bash squeezecenter # Set sc's shell to bash to allow login
chsh -s /sbin/nologin squeezecenter # set shell back as it was
====


I wanted to install some plugins as user=squeezecenter.
Since I couldn't su to it from root (I'm running debian), I found the above post and did:
chsh -s /bin/bash squeezecenter

It worked fine and I was able to su squeezecenter, install my plugins and exit back to root.

I then did:
chsh -s /usr/sbin/nologin squeezecenter

But I'm not sure that's right?
Because if I now do "su squeezecenter" I get "This account is currently not available.", whereas before I just got nothing "".

So am I really setting the shell back to the original setting with "nologin" or am I doing something wrong?
Is there some .profile or something like it for the squeezecenter user, where the shell is stated?

Hope you understand my rambling. i just want the SC user set back as it was before I switched to the bash shell.

GoodVibrations
2008-06-29, 02:54
---bump---

mherger
2008-06-30, 00:32
> ---bump---

You should probably open a new thread instead of bumping one which is marked at the very top and in all uppercase "SOLVED".

--

Michael

GoodVibrations
2008-06-30, 11:46
"Blushing"! :-)