Message: Couldn't communicate with the H5P Hub.

SusanMcKenna's picture

 

Hello again,

Hope this message finds you well, and thank you for your continued support, and expertize.

Today I’m requesting your help with getting H5P content types running on my PRODUCTION server.  I’ve been evaluating H5P on my DEVELOPMENT server.  I had a little difficulty installing the content types on the DEVELOPMENT server, during the process I would receive errors, but after waiting 30 minutes or so the content types would show up under the H5P hub list, and function without error.  Kind of strange.

So, now I have the H5P module installed on my PRODUCTION server, but I’m unable to get to any content types to come up - either through the H5P hub list or by uploading a local copy via the upload radio button option.

Attached please find my error messages and error logs.

  1. File h5p_error1.png:       Message I receive trying to Create Content from the H5P hub.

  2. File h5p_error2.png:       Message when I try to upload the .h5p file from my local drive

  3. File h5p_error3.txt:         Message when I return to home page

  4. File h5p_error4.png:       Drupal Report Error Message

Any idea what’s going on?  Thank you for your help.

Susan

 

thomasmars's picture

Hi,
I can't seem to find your attachments, could you attach them in a comment ?

thomasmars's picture

Found the files.
One of your problems seems to be that your web server is not able to copy files.
Make sure that the web server has read/write permissions for your Drupal /sites/default/files/h5p folder and subfolders.
It would also be more enlightening if you could include the stack trace for the PHP errors from your PHP error log.

You can also go to the "H5P Settings" page, uncheck the "Use H5P Hub", then re-check it to see any messages for requirements that you have not fulfilled to allow H5P to work properly on your server.

Good luck,
Thomas

SusanMcKenna's picture

Once again, Thank you Thomas. 

I wanted to start from a clean slate so decided to uninstall the M5P completely:

1. I disabled H5P, and H5P Editor
2. Uninstalled both modules.
3. Deleted H5P module from the module directory.
4. Deleted the /sites/default/files/h5g directory.
5. Cleared all caches
6. Ran Cron

I then clicked Modules >> Install New Module, but recieved the following error message:

"The requested page "/authorize.php?batch=1&op=start&id=10312" could not be found."

Becasue I usually manually copy other modules directly to the module directory, and then enable them under the Module List, I gave that a shot. It worked, but please see attached file h5p_error6.png.

Tried to add an Interactive H5P content type via the Hub, please see attachment h5p_error7.png

Tried to upload a h5p file and recieved the error message in attached file h5p_error9.png

I'm able to upload files from Drupal via Drupals upload to "sites/default/files/" without any trouble. 

This is on an IIS weberver, I checked the web.conf files on both my development server and productions server, and they are pretty much the same. 

I requested a copy of the Inetpub\logs\PHP\php_errors.log file.  Attached (I deleted the history and left only the last few days).

I tried unchecking the "Use H5P Hub", then re-check it, and received the "The configuration options have been saved." message up on top.

Attached:
h5p_error6.png
h5p_error7.png
h5p_error8_log.txt
h5p_error9.png

Susan

SusanMcKenna's picture

Is there a manual way to  install the content types?  Maybe there is a port blocked or something.

SusanMcKenna's picture

What's crazy is that the H5P Hub works on my internal development server, but not on my production server that sits outside.  Maybe there is a port blocked?

thomasmars's picture

When trying to upload the file can you check your network tab and see the complete response from the server when the request to upload the file fails ? Have you tried to upload other files from the official "Examples & Downloads" ? Does all H5Ps fail to upload ?

Like you have suggested it seems very plausible that the production server has some network constraints which blocks the communication with the H5P.org API. You can try to disable "Use H5P Hub" in the "H5P Settings" and try to use the authoring tool by uploading "Examples & Downloads" content downloaded from H5P.org. If this is possible it should verify that the problem is in the network settings of your production server.