spacer
spacer search

SwissCenter

Search
spacer
Main Menu
Home
Documentation + FAQ
Screenshots
Downloads
Forums
Bug Tracking
History
Login
Username

Password

Remember me
?
No account yet?

Locations of visitors to this page

 
Home arrow Forums

SwissCenter Forums  


iradio.php error or MYSQL? - 2008/10/03 09:11 Hello

i have just fnised settingup SC on a Buffalo LS PRo runing freelink and when i am trying to set up my media location i get an errro .

looking in the apche logs i see this being repeated many times

[error] [client xxxxxxxx] PHP Notice: Undefined offset: 2 in /var/www/swisscenter/ext/iradio/iradio.php on line 265

The URL being called is
http://XXX.XX.X.X:8080/config/?section=DIRS&action=DISPLAY

this one wokrs fine
http://XXX.XX.X.X::8080/config/?section=RSS&action=DISPLAY

has this been seen before?
thnx for any help
rob
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/03 12:18 Looking in to this more i have see the following in the Support.log whcih looks like a MYSQL error , however the system test page is fine and many actions wokr OK except for the categories and manage vides/images???


[2008.10.03 17:14:27] Page Requested : http://192.168.0.3:8080/config/index.php?section=DIRS&action=DISPLAY by client (192.168.0.4)
[2008.10.03 17:14:27] Lost connection to MySQL server during query
[2008.10.03 17:14:27] select distinct parent_id from categories
[2008.10.03 17:14:27] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.03 17:14:27] Unable to query database:
[2008.10.03 17:14:27] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.03 17:14:27] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.03 17:14:27] Unable to query database:
[2008.10.03 17:14:27] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.03 17:14:27] Unable to query database:
[2008.10.03 17:14:27] Connected Failed :: T
[2008.10.03 17:14:27] Connected Failed :: T

.....
[2008.10.03 17:14:29] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
[2008.10.03 17:14:29] Unable to query database:
[2008.10.03 17:15:00] ------------------------------------------------------------------------------
[2008.10.03 17:15:00] Page Requested : http://192.168.0.3:8080/config/ by client (192.168.0.4)
[2008.10.03 17:15:01] - PHP Version : 5.2.0-8+etch11
[2008.10.03 17:15:01] - MySQL Version : 5.0.32-Debian_7etch6
[2008.10.03 17:15:01] - Successfully connected to MySQL
[2008.10.03 17:15:01] - Successfully connected to the SwissCenter database.

urm .... not sure what to try now

more in[fo
2008.10.03 17:37:17] Page Requested : http://192.168.0.3:8080/config/index.php?section=DIRS&action=DISPLAY by client (192.168.0.4)
[2008.10.03 17:37:17] Identified network shares
[2008.10.03 17:37:17] Lost connection to MySQL server during query
[2008.10.03 17:37:17] select distinct parent_id from categories
[2008.10.03 17:37:17] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/03 19:13
Code:

 root@media:/var/www/swiss/config# more swisscenter.ini  ;************************************************************************* ; SwissCenter Configuration ;************************************************************************* DB_HOST=localhost DB_USERNAME=swiss DB_PASSWORD=**** DB_DATABASE=swiss LOG_MODE=8



What do you have in your swisscenter.ini its trying to connect via a socket, do you have DB_HOST defined ?
--
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/06 05:23 Hello

for loking at this form me .. i have the following

Code:

 root@LS-GLFD4:/var/www/swisscenter/config# vi swisscenter.ini ;************************************************************************* ; SwissCenter Configuration ;************************************************************************* DB_HOST=localhost DB_USERNAME=swisscenter DB_PASSWORD=****** DB_DATABASE=swiss LOG_MODE=8



As i mentioned the configuration seems partialy ok as i can go down the configuration screen and update asll the config except for media locatons
i.e.

http://192.168.0.3:8080/config/?section=RSS&action=DISPLAY works ok

but
http://192.168.0.3:8080/config/?section=DIRS&action=DISPLAY doesn't


Not sure what else to try as it looks like the connecitotn the DB is fine for a period then fails on certain calls/queries.

Help apprecaited
Rob
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/06 09:46 OK so more digging and its defintley an issue with this errro
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

I have confijmred that i can connect to MYSQL via command line. mysql -p

root@LS-GLFD4:/etc/mysql# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.32-Debian_7etch6 Debian etch distribution

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

and so mysql is ruing fine , just looks like somthing wrong with the socket set up or ownership perhaps.

I have tried a numebr of things having searched for this error on the web buit none seem to have wokred ...

still seeking help
[Edit - does Swiss centre knwow to use the mysql password i porvdied when creaitng the database ???]
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/06 11:03 I am not at home so I can't think about this properly, however swisscenter will not use a socket as it is built around mysql being a network service.

having a quick look at your genres.txt in ext/iradio mine has 49 lines in it and has a md5sum of

md5sum genres.txt
450d3f13cea343a42021ddd81364c8ac genres.txt

and has a format like

rock:hardrock
rockunk
rock:metal
rock:rock
rock:blues
classic:classic


Do you have timeouts defined in /etc/my.conf

eg

[mysqld]
:
:
wait_timeout = 1800
connect_timeout = 10

I don't in mine.

After it dies on swiss, does the mysql client work ?
--
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/06 11:57 HI

yes my genres.txt is the same as yours wiht the same checksum

450d3f13cea343a42021ddd81364c8ac genres.txt

and i can connect via mysqp -p asfter the erro in SC.

and my.cnf looks like this

[<mysqld]
port = 3306
socket = /var/run/mysqld/mysqld.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K
bind-address = 127.0.0.1
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id = 1

port = 3306

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

confused - iam
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/06 12:33 If you don't have a lot of state in your database, have you tried dropping it and creating a new one ?

( I wondering if you have all your tables in properly place ? )
--
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/06 13:38 Hi
good suggestion. I dropped the table form webmin and recreated via SC config as normal.

all tests were OK so i tried the media locationtion again... smae error

[2008.10.06 18:36:15] Page Requested : http://192.168.0.3:8080/config/index.php?section=DIRS&action=DISPLAY by client (192.168.0.4)
[2008.10.06 18:36:15] Lost connection to MySQL server during query
[2008.10.06 18:36:15] select distinct parent_id from categories
[2008.10.06 18:36:15] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.06 18:36:15] Unable to query database:
[2008.10.06 18:36:15] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.06 18:36:15] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.06 18:36:15] Unable to query database:
[2008.10.06 18:36:15] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.06 18:36:15] Unable to query database:
[2008.10.06 18:36:15] Connected Failed ::
[2008.10.06 18:36:15] Connected Failed ::
[2008.10.06 18:36:15] Connected Failed ::
[2008.10.06 18:36:15] Connected Failed ::
[2008.10.06 18:36:15] Connected Failed ::


loks like some kind of lock error, when the config page laods it ca estab;lish the connection OK but then then loses it. checkd on the wemin MYSQL connetions list and i ca see all connections dropped ot the DB once the error occurs.
very odd.
cheers
rob
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/06 17:48 I do have a Buffalo LS Pro myself, I am running debian and it may actually be debian so if we get really stuck I can try an install myself.

You maybe running out of memory..., here we can see my box has 128M, and I am not using most of my swapp

more /proc/meminfo
MemTotal: 125844 kB
MemFree: 2952 kB
Buffers: 14364 kB
Cached: 66912 kB
SwapCached: 0 kB
Active: 52416 kB
Inactive: 38828 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 125844 kB
LowFree: 2952 kB
SwapTotal: 136512 kB
SwapFree: 136512 kB


This is how I added a gig of swap to my lspro, does this help ?

root@lspro:/var/log# df -H
Filesystem Size Used Avail Use% Mounted on
rootfs 477M 410M 67M 86% /
/dev/root.old 14M 12M 2.4M 83% /initrd
/dev/root 477M 410M 67M 86% /
tmpfs 103k 0 103k 0% /lib/init/rw
tmpfs 65M 0 65M 0% /dev/shm
tmpfs 11M 21k 11M 1% /tmp
/dev/sda1 295M 16M 265M 6% /boot
/dev/sda6 249G 51G 199G 21% /mnt/disk1
192.168.11.232:/export/home
79228Y 0 79228Y 0% /mnt3

root@lspro:/var/log# dd if=/dev/zero of=/mnt/disk1/swap01 count=1024k bs=1024
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 G copied, 71.8347 seconds, 14.9 MB/s
root@lspro:/var/log# mkswap /mnt/disk1/swap01
Setting up swapspace version 1, size = 1073737 kB
no label, UUID=f2eb7c4e-a551-4c09-a3bb-7ef28a145f4d
root@lspro:/var/log# swapon /mnt/disk1/swap01
root@lspro:/var/log# grep -i swap /proc/meminfo
SwapCached: 56 kB
SwapTotal: 1185080 kB
SwapFree: 1184968 kB

To remove the swap use swapoff ( can take some time ), then rm the file
--
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/08 14:50 Hello

thnask for keepiong with me ... i did as you oputlined ot add more swap space .

SwapCached: 0 kB
SwapTotal: 1345728 kB
SwapFree: 1345728 kB

- not sure if it is uing it though?

rebooted and same error, here is the log. not sure what to try next .. thganks for your continued help. I can wipe and start again as the box is new and blank- if we think it may help. Would be great if you can install on your LSP pro and see if you have the same issues?
thanks
------------------------------------------------------------------------------
[2008.10.08 19:44:25] Page Requested : http://192.168.0.3:8080/config/ by client (192.168.0.4)
[2008.10.08 19:44:40] - PHP Version : 5.2.0-8+etch11
[2008.10.08 19:44:40] - MySQL Version : 5.0.32-Debian_7etch6
[2008.10.08 19:44:40] - Successfully connected to MySQL
[2008.10.08 19:44:40] - Successfully connected to the SwissCenter database.
[2008.10.08 19:44:48] ------------------------------------------------------------------------------
[2008.10.08 19:44:48] Page Requested : http://192.168.0.3:8080/config/?section=DIRS&action=DISPLAY by client (192.168.0.4)
[2008.10.08 19:44:49] Lost connection to MySQL server during query
[2008.10.08 19:44:49] select distinct parent_id from categories
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:49] Unable to query database:
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:49] Unable to query database:
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:49] Unable to query database:
[2008.10.08 19:44:49] Connected Failed ::
[2008.10.08 19:44:49] Connected Failed ::
[2008.10.08 19:44:49] Connected Failed ::
[2008.10.08 19:44:49] Connected Failed ::
[2008.10.08 19:44:49] Connected Failed ::
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:49] Unable to query database:
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:49] Unable to query database:
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:49] Unable to query database:
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:49] Unable to query database:
[2008.10.08 19:44:49] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:50] Unable to query database:
[2008.10.08 19:44:50] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:50] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:50] Unable to store system preference 'INTERNET_AVAILABLE' = '1'
[2008.10.08 19:44:50] Connected Failed :: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2008.10.08 19:44:50] Unable to query database:
[2008.10.08 19:44:50] Connected Failed :: Can't connect to local MySQL server through socket
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/08 16:16 bobbo wrote:
Hello

thnask for keepiong with me ... i did as you oputlined ot add more swap space .

SwapCached: 0 kB
SwapTotal: 1345728 kB
SwapFree: 1345728 kB

- not sure if it is uing it though?

rebooted and same error, here is the log


rebooting it would have removed the swap as it wasn't added to /etc/fstab
--
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/08 16:42 ooops that is true...... i set it back to swopon

pre

SwapCached: 0 kB
SwapTotal: 297160 kB
SwapFree: 297160 kB

post

SwapCached: 0 kB
SwapTotal: 1345728 kB
SwapFree: 1345728 kB

so that has wokrde but still get the same error, do i need ot do anyhting else to enabel the uyse of the swop?


thanks as ever ....

for info
MemTotal: 125844 kB
MemFree: 21644 kB
Buffers: 15740 kB
Cached: 51204 kB
SwapCached: 0 kB
Active: 60480 kB
Inactive: 34456 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 125844 kB
LowFree: 21644 kB
SwapTotal: 1345728 kB
SwapFree: 1345728 kB
Dirty: 8 kB
Writeback: 0 kB
Mapped: 44656 kB
Slab: 5876 kB
CommitLimit: 1408648 kB
Committed_AS: 93948 kB
PageTables: 956 kB
VmallocTotal: 385024 kB
VmallocUsed: 4768 kB
VmallocChunk: 380256 kB
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/08 17:57 I will try and install it on my lspro and see how I get on, I will write a mini document --
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/08 18:10 Cool lets seeif you have the same issue or not... FYI i used the Bufflao NAS WIKI iinfo from here


http://buffalo.nas-central.org/index.php/SwissCenter_-_server_for_the_ShowCenter% 2C_LinkPlayer_and_LinkTheatre

thanks for helping
rob
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/09 15:00 I wonder if it is realted to this debian bug

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=420010

as libapache2-mod-auth-mysql is no longer avaibel i am not sure what to do but this does soudn familiar

rob
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/09 15:06 I can reproduce the issue and I will look into it --
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/09 17:24 Zz9pzza wrote:
I can reproduce the issue and I will look into it

I believe it is a broken mysql server as described here:

http://buffalo.nas-central.org/forums/viewtopic.php?f=39&t=2402&p=65726&hilit=+SQL+Problems+after+update+%2F+upgrade+#p65726


Code:

  aptitude remove mysql-server wget http://buffalo.nas-central.org/download/Uploads/LSPro/FREELINK/mysql-server-5.0_5.0.30-3_arm.deb dpkg --install mysql-server-5.0_5.0.30-3_arm.deb 



try with that
--
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/10 05:00 You are a star thank you very much for finding this , i had trawled the Buffalo NAS forum but did not pick up on this.................


All working now .....

thanks again
rob
Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/10 06:38 bobbo wrote:
You are a star thank you very much for finding this , i had trawled the Buffalo NAS forum but did not pick up on this.................


All working now .....

thanks again
rob


A pleasure, would you post the solution to the Buffalo NAS forum for me as I don't have an account there
--
Server: Debian 4.0, Ram: 3 gig , Disc : 5 TB
Client: Buffalo LinkTheatre, dLAN 200 AV
MySQL 5.0.32-Debian_7etch1-log
  | | The administrator has disabled public write access.
Re: iradio.php error or MYSQL? - 2008/10/10 08:09 I have done.... Player: EVA700
Server: Windows Vista
Server2:Buffalo LS Pro NAS & Freelink Apache
  | | The administrator has disabled public write access.
spacer
 

Screenshots

www.flickr.com
This is a Flickr badge showing public photos from swisscenter. Make your own badge here.


 

Mambo is Free Software released under the GNU/GPL License.
spacer