openmeetings / openmeetings-moodle-plugin

GNU General Public License v3.0
16 stars 8 forks source link

Moodle 3.5+ git and 3.0.0.4 #29

Closed knedlyk closed 6 years ago

knedlyk commented 6 years ago

No luck with the latest Moodle git version (3.5) and Openmeetings 3.0.0.4 version. It shows only blank white page in moodle, no errors in debug, except warning in apache server's log:

Potential coding error: Unexpected output whilst processing AJAX requ
est. This could be caused by trailing whitespace. Output received: '\r\n', referer: `https://*.*.*.*/moodle/course/view.php?id=25.

It is not an authentication problem, checked. Openmeeting web site works ok.

solomax commented 6 years ago

Moodle 3.4 seems to work Will try to set up 3.5 and double-check, thanks for the report

solomax commented 6 years ago

Just have checked: everything seems to work as expected @knedlyk let's try to debug :)

  1. Do you have any errors in Browser dev console?
  2. Do you have any errors in logs of OpenMeetings?
  3. What OM version are you using?
knedlyk commented 6 years ago
  1. Yes, I have an error in Firefox debug console: Blocked loading mixed active content “http://localhost:5080/openmeetings/hash?&secure=6693aee1-4abe-4fd9-8867-d284439d6906&language=1” Moodle server is secured and running thru https, all ports except 443 are blocked. Openmeeting server does not, that is why insecure content is not showed. Probably that is the problem.
  2. No, connection is established properly.
  3. OM 4.0.4 What steps should I do to properly locate the issue and solve it?
solomax commented 6 years ago

The only possible solution is to set up OM to use https: http://openmeetings.apache.org/RTMPSAndHTTPS.html

knedlyk commented 6 years ago

@solomax I did it, but the new problem appeared. Now I have problem with log in to openmeetings server from moodle. When I opened new class from moodle https://192.168.1.6/moodle/mod/openmeetings/view.php?id=502 I got these debugging messages (moodle debug is enabled):

 Fault (Service error)

Request OpenMeetings! OpenMeetings Service failed and no response was returned. Additioanl info: Array
(
    [url] => https://192.168.1.6:5443/openmeetings/services/user/login?&user=admin&pass=Admin_test_passwd1%21
    [content_type] => 
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 18
    [redirect_count] => 0
    [total_time] => 0.181075
    [namelookup_time] => 3.5E-5
    [connect_time] => 0.000165
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => -1
    [starttransfer_time] => 0
    [redirect_time] => 0
    [redirect_url] => 
    [primary_ip] => 192.168.1.6
    [certinfo] => Array
        (
        )

    [primary_port] => 5443
    [local_ip] => 192.168.1.6
    [local_port] => 43660
)

Could not login User to OpenMeetings, check your OpenMeetings Module Configuration

But url in browser https://192.168.1.6:5443/openmeetings/services/user/login?&user=admin&pass=Admin_test_passwd1%21 gives me {"serviceResult":{"message":"09052778-8bdc-475a-a04f-3b351c5c82e6","type":"SUCCESS"}} What's going on? Did you check how the plugin works with ssl?

solomax commented 6 years ago

Hello @knedlyk, I check the plugin against demo server :)

It works Maybe you are using self-signed certificate? In this case you might need to turn off SSL verification: https://github.com/openmeetings/openmeetings-moodle-plugin/blob/master/api/OmRestService.php#L64

knedlyk commented 6 years ago

You are right, I'm using self-signed certificate :) I gonna try it later and let you know the result.

knedlyk commented 6 years ago

Thanks! It works now. I uncommented these two strings and everything started working. Solved.

solomax commented 6 years ago

@knedlyk WDYT would it be useful to add plugin setting for this?

knedlyk commented 6 years ago

Sure, why not? Self-signed certificates are frequently used.