Description of problem: JPP 6 comes with some samples Gadgets. Some gadgets tries to access the internet which leads to errors when starting JPP. This is known and we have a procedure to solve this (for 5.2) [1], but the goal of this request is to remove/disable these gadgets from future JPP releases, as the workaround is quite cumbersome. One alternative is to make these Gadgets optional, not enabled by default. [1] https://access.redhat.com/knowledge/solutions/62004
Is it only the currency one ?
Yes, it's the currency one. But in addition, there are also attempts to load the following javascript files: http://www.google-analytics.com/urchin.js http://www.google.com/ig/lib/libanalytics.js http://www.google.com/ig/lib/libga.js These are defined in the shindig features, as described here: https://access.redhat.com/knowledge/node/68308
In EPP 6 it is in jboss-jpp-6.0/modules/org/gatein/lib/main/shindig-features-2.0.2.Final-gatein-3-redhat-1.jar but this JAR is signed.
Adam, what makes you think it's signed ? I don't see it signed in my package (and it shouldn't be in 6.0) I think it's quite risky to alter feature jar now (too late for ER5 and next release is a CR). Maybe we can remove the currency gadget now (for CR1) this would have to be properly tested though so we need PM, PMM and QA approval. We can deactivate the JS loading of those files in 6.1 (People can re-enable them if needed) that seems more risky and we need to see if there is a better way but altering Shindig. (Ideally we would just have that feature.xml file within the portal, not in Shindig)
features.txt I meant
Ah, sorry Thomas, you're right, it's not signed. I don't know where I was looking... Martin, what do you think about removing the currency gadget?
+1 for providing features.txt outside of the shindig*.jar Removing the currency gadget is unrelated to the js loading caused by shindig. If it's too late for 6.0, then we should provide an easy way to (optionally) disable both (gadget + shindig features) in 6.1.
What I'm proposing is that we remove currency gadget now (so that we don't remove that "feature" in a minor release) and check the other issue carefully for next release. We have to see the risks of doing so but that seems doable and not too dangerous for CR1. At least that would be less steps for customers...
Pushed to 6.1
Setting for 6.1.0 and assigning to keep track but we need to discuss and decide how and if to do it now.
Matt Wringe <mwringe> made a comment on jira GTNPORTAL-2518 Is there any update on this?
An update on this, the currency gadget is no longer included. The rss reader gadget obviously doesn't work by default since the default rss url is an external one (http://feeds.feedburner.com/gatein). The gadget itself displays an error message about not being able to access this url. There is a warning in the logs about not being able to access this url. There is still some warning messages in the logs about not being able to access some javascript files from google url which is what is mentioned in https://access.redhat.com/site/node/68308. There are no stack traces or errors in the logs about this, only warnings. Are warnings really that bad in this situation? As far as I can tell the missing javascript warnings are due to optional features available in shindig. In order to get rid of the warnings we would need to modify the shindig component. But I don't know if its worth trying to remove the warnings in this situation.
Martin, could you look at this again and comment what would be desired outcome at this point? You can test current status with DR1 build that I shared recently.
I would say that Warning is ok, Martin ?
I raised this initially to give users a chance to easily configure shindig, so that no calls to google urls happen during startup. If I test DR1 after disabling internet connection, I can see that the google lookup fails immediately: 08:58:30,044 INFO [org.apache.shindig.gadgets.http.BasicHttpFetcher] (ServerService Thread Pool -- 52) Timeout for http://www.google-analytics.com/urchin.js Exception: java.net.UnknownHostException - www.google-analytics.com - 55ms 327:08:58:30,224 WARNING [org.apache.shindig.gadgets] (ServerService Thread Pool -- 52) Unable to retrieve remote library from http://www.google-analytics.com/urchin.js This wouldn't be a problem IMO. BUT, a customer reported that in their server environment, the startup of JPP 6.0.0 was delayed by 30 seconds for each failing google lookup: 11:12:58,041 INFO [org.apache.shindig.gadgets.http.BasicHttpFetcher] (MSC service thread 1-2) Got Exception fetching http://www.google-analytics.com/urchin.js - 30095ms: org.apache.http.conn.ConnectTimeoutException: Connect to www.google-analytics.com/173.194.78.102:80 timed out at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:125) ... 11:12:58,042 WARNING [org.apache.shindig.gadgets] (MSC service thread 1-2) Unable to retrieve remote library from http://www.google-analytics.com/urchin.js This long blocking lookup was the reason for opening this bug, and therefore I think we cannot just ignore the warning.
Good point, 30s delay is the issue to solve now that no ERROR are present anymore.
So, how do I check this 30 second delay? It fails quickly on my machine.
I could not reproduce this either, after disabling network access the google lookup failed quickly with an UnknownHostException. The customer was running into a ConnectTimeoutException after 30secs instead.
Trong Tran <trongtt> updated the status of jira GTNPORTAL-2518 to Coding In Progress
Trong Tran <trongtt> made a comment on jira GTNPORTAL-2518 I have sent a PR https://github.com/gatein/gatein-portal/pull/546 to solve the problem with following changes : 1. Support to be able to configure shindig.properties as an external configuration file by setting the location path via {gatein.gadgets.dir} property. Of course, It sill be kept backward compatibility if the property is NOT set. 2. Splitting the default features.txt into two files : default-features.txt and online-features.txt. So customers can ignore online-features.txt if they want to run product in offline mode. Please let me know if I missed something.
Merged. Matt could you look at documenting this and close?
Documentation added at https://docs.jboss.org/author/display/GTNPORTAL36/Shindig+Configuration. It just requires modifying one line of a new shindig configuration file.
H. Trang Vu <trang.vu> made a comment on jira GTNPORTAL-2518 This commit should be included into gatein-3.5.x for eXo Platform 4.0.
Hi, I've tried to start portal without internet connection and I can see 16:52:57,090 INFO [org.apache.shindig.gadgets] (ServerService Thread Pool -- 55) Loading resources from: res:features/features.txt 16:52:57,146 INFO [org.apache.shindig.gadgets.http.BasicHttpFetcher] (ServerService Thread Pool -- 55) Timeout for http://www.google-analytics.com/urchin.js Exception: java.net.UnknownHostException - www.google-analytics.com - 34ms 16:52:57,207 WARNING [org.apache.shindig.gadgets] (ServerService Thread Pool -- 55) Unable to retrieve remote library from http://www.google-analytics.com/urchin.js 16:52:57,208 INFO [org.apache.shindig.gadgets.http.BasicHttpFetcher] (ServerService Thread Pool -- 55) Timeout for http://www.google.com/ig/lib/libanalytics.js Exception: java.net.UnknownHostException - www.google.com - 1ms 16:52:57,208 WARNING [org.apache.shindig.gadgets] (ServerService Thread Pool -- 55) Unable to retrieve remote library from http://www.google.com/ig/lib/libanalytics.js 16:52:57,347 INFO [org.apache.shindig.gadgets.http.BasicHttpFetcher] (ServerService Thread Pool -- 55) Timeout for http://www.google.com/ig/lib/libga.js Exception: java.net.UnknownHostException - www.google.com - 1ms 16:52:57,347 WARNING [org.apache.shindig.gadgets] (ServerService Thread Pool -- 55) Unable to retrieve remote library from http://www.google.com/ig/lib/libga.js so in my environment this is very minor delay at startup. Then I've edited $JBOSS_HOME/standalone/configuration/gatein/gadgets/shindig.properties according to https://docs.jboss.org/author/display/GTNPORTAL36/Shindig+Configuration and have tried to start the portal again. I can still see the WARNINGs in log. I suppose this is expected but can you tell if/how can I verify whether the change in the shindig.properties fix the longer delay? Thanks Vlasta
Hi Vlasta, I don't remember exactly but I found we recommended editing features.txt file directly: https://access.redhat.com/site/solutions/68308 2. jar -xvf shindig-features-VERSION.jar features 3. Open features/features.txt with a text editor 4. Comment / Remove the following two lines: #features/analytics/feature.xml #features/com.google.gadgets.analytics/feature.xml 5. Save file 6. jar -uvf shindig-features-VERSION.jar features Hope this helps. Adam
Thanks Adam, I've followed the steps from https://access.redhat.com/site/solutions/68308 and now I cannot see the WARNINGs in log. I suppose this should be documented. Vlasta
In JPP 6.1.x, this should be fixed by changing the configuration setting in configuration/gatein/gadgets/shindig.properties: # Location of feature manifests (comma separated) # Default settings - require internet access # shindig.features.default=res://features/default-features.txt,res://features/online-features.txt # Features not requiring internet access shindig.features.default=res://features/default-features.txt But it does not appear to work. I will perform further tests, and might open a new BZ.
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.