Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 212939

Summary: media-sound/squeezecenter - use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81"
Product: Gentoo Linux Reporter: Adrian Barry <adrian>
Component: Current packagesAssignee: Joe Peterson (RETIRED) <lavajoe>
Status: RESOLVED WORKSFORME    
Severity: normal CC: gentoo, l.valerimanera, stuart
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Adrian Barry 2008-03-10 13:37:17 UTC
This is is error I got when I tried to start squeezecenter.

"Use of uninitialized value in join or string at /usr/lib/perl5/5.8.8/File/Spec/Unix.pm line 81"

I seem to have fixed it by changing the squeezecenter.prefs file.
I moved the last line which contained the database information to the first line in the file.

I also manually cerated the database & user in mysql but this may have been redundant.  It certainly didn;t help until after I had modified the prefs file.



Reproducible: Always

Steps to Reproduce:
1. loaded the ebuild
2. tried to start squeezecenter
3.  got the error every time until I changed my squeezecetner.prefs file

Actual Results:  
Squeezecetner works now.
Comment 1 Joe Peterson (RETIRED) gentoo-dev 2008-03-10 18:47:58 UTC
Thanks for the report.  I have added Stuart Hickinbottom to this bug, since he has been very involved with this ebuild and server startup.  He may have immediate insight.

Note that this did not happen for me.  I was able to start the server with no such errors and without changing any config files.  However, your setup may be different, so we need to investigate.
Comment 2 Stuart Hickinbottom 2008-03-10 21:55:10 UTC
I get that message when starting the server when there is no configured music folder (ie the very first starting of the server after installation). However, I've always seen this message to be harmless and the server has started with no problems (and I go on to get the server configuration wizard when opening the web interface).

Are you sure that the server wasn't running and that the web server wasn't available when you saw this message?
Comment 3 Leonardo Valeri Manera 2008-03-29 19:11:25 UTC
Its not working for me either, even when I do that config file thing.

And I've no clue on how to use MySQL, so no idea how to create the database manually.
Comment 4 Joe Peterson (RETIRED) gentoo-dev 2008-03-29 20:43:49 UTC
If you have never set up MySQL, running "emerge --config squeezecenter" should initialize things, asking you, e.g., for the desired MySQL root password, etc.  If you have not tried this, give it a shot.
Comment 5 Leonardo Valeri Manera 2008-03-29 20:48:13 UTC
(In reply to comment #4)
> If you have never set up MySQL, running "emerge --config squeezecenter" should
> initialize things, asking you, e.g., for the desired MySQL root password, etc. 
> If you have not tried this, give it a shot.
> 

Thank you! That did the trick! :D
Comment 6 Joe Peterson (RETIRED) gentoo-dev 2008-05-06 18:56:21 UTC
Closing bug due to inability to reproduce.  Please reopen with more detailed info if the problem still exists.
Comment 7 Robin Bankhead 2008-06-27 18:38:57 UTC
This error just hit me too. I tried the alteration to squeezecenter.prefs but no change. The backtrace from /var/log/squeezecenter/server.log is below - please note this is a previously working install and the squeezecenter mysql account is known to be working (and tested manually since this occurred).

[08-06-27 19:27:53.3688] Slim::Schema::Storage::throw_exception (70) Error: DBI Connection failed: DBI connect('database=squeezecenter;mysql_socket=/var/run/mysqld/mysqld.sock','squeezecenter',...) failed: Access denied for user 'squeezecenter'@'localhost' (using password: YES) at /usr/share/squeezecenter/CPAN/DBIx/Class/Storage/DBI.pm line 652
[08-06-27 19:27:53.3709] Slim::Schema::Storage::throw_exception (70) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (/usr/lib/perl5/vendor_perl/5.8.8/Slim/Schema/Storage.pm line 70)
   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/lib/perl5/vendor_perl/5.8.8/Slim/Schema/Storage.pm line 29)
   frame 5: (eval) (/usr/lib/perl5/vendor_perl/5.8.8/Slim/Schema/Storage.pm line 29)
   frame 6: Slim::Schema::Storage::dbh (/usr/lib/perl5/vendor_perl/5.8.8/Slim/Schema.pm line 121)
   frame 7: Slim::Schema::init (/usr/lib/perl5/vendor_perl/5.8.8/Slim/Music/Info.pm line 76)
   frame 8: Slim::Music::Info::init (/usr/sbin/squeezecenter-server line 348)
   frame 9: main::init (/usr/sbin/squeezecenter-server line 451)
   frame 10: main::main (/usr/sbin/squeezecenter-server line 1012)

[08-06-27 19:27:53.3731] Slim::Schema::init (124) Error: Couldn't connect to database! Fatal error: [] Exiting!
[08-06-27 19:27:53.3746] Slim::Schema::init (124) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (/usr/lib/perl5/vendor_perl/5.8.8/Slim/Schema.pm line 124)
   frame 1: Slim::Schema::init (/usr/lib/perl5/vendor_perl/5.8.8/Slim/Music/Info.pm line 76)
   frame 2: Slim::Music::Info::init (/usr/sbin/squeezecenter-server line 348)
   frame 3: main::init (/usr/sbin/squeezecenter-server line 451)
   frame 4: main::main (/usr/sbin/squeezecenter-server line 1012)


emerge --info
Portage 2.2_rc1 (default-linux/x86/2007.0/server, gcc-4.1.2, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.25-gentoo-r5-i686-Pentium_III_-Coppermine-with-glibc2.0
Timestamp of tree: Thu, 26 Jun 2008 19:15:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=pentium3 -mmmx -msse -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/make.conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=pentium3 -mmmx -msse -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks nodoc noinfo parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk/"
LDFLAGS=""
LINGUAS="en_GB"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/dev/shm"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.uk.gentoo.org/gentoo-portage"
USE="X509 a52 aac acl acpi aim apache2 berkdb bzip2 clamav cli cracklib crypt cups curl curlwrappers dba dbm dbus dbx dio dri dv encode exif fastcgi ffmpeg foomaticdb fortran ftp gd gd-external gdbm glut gpm hal hardened hardenedphp iconv icq imagemagick imap innodb isdnlog java javascript jpeg kerberos lcms ldap libwww mad mailwrapper matroska mcal midi minimal mmx mmxext mp3 mudflap mysql ncurses nls nptl nptlonly offensive ogg openmp pam pcre perl php png portaudio posix ppds pppd python readline reflection samba scanner session sharedmem snmp soap spl sse ssl tcpd theora threads tidy tiff tokenizer truetype unicode usb vcd vhosts win32codecs x86 xine xml xml2 xmlrpc xorg xsl xvid zip zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB" USERLAND="GNU" VIDEO_CARDS="ati fbdev vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY 

Last updates to mysql or squeezecenter were some time ago, but have only just restarted the machine t'other day.
Comment 8 Joe Peterson (RETIRED) gentoo-dev 2008-06-27 19:14:08 UTC
Hi - sounds like the password or username used for the database does not match.  If you have an existing mysql user/pass, you probably need to manually put that in the config file.  I'll let Stuart chime in too, as he has more experience with the specifics.
Comment 9 Stuart Hickinbottom 2008-06-27 21:44:52 UTC
(In reply to comment #8)
> Hi - sounds like the password or username used for the database does not match.
>  If you have an existing mysql user/pass, you probably need to manually put
> that in the config file.  I'll let Stuart chime in too, as he has more
> experience with the specifics.

Yes - I believe that's the problem (I get the same error when I change the password to something 'wrong' in the preferences file and then start SqueezeCenter).

The easiest way to fix it is to run "emerge --config squeezecenter" - that will ask you for a new password, reset the database user to use that new password, and update the preferences with the correct password. The side-effect is that it'll clear the music database and will rescan your collection, but it's the easiest route to go. It won't lose any other settings of yours, though, so isn't that much of a pain.
Comment 10 Robin Bankhead 2008-06-28 10:47:48 UTC
Lads, the password isn't "something wrong": as I stated in my post, the username and password are correct. The 'squeezecenter'@'localhost' user has full privileges on the squeezecenter database, and I can use it to log in to the mysql cli.

For the sake of completeness, here's what is in the file /etc/squeezecenter.prefs:
dbsource: dbi:mysql:database=squeezecenter;mysql_socket=/var/run/mysqld/mysqld.sock
dbusername: squeezecenter
dbpassword: squeezecenter

The account details are *not* wrong. And I won't re-create the database on a whim, because then I'll have to repeat the tedious business of manually rescuing the ~200 tracks that weren't scanned successfully from "No Artist/No Album".
Comment 11 Stuart Hickinbottom 2008-06-28 11:44:24 UTC
Are you using 7.0.2_beta20080530? If so the prefs have moved to here:

/var/lib/squeezecenter/prefs/server.prefs
and
/var/lib/squeezecenter/prefs/squeezecenter.prefs

And the one in /etc/squeezenceter.prefs isn't used any more.

Could you check both of the prefs files listed above to see that the password matches what you've tested it with?
Comment 12 Robin Bankhead 2008-06-29 11:33:07 UTC
Ah, yes, that sorted it. Sorry, I missed that change :/

My problem was unrelated, then.  Just to confirm however that moving the "dbsource:..." line to the top of the file prevents the "uninitialized value..." error appearing.
Comment 13 Stuart Hickinbottom 2008-06-29 11:37:25 UTC
Great - thanks for letting us know.