Results 1 to 7 of 7

Thread: Clear loadbalancer?serverinfoXML list from ORIGIN

  1. #1

    Default Clear loadbalancer?serverinfoXML list from ORIGIN

    Is there a simple method (such as jconsole) to force the ORIGIN to clear the Server Info XML list (http://123.123.123.123:1935/loadbala...erverInfoXML)? It seems to hold onto a list of every server I've launched that has interacted with it... even if those servers are no longer available

    The only way I can figure to clear the list is to re-boot the server... which I'd rather not do unless I have to.

    Anyone thoughts?

    David L Good

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    I don't think there is a good way to do it. You can use JConsole to unload one application.

    http://www.wowza.com/forums/showthre...ning&p=52138#4

    But that will stop streaming to connected edges, so it is probably not a good idea either.

    Richard

  3. #3

    Default

    Thanks for the link, Richard. Love learning about new things. I do appreciate your time responding to all our questions.


    For my situation, I have a weekly live event that lasts for two hours each Wednesday. For this event, I launch 10-20 EDGE servers... but then shut them all down once the live event is over. So it doesn't matter if the ORIGIN stops streaming to the EDGES, as they'll all be finished and terminated anyway (Amazon EC2).

    After the event (and after I've terminated all the Amazon EDGE servers) I'm still left with 10 "STOPPED" XML listings when checking "serverinfoXML" on the loadbalancer:

    <LoadBalancerServerInfo>
    <LoadBalancerServer>
    <connectCount>0</connectCount>
    <status>STOPPED</status>
    <redirectCount>0</redirectCount>
    <lastMessage>55555 milliseconds</lastMessage>
    <redirect>123.123.123.123</redirect>
    <serverId>607abcd-607abcd-607abcd-607abcd-607abcd-607abcd</serverId>
    </LoadBalancerServer>
    </LoadBalancerServerInfo>


    If I don't restart the server, by the time next Wednesday rolls around I'll have 10-20 new listings along with the 10-20 old listings from the previous week's EDGE server launch -- and you can see how that would get cluttered quickly.

    I'm fine with shutting down an application or AppInstance using jconsole if it will clear the "serverinfoXML" list out. I'd just need to know if it's also push-button simple to fire that application/instance back up again... or does it automatically happen the next time I stream live to that appliction/instance (I'm using a stream class scheduler to stream .mp4 files to a "live" application for the Wednesday event, but the server gets used for VOD throughout the week as well as for other Live streaming on the weekends, by the way).

    If rebooting is the only real solution, then so be it. Not the most horrible news I've ever received in my life. HA!

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Actually, that won't work, the LB Listener is a server extension. There is no application to unload unless you are using a redirect app, but that will not affect the LB Listener or the output of serverInfoXML

    I tried ever Loadbalancer Listener operation in JConsole and serverInfoXML did not clear. I think the only way is to do this in JConsole. Maybe in module.

    I don't see anything different in module with a reference to the LoadBalancerListener.

    Richard

  5. #5
    Join Date
    Aug 2010
    Posts
    2

    Default Use PHP to filter the results

    Use PHP or something similar to filter the results. I've run into this same problem, and this works for me. you could modify the php to recreate an xml file, but that's not necessary for my application. It's not pretty, but it does the job.
    I serve this page on a webserver, not the wowza server.

    <?php

    $xml_data=file_get_contents("http://{wowzaloadbalancer}:1935/loadbalancer?serverInfoXML");

    $doc = new DOMDocument();
    $doc->loadXML($xml_data);

    $wms = $doc->getElementsByTagName('LoadBalancerServer');
    $wmscnt = $wms->length;
    $conntot = 0;

    for ($idx = 0; $idx < $wmscnt; $idx++) {
    if($wms->item($idx)->getElementsByTagName("status")->item(0)->nodeValue == "RUNNING") {
    $loadbalip = $wms->item($idx)->getElementsByTagName("redirect")->item(0)->nodeValue;
    $actstatus = $wms->item($idx)->getElementsByTagName("status")->item(0)->nodeValue;
    $lastmessage = $wms->item($idx)->getElementsByTagName("lastMessage")->item(0)->nodeValue;
    $conncnt = $wms->item($idx)->getElementsByTagName("connectCount")->item(0)->nodeValue;
    $conntot = $conntot + $conncnt;

    echo "Load Bal IP: $loadbalip<br> Status: $actstatus<br> Last Contact: $lastmessage<br> Active Connections: $conncnt<br><hr>";
    }
    }
    echo "<hr>Total Connections: $conntot <br>";
    ?>

  6. #6

    Default

    You could just restart the Wowza service rather than the whole server.

    I agree that it would be nice to have the ability to automatically purge entries from that list after they haven't phoned home within a certain time period. If they do eventually phone home again, just simply add them back.

    -Ian

  7. #7
    Join Date
    Aug 2010
    Posts
    2

    Default

    Quote Originally Posted by ianbeyer View Post
    You could just restart the Wowza service rather than the whole server.

    I agree that it would be nice to have the ability to automatically purge entries from that list after they haven't phoned home within a certain time period. If they do eventually phone home again, just simply add them back.

    -Ian
    Wouldn't that drop all existing connections too?

Similar Threads

  1. Dynamic Load Balancing AddOn: loadbalancer?serverInfoXML empty
    By niemion in forum Server Administration
    Replies: 10
    Last Post: 02-13-2014, 03:35 PM
  2. Replies: 3
    Last Post: 07-30-2013, 11:28 AM
  3. How to disable display :1935/loadbalancer?serverInfoXML
    By roommini in forum General Forum
    Replies: 1
    Last Post: 04-09-2013, 10:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •