error installing BigBlueButton - Unable to Connect

Re: error installing BigBlueButton - Unable to Connect

by Mohammad Omar -
Number of replies: 5

Thanks Séverin Terrier smile

In reply to Mohammad Omar

Re: error installing BigBlueButton - Unable to Connect

by Kareem Hamdy -

I'm checking out Moodle on BlueHost.  It's pretty limited in what I can and can't do - especially since I don't have ssh access.

I got the same issue as you with the unable to connect.  Switching to FastCGI helped a bit.  I checked the test URL and consistently got the "Success" message.

What I realized while hacking away at the plugin, it looks like it could be a timing issue.  When the plugin for BigBlueButton would try to connect - I got the unable to connect.  When I added a few print statements - I found that about half the time I was about to get the server version.  Without it, adding a conference room activity fails.

Leading me to make the following change here ("mod/bigbluebuttonbn/mod_form.php"):

        //Validates if the BigBlueButton server is running

        #print $endpoint;

        #print bigbluebuttonbn_getServerVersion($endpoint);

        $serverVersion = bigbluebuttonbn_getServerVersion($endpoint);

        #if ( !isset($serverVersion) ) {

        #    print_error( 'general_error_unable_connect', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn' );

        #}



I even wrote a PHP script that curls the ServiceURL just to verify that there wasn't an issue directly connecting to the service.  It was robust.  The issue seems to be timing out connecting from my host to BigBlueButton - maybe skimpy resources or my basic BlueHost plan - nonetheless, I like to see how far I can stretch out resources.

Since I have faith in BlueHost - and even if I were to host an instance, I'd prolly host it with them - I'm assuming their service url will have 99.999 uptime.


The next issue I found was joining a conference.

When doing it manually - I'd get the same issue.  I'd have to refresh a few times and then it would load.  Again, FastCGI did make things a lil better - but it wasn't reliable enough.

This resulted in the following change I made to the plugin ("lib/setuplib.php"):

function print_error($errorcode, $module = 'error', $link = '', $a = null, $debuginfo = null) {

    #throw new moodle_exception($errorcode, $module, $link, $a, $debuginfo);

    echo "Please wait...";

    header("Refresh:3");

}


It's better than a blank page and having the end user refresh - so I did it for them.  I added a please wait line of text and I'm having PHP refresh every 3 seconds until it is able to connect to the server and join a conference.


It may not be the world's best solution - however if you've been playing with Moodle and BigBlueButton for about 20 hours, and you just wanna play around and get to know the inner workings - it'll do.  If you're in a crunch and you do this - keep in mind it's just a band aid.


Good luck,

Kareem

In reply to Kareem Hamdy

Re: error installing BigBlueButton - Unable to Connect

by Fred Dixon -

Hi Kareem,


Can you share some information about your setup, specifically

 - What version of Moodle are you running?

 - What version of the BigBlueButtonBN plugin are you running?


Regards,... Fred
--

BigBlueButton Developer

In reply to Fred Dixon

Re: error installing BigBlueButton - Unable to Connect

by Kareem Hamdy -
To confirm: I’m using the latest stable Moodle and BBB Plugin.

Here’s some more info on my updated fix:

I haven’t dug too deeply, but I think there’s a caching or some stale connection issues.  It may be from my hosting provider.

Either way - I’ve so far narrowed the issue to a possibly null session.

I added the refresh here in the ‘join’ case of the switch statement right before it passes the error message to the print_error function in the bbb_view.php file.

The specific errors it passes are the following:
view_error_unable_join,

error,

http://www.**********.com/moodle/admin/settings.php?section=modsettingbigbluebuttonbn <http://www.*************.com/moodle/admin/settings.php?section=modsettingbigbluebuttonbn>

null

null


in the setuplib.php file, I modified it at the moment to be the following:

When I have more time I’ll dig into it.  I’m studying for my medical license - priorities and all =)
Feel free to hit me up with questions,

(Edited by Mary Cooch to improve formatting - original submission Tuesday, 18 April 2017, 9:07 PM)
In reply to Kareem Hamdy

Re: error installing BigBlueButton - Unable to Connect

by Stephen Dame -

I have seen trying to preload a non existing document cause something similar.

Not sure if you are using this feature. Make sure the documents  are web accessible.

regards,

Stephen

In reply to Stephen Dame

Re: error installing BigBlueButton - Unable to Connect

by Kareem Hamdy -
Hello:



This is why I added a refresh.  The only think I can think of is a timeout of some sort or caching issue.  When I create code that will check if there’s an error and refresh - it generally goes through.  There are no documents I’m trying to access.  It’s literally the [join] conference button that this issue only occurs.  I can confirm this because I added a PHP mail() emailing me when the errors occur along with the errors it provides and the URL+Query String.