Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mysql server has gone Away

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Trex2303



Joined: 08 Dec 2012
Posts: 13

PostPosted: Fri Dec 14, 2012 8:18 pm    Post subject: Mysql server has gone Away Reply with quote

So recently we had an issue with a server. In which we had to do a reboot on the server (not a restart, but a reboot). In doing so, after everything came back on, ICKH is no longer working now.

Now we just get a message when trying to start the stream that says "mysql server has gone away"

Is there something that needs restarted for ICKH or anything? Like a Daemon or something?

Its like it just stopped working since we rebooted.

(mysql is running just fine, as shoutcast stream started up just fine)
Its the ICKH stream that won't start back up.

Any ideas there?
Back to top
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Dec 14, 2012 9:32 pm    Post subject: Reply with quote

Let's be clear. That is not an icecast message, I suspect it's a centovacast message which I am not sure what case causes it.

The problem you have is that while I've tried to make the KH build operate as compatible as possible to 2.3.2, the only response from any centovacast people to resolve those issues is that they do not support the kh build. I do not have access to their code to determine the use case. There may be some subtle issue or they may be relying on some test that is not reliable.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Trex2303



Joined: 08 Dec 2012
Posts: 13

PostPosted: Fri Dec 14, 2012 11:51 pm    Post subject: Reply with quote

well, no one can view their coding as its all ioncoded anyways.

But is there something that during the reboot, caused it to go out?

It was working just dandy before we did the reboot, and now it wont run properly. On one of our other servers, the same thing happened, rebooted server.. ICKH stopped working, that was why we got the current server and moved people to that server because when first installed ICKH worked perfectly.

Then reboot... Then stopped working. if we point to an area where its just Icecast, its fine, then point back to the directory where ICKH is, it doesnt work. And there are no errors on any logs about, other than centovacast stating mysql server has gone away.
Back to top
View user's profile Send private message Send e-mail
Trex2303



Joined: 08 Dec 2012
Posts: 13

PostPosted: Sat Dec 15, 2012 1:22 am    Post subject: Reply with quote

Just to add on here...

We just ran the install for Icecast 2.3.3 and changed the directory for icecast to the 2.3.3 directory and all the icecast streams started right up.. we also tried 2.3.3-kh5 , set that directory, and it failed to work.. changed it back to 2.3.3 and streams work...

So there's something with KH that isnt working correctly for some reason, and I have no clue what it is or why..
Back to top
View user's profile Send private message Send e-mail
Murrawhip



Joined: 21 Dec 2010
Posts: 58

PostPosted: Sat Dec 15, 2012 8:55 am    Post subject: Reply with quote

Are you using centovacast?
Back to top
View user's profile Send private message Visit poster's website
Trex2303



Joined: 08 Dec 2012
Posts: 13

PostPosted: Sat Dec 15, 2012 10:18 am    Post subject: Reply with quote

Murrawhip wrote:
Are you using centovacast?


Yes, we are using CentovaCast... But as I stated, it was working fine before we did the reboot, (which I found out, the server company had to do a cold boot)... And that is when IceCast-KH stopped working.
Back to top
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Dec 15, 2012 11:01 am    Post subject: Reply with quote

Nothing you have said yet indicates that icecast-kh has stopped working, what messages do you get if you run icecast-kh manually for example, is there a shared lib issue?.

Problem reports such as "stopped working" are next to useless for anyone. Try running 2.3.2 with your xml and then try the kh build, maybe the warning messages are confusing centovacast ?

Note the difference, I wrote the kh code and rewrote large chunks of 2.3.x yet the centovacast people have refused to help in the diagnosis.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Trex2303



Joined: 08 Dec 2012
Posts: 13

PostPosted: Sat Dec 15, 2012 4:53 pm    Post subject: Reply with quote

"Stopped working" Meaning Centovacast is giving errors, when trying to use ICKH. If using normal IC there are no errors and everything works fine.

Switching back to ICKH, then CC gives the errors (MySQL has gone away).

In trying to start up ICKH manually, it just gives the following:

# icecast -b -c /usr/local/etc/icecast.xml
Starting icecast2
Detaching from the console
# Server startup failed. Exiting

But there's no error log or messge stating why startup failed.
Back to top
View user's profile Send private message Send e-mail
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Dec 15, 2012 10:56 pm    Post subject: Reply with quote

I fully understand what you are doing, I'm trying to get across that saying reports like "stopped working" is of no help.

The -b means to background the task which reduces the initial logging. It's starting to sound like the port being in use

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Dec 17, 2012 8:02 am    Post subject: Reply with quote

One thing that is different is that the KH builds throws out warnings for unrecognised options. This could be confusing centova into thinking it has failed. You could either fix those errors or wrap a script around icecast to redirect the output eg

#!/bin/sh
exec /usr/local/bin/icecast.bin $* 2> /dev/null

where icecast.bin is the renamed icecast binary

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sblinch



Joined: 18 Jan 2013
Posts: 3

PostPosted: Mon Jan 21, 2013 10:52 pm    Post subject: Reply with quote

Hey Karl,

I hadn't realized there was so much discussion regarding Centova Cast here on the forums. I thought I should chime in, particularly in regard to this thread and the FAQ entry here. I'm the owner of Centova Technologies and lead developer for Centova Cast.

First, from the FAQ:

Quote:
While the centovacast people have refused to look into their issue[...]

First off, just to be 100% upfront, we do not, nor have we ever blamed on the -kh branch any problems users encounter while using the -kh branch with Centova Cast. We've made it painfully clear to users that we simply do not track pre-release builds of third-party software as a matter of policy, because they tend to be moving targets.

We've also made it clear that unknown changes in the -kh branch have broken compatibility with our existing IceCast 2.3.x support, but that sometimes things like that have to happen in the name of progress, and that we're very eager to support any such changes when they're marked stable.

My own understanding is that the -kh branch is something of a "personal playground" where you test potential future updates for the stable build, which sounds very much like the "moving target" I mentioned previously. I could be mistaken, and if so, please don't hesitate to correct me on that.


karlH wrote:
Let's be clear. That is not an icecast message, I suspect it's a centovacast message which I am not sure what case causes it.

No, "MySQL server has gone away" is a MySQL error propagated up through PHP and Centova Cast from libmysqlclient, and indicates a MySQL server issue. It has NOTHING to do with IceCast, the -kh build, or even Centova Cast itself.

karlH wrote:
Note the difference, I wrote the kh code and rewrote large chunks of 2.3.x yet the centovacast people have refused to help in the diagnosis.

I do apologize if you took it that way, but that was not my intent. In my eyes, officially supporting a pre-release version of a third-party application is substantially different than working with another developer to diagnose compatibility issues in finalized features in an upcoming release. I've been thrilled to be in touch with daz from Nullsoft, for example, and receiving advance access to upcoming SHOUTcast builds has been extremely useful. Similarly, I do keep an eye on icecast-trunk.

If -kh features are nearing the point of integration with -trunk, or if -kh is becoming something of a stable branch in itself (which almost sounds like the case) then I'd be more than happy to work toward a diagnosis and resolution on our end.

karlH wrote:
One thing that is different is that the KH builds throws out warnings for unrecognised options. This could be confusing centova into thinking it has failed.

That shouldn't make any difference to Centova Cast. CCv2 simply uses PHP's POSIX wrappers to fork()/exec() the IceCast binary. CCv3 is written in C and just does a direct fork()/exec() of IceCast.

Both versions redirect stdout/stderr to /dev/null before calling exec(), so neither relies on output from IceCast. If the fork() is successful and exec() doesn't return, Centova Cast confirms a successful startup by trying to connect to the IceCast port a few times with a short timeout until either the connection is accepted (after which the status XSL page is requested to confirm that all is well) or a certain number of connection failures occur.

Given that Trex2303 mentioned above that IceCast still exits with "Server startup failed. Exiting" when invoking IceCast from the commandline, I doubt it has anything to do with Centova Cast's invocation of IceCast, but rather the way it's writing out the configuration file... perhaps something has changed in the file format since 2.3.x?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Jan 22, 2013 2:07 pm    Post subject: Reply with quote

The "Server startup failed" is basically a port in use type of issue, always has been. The -b causes those standard FDs to close but are only closed after the initial things are done, so in this case the issue will be that something already has the port open, may be the previous build was not shut down.

When I've seen installations, the status.xsl is not requested, only the centovacast.xsl is, I've no idea if there is some aspect of that to be concerned with. I'm not getting as many reports on the failing to start issue, there was a period where the KH did not terminate if no ports were open (down to the fact that ports can be re-opened over a reload HUP), which meant it wasn't quite the same at startup but that is now made the same.

The mysql server has gone away case was not that common, in many cases it was the bizarre unlink of the pid file failed on line 0 message.

Most people using the KH build on centovacast will be using it for the FLV handling but that is unlikely to go into the release build as FLV uses the mp3/aac framing and those codecs have license problems with a Xiph project such as the official icecast.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dards



Joined: 01 Mar 2011
Posts: 23
Location: Dubai

PostPosted: Sun Jan 26, 2014 9:15 pm    Post subject: [SOLVED] Mysql server has gone Away Reply with quote

Hi guys,

Nice to see here the two genius author of centovacast(steve blinch) and Icecast Kh(KarlH).


The error "Mysql server has gone away" also happened to me and I lost many clients because of these issue, I searched any solution from internet forums but I did not find any and besides the error is also confusing as many suggested that its the mysql problem, so I tried to experiment, analyse and fortunately found the solution.

CAUSE OF ERROR:
The centovacast daemon is unable to connect to mysql database, for some reason this happen when you restarted your server, this is rare cases of centovacast daemon and happen in random. normally centovacast connect to mysql database for normal query like listing of accounts thats why it does not have any "mysql gone away" error, but when it came to updating its data the one who do the query is the daemon, centovacast script is just connecting to its daemon through port 2199 and sending a command to daemon to do the query.

TO SOLVE:

1. Check if centovacast daemon is running by using this command
> lsof -i:2199
2. make sure the centovacast daemon is executable using this command
> chmod 0755 /home/centovacast/scripts/castdctl.sh
3. If the centovacast daemon is running restart it
> /home/centovacast/scripts/castdctl.sh stop
> /home/centovacast/scripts/castdctl.sh start


Now check your centovacast control panel and the "Mysql server has gone Away" error is now gone.

note: this fix is only for centovacast version 2.X.X


Hope this solution help you guys.

dards
Whooshstream
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Jan 28, 2014 3:22 pm    Post subject: Reply with quote

thanks for posting a reply for people to refer to if such a case occurs.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber