It's all about the answers!

Ask a question

Hosting RM Extensions - OpenSocial gadget was not loaded


Sam Briggs (3769) | asked Jan 29 '15, 6:58 a.m.
Good morning.

I have been successfully using a simple setup for experimentation of requiements management (RM) extensions. The extensions I am using are the example ones offered on this Jazz wiki article. The setup I was using was the express install of Jazz Team server (Apache tomcat) with the 'extensions' folder sitting in the 'tomcat/webapps' directory.

I have now decided to try to deploy these same extensions to a production server, by hosting the static extensions files on a separate, simple webserver. Based on the guidance offered on this Jazz wiki article, I have set up an https protocol server with a valid certificate that I can navigate to in my web browser. This was accomplished using IIS 7.5.

My problem is that despite this content being available through my web browser, I cannot add an extension from this server to Jazz. when I choose to 'Add OpenSocial gadget', a space on the dashboard appears with a warning inside stating:
The OpenSocial gadget was not loaded.
ID CRJAZ5037E
The gadget might have been removed from the host server. To fix this issue, remove the gadget from your dashboard and add it again, being sure to use the correct address.
I have also hosted this content using http protocol in case it was an issue with my SSL certificate (despite Chrome, IE, Firefox not complaining) and I observe the same thing.

I am at my wits end as to what to do, and really hope someone on this forum might have a suggestion. The extension is identical to one that worked on the simple set up (the module explorer extension from the examples mentioned above).

Best Regards,

Sam

3 answers



permanent link
Steve Wood (1162) | answered Jan 29 '15, 7:53 a.m.
 Hi Sam,

When the gadgets are loaded into the browser they actually come via DNG server first, perhaps this needs to be clearer.  So the requirement is not just that your browser can see the server hosting the extensions, but that your server can see it as well.  

When you type the URL into the dialog in the DNG application, the DNG server then attempts to fetch the extension from the URL provided, it parses the XML and produces the URL that the browser can use to load the HTML content into an IFRAME. 

Assuming that your DNG server can see the server hosting the extensions, I'm less sure what the issue could be.  Can you see e.g. This extension on Bluemix (https://dngextensions.mybluemix.net/selected_attrs/attr-links-ext.xml)

Steve.

Steven Wood
DNG Developer

Comments
Sam Briggs commented Jan 29 '15, 8:18 a.m. | edited Jan 29 '15, 8:18 a.m.

Hi Steve,

Many thanks for your response.

I can confirm that the widget you linked can be loaded into my DNG mini-dashboard without altering any settings.

I understand that the content is retrieved by the DNG server, but I do not know how to check if the DNG server can see the extensions server...I'm assuming it can't - though I don't know why - hence the problem. The reason I point out I can navigate to the extensions server in my browser is purely to demonstrate that I believe the extensions server is set up correctly.

Best,

Sam


permanent link
Dominic Tulley (38114) | answered Jan 29 '15, 8:40 a.m.
Hi Sam,
have you tried some simple connectivity tests from your server machine to the one hosting the extensions?  For instance a ping, or running a browser on the server machine to access the extension xml file?

thanks,

-Dominic

Comments
Sam Briggs commented Jan 29 '15, 8:50 a.m.

Hi Dominic,

The hosting server is on a windows VM. I do not have access to the target DNG server machine. However I have also installed an express installation of JTS + RM on my local machine.

When I attempt to add the OpenSocial gadget to the RM server running from my local machine I observe the same issues as the end-goal, target DNG server machine. So from now I suppose I'll concentrate on adding the gadget to the server on my local machine, hopefully if I can do that, I can do it for the inaccessible server.

From my local machine I am able to view the extensions server contents in all the browsers aforementioned. I have not tried command-line pings etc but given I can see it in my browser I didn't see the need.

Sam


permanent link
Dominic Tulley (38114) | answered Jan 29 '15, 10:02 a.m.
Hi Sam,
I've just tried the following:
Set up IIS on a windows VM and added a simple extension (just contains some static text, no js et c).  The, on a separate machine I ran RDNG in tomcat and added the extension to the dashboard using the http protocol.  It seemed to work fine.
Some things to try/consider:
1 - could you try with the machine's IP address instead of hostname (really shouldn't make a difference)
2 - If you accidentally tried to load the extension when it wasn't available (iis not running for instance) then RDNG caches that "failure to load" for around 10-15 minutes.  It's a long wait before trying again.
3 - I think you've done this but can you double check that it doesn't work using plain http.  For me, I used the url http://10.0.20.144/file.xml and it loaded ok.
4 - can you try an extension with no js/css et c - just some static html (I don't think this is the issue but it's good to rule things out)
5 - Again, just to rule out the obvious - there are not firewalls between you and the IIS machine that your browser is logged in to but which might be preventing the server to server communication?

thanks,

-Dominic

Comments
1
Sam Briggs commented Jan 29 '15, 3:29 p.m. | edited Jan 29 '15, 3:30 p.m.

Hi Dominic,

Thanks very much for you response.

OK your suggestions have helped me a lot (I was not being methodical before!):

HTTP - IP not hostname: xml will load but browser blocks js/css due to mixed content
HTTP - hostname: OpenSocial gadget will not load, showing error described above
HTTPS - IP not hostname (thus certificate is invalid/warning in browser): xml will load with js/css too! GREAT
HTTPS - hostname (thus certificate is valid/no warning in broswer): OpenSocial gadget will not load, showing error described above

interestingly, if I add a HTTP + IP binding to my HTTPS + hostname server and I use the HTTP + ID address to submit the OpenSocial gadget then the widget is accepted AND can load the js/css via the HTTPS + hostname URL. So it demonstrates that the extensions server is operating correctly and CAN be seen by DNG when it wants to, it just can't get past the 'Add OpenSocial gadget' step...
However my browser does give me one warning " Loading mixed (insecure) display content on a secure page "http://<theIP>/extensions/module_explorer/css/ajax-loader.gif" " so it's unclear when it decides to use http or https

So essentially, I can get gadgets installed now and you've solved my problem. The most reliable solution seems to be using HTTPS + IP, which seems inelegant given the SSL certificate is invalid due to the lack of suitable host name. The next best thing is to use HTTP + IP to add, and HTTPS + hostname to provide other content, but this is unsettling because it is unclear to me when DNG decides to fetch content with HTTP and when with HTTPS.

Thank you so much for your help Dominic!

Sam


Dominic Tulley commented Jan 30 '15, 4:06 a.m.

Hi Sam,
glad this helped.
On the mixed content thing - the issue is that the RM web page is loaded with HTTPS and the gadget is loaded with HTTP.  Now, here's the oddity for you - the xml file is loaded by proxying through the RM server (as you know) and so is loaded via HTTPS (as far as the browser is concerned).  But that xml just provides the HTML for the gadget.  If the HTML includes script tags they are loaded directly by the browser - at which point it finds itself using HTTP and thus there are mixed mode warns.
It sounds like there's some sort of name resolution problem causing your remaining difficultly - not sure I can help there.  The server should just be using standard DNS name resolution.
Perhaps you could mark this answer as the accepted answer - it will help other people in the future find it.
thanks
-Dominic


Dominic Tulley commented Jan 30 '15, 4:08 a.m.

Hi Sam,
glad this helped.
On the mixed content thing - the issue is that the RM web page is loaded with HTTPS and the gadget is loaded with HTTP.  Now, here's the oddity for you - the xml file is loaded by proxying through the RM server (as you know) and so is loaded via HTTPS (as far as the browser is concerned).  But that xml just provides the HTML for the gadget.  If the HTML includes script tags they are loaded directly by the browser - at which point it finds itself using HTTP and thus there are mixed mode warns.
It sounds like there's some sort of name resolution problem causing your remaining difficultly - not sure I can help there.  The server should just be using standard DNS name resolution.
Perhaps you could mark this answer as the accepted answer - it will help other people in the future find it.
thanks
-Dominic

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.