Bug 7783 - MySQL database fails to start: can't bind to address
: MySQL database fails to start: can't bind to address
Status: RESOLVED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: unspecified
: PC Ubuntu Linux
: -- normal (vote)
: ---
Assigned To: Ross Levine
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-09 14:33 UTC by David Van Couvering
Modified: 2008-04-11 22:24 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Van Couvering 2008-04-09 14:33:13 UTC
I installed squeezecenter on Ubuntu 7.10.  After a reboot any attempt to connect to localhost:9000 fails.

I googled around and got some tips that it might be related to MySQL.  I found the following error file at /var/lib/squeezecenter/cache/mysql-error-log.txt with this error:

080409 14:04:54  InnoDB: Started; log sequence number 0 5201051
080409 14:04:54 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
080409 14:04:54 [ERROR] Do you already have another mysqld server running on port: 9092 ?
080409 14:04:54 [ERROR] Aborting

080409 14:04:54  InnoDB: Starting shutdown...
080409 14:04:58  InnoDB: Shutdown completed; log sequence number 0 5201051
080409 14:04:58 [Note] /usr/sbin/mysqld: Shutdown complete

I shut down the default instance of mysqld (which shouldn't have mattered, it's on port 3306).  That didn't work.  I also changed the port number for the mysql for squeezecenter by doing the following (which I probably did wrong):

in /var/lib/squeezecenter/cache/my.cnf I changed the port number to 9192

if /var/lib/squeezecenter/prefs/server.prefs I changed the following line:

dbsource: dbi:mysql:hostname=127.0.0.1;port=9092;database=%s

to

dbsource: dbi:mysql:hostname=127.0.0.1;port=9192;database=%s

I did a netstat -a and I couldn't find anything listening on port 9192

More information: *before* reboot on my first install I also got a hang, but this was because the Ubuntu update manager was pegging the CPU.  I killed that and I got a working squeezecenter.  But since reboot I've been completely unsuccessful.

Any help you can give would be *much* appreciated.
Comment 1 James Richardson 2008-04-09 14:42:08 UTC
David: please do not set priority/severity.

QA to investigate
Comment 2 David Van Couvering 2008-04-09 15:27:53 UTC
OK, fair enough, but I do want to say that this is a stopper for me.  I am completely unable to use Squeezecenter because of this.  In my book that's pretty high priority.

I'm hoping I can work around it with some help on how to fix the Squeezecenter configuration, but I do need your help with this.
Comment 3 Ross Levine 2008-04-09 15:54:19 UTC
After rebooting did the port default back to 9092? What else do you have installed using MySQL? SC7 is working for many Ubuntu 7.10 users myself included so there must be something else contributing to this issue, we'll need more information to determine the problem. 
Comment 4 Mark Miksis 2008-04-11 15:43:52 UTC
This sounds like what happens if an old mysqld (from SS or SC) is still running.  I'm not sure why netstat didn't see anything, but what happens if you do 'ps-ef | grep squeeze" (or grep slim if you upgraded from SS 6.x)?
Comment 5 David Van Couvering 2008-04-11 22:24:28 UTC
Well, I also couldn't get my computer to sleep/suspend on Ubuntu, and I don't want to leave my computer on all the time nor do I want to have to boot it up each time I want to listen to music.

So I have just finished installing Windows XP on my machine and tossed Ubuntu for now.  Squeezecenter is working just fine on Windows XP.  It seems to be a little more smooth around the edges on XP, which suits me just fine.

So I am closing this issue, although I do want to say diagnosing this kind of problem is particularly hard and Squeezecenter just hangs when it happens.  I know you just moved to MySQL, but you might consider using sqlite instead - you can embed it directly in your server process and not have to deal with managing another process like MySQL.  And that's coming from a Sun employee who works on databases :)

Thanks,

David