Bug 555091
Summary: | Microblog Plugin fail to generate alert. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | spandey | ||||||||||
Component: | Plugins | Assignee: | Heiko W. Rupp <hrupp> | ||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||||||||
Severity: | medium | Docs Contact: | |||||||||||
Priority: | low | ||||||||||||
Version: | 1.4.0.B01 | CC: | bkearney, ckannan, kbanerje, sdharane, spandey, whayutin | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | All | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | 2.4 | Doc Type: | Bug Fix | ||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2010-08-12 16:57:14 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 547833, 547864, 565617 | ||||||||||||
Attachments: |
|
Description
spandey
2010-01-13 16:20:08 UTC
Is the alert recorded in the resources summary page? What is shown in the console / rhq-server.log when the alert sender is firing? (In reply to comment #1) > Is the alert recorded in the resources summary page? > What is shown in the console / rhq-server.log when the alert sender is firing? For samba Availability goes down no alert has been recorded in resource summary page. No alert fired has been recorded in rhq-server-log4j.log for samba availability log. 2nd scenario : properly configure microblog alert plugin. configure alert for memory usage value change and select microblog option from "To Alert sender plugin". For this scenario alert has been recorded in resource summary page. But not receiving alert on twitter account . rhq-server-log4j.log displays following error Error: you are requesting an invalid URL. Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124) at twitter4j.http.Response.asDocument(Response.java:165) ... 209 more 2010-01-25 04:06:30,043 INFO [org.rhq.enterprise.server.alert.AlertManagerBean] SenderResult{message='Sending failed :The response body was not well-formed: Error: you are requesting an invalid URL. ', state=FAILURE, emails=[]} Created attachment 386576 [details] rhq-server-log4j.log for bug 555091 Find the attached rhq-server-4j.log Can you please attach the properties from the server plugin configuration page for the microblog sender? I think I may have an idea on what is going on - the base url may just be wrong - did you specify one or remove it? Can you try to explicitly set the base url in the config page to "http://twitter.com/" ? (In reply to comment #5) > I think I may have an idea on what is going on - the base url may just be wrong > - did you specify one or remove it? i did not changed or removed any value . > Can you try to explicitly set the base url in the config page to > "http://twitter.com/" ? Already done , still not received alert on twitter account Created attachment 386608 [details]
attached microblog config
Created attachment 387029 [details]
new rhq-server.log
The new server log shows 2010-01-27 05:09:22,593 INFO [org.rhq.enterprise.server.alert.AlertManagerBean] SenderResult{message='Send notification to http://twitter.com/ as user sachitanandp id: 8273876093', state=SUCCESS, emails=[]} 2010-01-27 05:10:22,798 INFO [org.rhq.enterprise.server.alert.AlertManagerBean] SenderResult{message='Send notification to http://twitter.com/ as user sachitanandp id: 8273876093', state=SUCCESS, emails=[]} Those are 2 tweets one minute apart, that are successfully transferred to twitter and where twitter assigned the same id to both. So it looks like twitter is filtering duplicates http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0update says "Twitter will ignore attempts to perform a duplicate update. With each update attempt, the application compares the update text with the authenticating user's last successful update, and ignores any attempts that would result in duplication. Therefore, a user cannot submit the same status twice in a row. The status element in the response will return the id from the previously successful update if a duplicate has been silently ignored." I will add an alert id to the front of the message, which hopefully changes the tweets enough (82d2bf3) Hi Heiko Again i am able to repro this issue on master build . git sha id : 9a08cb7abd7b555b2846054d31a61e6fa75e9b8c steps to repro : properly configure microblog alert plugin. configure alert for memory usage value change and select microblog option from " Alert sender notification "(Alert Page). For this scenario alert has been recorded in resource summary page. But not receiving alert on twitter account . Log details : 2010-02-09 16:43:41,617 INFO [org.rhq.enterprise.server.alert.AlertManagerBean] SenderResult{message='Sending failed :twitter.com', state=FAILURE, emails=[]} 2010-02-09 16:43:41,626 INFO [org.rhq.enterprise.server.util.concurrent.AlertSerializer] tid= 659: alertDefinitionId=10001: releasing write lock after being locked for millis=30056 2010-02-09 16:44:12,559 INFO [org.rhq.enterprise.server.alert.AlertManagerBean] SenderResult{message='Send notification to user@baseUrl [sachitanandp@http://twitter.com/]:, msg-id: 8272978748', state=SUCCESS, emails=[]} 2010-02-09 16:45:12,923 INFO [org.rhq.enterprise.server.alert.AlertManagerBean] SenderResult{message='Send notification to user@baseUrl [sachitanandp@http://twitter.com/]:, msg-id: 8272978748', state=SUCCESS, emails=[]} 2010-02-09 16:46:41,589 WARN [org.rhq.enterprise.server.plugins.alertMicroblog.MicroblogSender] Notification via Microblog failed for user@baseUrl [sachitanandp@http://twitter.com/]: twitter4j.TwitterException: twitter.com at twitter4j.http.HttpClient.httpRequest(HttpClient.java:484) mass move to rhq_chainsaw tracker bug This bug has now been triaged by Chainsaw on 2/18. The expectation is the bug to be addressed by the end of sprint06 roughly 3/10/10. Created attachment 395089 [details]
Screenshot of debugger variables
Screenshot of debugger variables
Does that mean "works for me"? I am not sure how much more random changes are needed to trick Twitter in accepting the data. As you can see in the screenshot, the message has changed in multiple ways from what twitter has recorded as the previous tweet and still the new tweet is failing with what looks like the duplicate filter has kicked in. The code is e.g. able to send to our internal status.net instance without issues. I was also able to send to twitter for quite a number of times in a row without issues. So it may also have to do with the fact that the used accounts are "fresh" and the alerts all look too similar to each other. I assume that if a company deploys status.net for such alerting, they have a way to switch off the dup-filter. I have added some code in 32b3daf to shorten the message to 140 chars - status.net was complaining and this may have had an influence on the twitter reaction too (looks more stable too). Commit 32b3daf also introduces abbreviations of the message texts in order to conserve space and thus allow to show more content. VERIFIED on 4/9 master branch git pull. moving verified bugs to rhq_sprint06, and removing from rhq_chainsaw Mass-closure of verified bugs against JON. |