PDA

View Full Version : MySQL error on remote network access



eater
2007-12-07, 15:19
I can access the SlimServer web interface at myhost.com:9000 just fine using computers on my local network, but when I try to reach it from a browser outside the network, the browser just tries to connect endlessly and doesn't display anything. Restarting the slimserver daemon allows the browser to connect once, but I have to restart the daemon each time I want to click a link. My firewall is open to ports 9000-9090.

Running slimserver with --d_http --d_mysql, this is the log output every time I try to hit the page from outside the local network:

2007-12-07 17:11:53.7716 Accepted connection 1 from 24.215.232.170
2007-12-07 17:11:53.7853 reading request...
2007-12-07 17:11:53.7865 HTTP request: from 24.215.232.170 (HTTP::Daemon::ClientConn=GLOB(0xa775a98)) for GET HTTP/1.1 /
2007-12-07 17:11:53.7904 processURL Clients: 192.168.50.102:34547 192.168.50.103:21418
2007-12-07 17:11:53.7931 Generating response for (htm, text/html) 2007-12-07 17:11:53.7947 generating from include.html type: fill
2007-12-07 17:11:53.8019 found path: /usr/share/slimserver/HTML/EN/include.html
2007-12-07 17:11:53.9233 generating from homeplayer_list.html type: fill
2007-12-07 17:11:53.9246 found path: /usr/share/slimserver/HTML/EN/homeplayer_list.html
2007-12-07 17:11:53.9359 generating from homeplayer_list.html type: fill
2007-12-07 17:11:53.9371 found path: /usr/share/slimserver/HTML/EN/homeplayer_list.html
2007-12-07 17:11:53.9478 generating from select_option.html type: fill
2007-12-07 17:11:53.9489 found path: /usr/share/slimserver/HTML/EN/select_option.html
2007-12-07 17:11:53.9590 generating from select_option.html type: fill
2007-12-07 17:11:53.9601 found path: /usr/share/slimserver/HTML/EN/select_option.html
2007-12-07 17:11:53.9956 ERROR: DBI Connection failed: DBI connect('hostname=127.0.0.1;port=9092;database=sli mserver:mysql_socket=/var/cache/slimserver/slimserver-mysql.sock','slimserver',...) failed: Can't connect to MySQL server on '127.0.0.1' (111) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 654

mherger
2007-12-08, 06:30
> I can access the SlimServer web interface at myhost.com:9000 just fine
> using computers on my local network, but when I try to reach it from a

Could you please provide us with some more information about your setup: where is SC running, where is MySQL? TCP/IP configuration? What's "outside" etc.

Michael

eater
2007-12-08, 10:28
Could you please provide us with some more information about your setup: where is SC running, where is MySQL? TCP/IP configuration? What's "outside" etc.

I'm running SlimServer 6.5.4 on a headless Debian stable machine. Both MySQL and the music library are on that machine as well. It makes a few services available to the Internet at large. I'm having the difficulty when I access my SlimServer web interface from a friend's desktop, across town. I have added her IP address to SlimServer's allowed hosts. Telnetting from her machine to port 9000 on my machine connects fine, but any attempt to retrieve a page times out.

Searching this forum for "654", the line number cited in my error, I find a few cases of this error, which seem to have been fixed by uninstalling and reinstalling the software. However, I'm willing to keep my install intact if that will help track down the cause of the error.

mherger
2007-12-09, 00:09
> Searching this forum for "654", the line number cited in my error, I
> find a few cases of this error, which seem to have been fixed by
> uninstalling and reinstalling the software.

The error message says that MySQL wasn't available. But as it doesn't care about where you're accessing the interface from, we've got to get an idea what's really broken. Can you still confirm that it does work on the LAN, but not over the internet? Do you see the MySQL failure every time you try to do so? And can you confirm MySQL is actually running? A MySQL log file might help, too.

Michael

eater
2007-12-09, 10:30
Can you still confirm that it does work on the LAN, but not over the internet? Do you see the MySQL failure every time you try to do so? And can you confirm MySQL is actually running? A MySQL log file might help, too.

It works perfectly on the LAN. Every time I try to access the web interface over the Internet I see the MySQL error in the SlimServer log -- except the very first connection after a SlimServer restart works fine. The MySQL logs don't show any crashes or errors. MySQL is running and working smoothly for other purposes.

Do you think it's useful for me to maintain this bug in reproducible form, or should I try a reinstall (or upgrade to 7) to get rid of it? I'm inclining toward the latter.

kdf
2007-12-09, 10:45
On 9-Dec-07, at 9:30 AM, eater wrote:

>
> Do you think it's useful for me to maintain this bug in reproducible
> form, or should I try a reinstall (or upgrade to 7) to get rid of it?
> I'm inclining toward the latter.

I'd recommend doing with 7.0. It's well into Beta and expected to
work for most users now. All development work has halted for 6.5.x
so even if the problem is found for 6.5, it would have to then be
tested in 7.0 and if it still exists, would only be fixed in 7.0. I
would say something different if you had a fully working 6.5.4 or
6.5.5 setup, but from what I'm reading, you don't. See the notes
here: http://wiki.slimdevices.com/index.cgi?DebianPackage

-kdf

eater
2007-12-09, 13:01
OK, I installed version 7 from the .deb, and now I can't get it working at all. /var/cache/slimserver/mysql-error-log.txt says:

071209 14:52:12 InnoDB: Page checksum 1071269565, prior-to-4.0.14-form checksum 2819798444
InnoDB: stored checksum 641269709, prior-to-4.0.14-form stored checksum 2819798444
InnoDB: Page lsn 1 942599359, low 4 bytes of lsn at page end 942599359
InnoDB: Page number (if stored to page already) 3173,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be an index page where index id is 0 11312
InnoDB: (index PRIMARY of table slimserver/tracks)
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 3173.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also InnoDB: http://dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.

I am not much of a MySQL admin; how do I go about fixing this? Thanks!

kdf
2007-12-09, 13:16
On 9-Dec-07, at 12:01 PM, eater wrote:

>
> OK, I installed version 7 from the .deb, and now I can't get it
> working
> at all. /var/cache/slimserver/mysql-error-log.txt says:
>
look for /var/cache/slimserver and get rid of the MySQL directory
(this erases your previous db, but it wasn't working right anyway, so
it's for the best)
-k

eater
2007-12-09, 15:22
After deleting and rebuilding the database, I'm no longer getting a MySQL error. Thanks!