No issues are created although an email callback is working
janwagners opened this issue · 7 comments
Hi Gerd,
i have a question about your jira plugin for graylog.
I'm not able to get it to work in our environment. I installed the plugin as requested and i can add a callback in the alarm configuration for the streams. After the setup of the callback and when i trigger an alarm to test the callback nothing happens. Under "Triggered alerts" i only see the email callback. In the logfile of the graylog-server is also nothing to find.
Do have any explanation for this behavior? Please let me know if can help you with additional information.
We are using Graylog 2 and JIRA v6.4.3 (really incompatible?).
The graylog server logfile shows the following:
2016-06-28T14:11:49.462+02:00 INFO [CmdLineTool] Loaded plugin: JIRA integration plugin 1.0.6 [com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback]
2016-06-28T14:17:07.450+02:00 WARN [JiraAlarmCallback] Skipped MD5-hash creation, MD5-string is empty. Check your config
2016-06-28T14:34:13.322+02:00 INFO [CmdLineTool] Loaded plugin: JIRA integration plugin 1.0.6 [com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback]
2016-06-28T14:47:11.389+02:00 INFO [CmdLineTool] Loaded plugin: JIRA integration plugin 1.0.6 [com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback]
2016-06-28T14:47:30.280+02:00 WARN [JiraAlarmCallback] Skipped MD5-hash creation, MD5-string is empty. Check your config
2016-06-28T14:50:00.328+02:00 INFO [CmdLineTool] Loaded plugin: JIRA integration plugin 1.0.6 [com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback]
2016-06-28T14:55:51.430+02:00 INFO [CmdLineTool] Loaded plugin: JIRA integration plugin 1.0.7 [com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback]
2016-06-28T15:01:04.513+02:00 INFO [CmdLineTool] Loaded plugin: JIRA integration plugin 1.0.7 [com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback]
At first I used an older version (1.0.6).
Here you can see the callbacl configuration:
Under "Triggered Alerts" one can only see the email callback:
Do you have any ideas why the ticket creation is not working?
Regards,
Jan
I have tested with curl that i can connect to the rest api.
It seems that Graylog v2.0.3 (and possibly v2.0.2) introduced a classloading issue. I am busy looking at it.
Hi there, I have determined that with Graylog v2.0.2 a single-classloader was introduced which then results in the Graylog map-widget (which ships with an outdated httpclient) breaking the Jira plugin.
There are only two options:
- Don't run Graylog 2.0.2 or newer
- Remove the map plugin
I have released an updated Jar which will provide more exception logging to pinpoint if you have a classloader issue or if it is something else - https://github.com/magicdude4eva/graylog-jira-alarmcallback/releases
There is no really good option to fix it, as I would have to hack my plugin and with every update of Graylog or new plugins there is a good chance that it will break again.
I suggest that you also follow Graylog issue Graylog2/graylog2-server#2436 which should eventually provide a fix.
Hi Gerd,
thank you very much for the useful information. I removed the map plugin and now i'm getting the following error:
2016-06-29T16:41:26.701+02:00 ERROR [JiraAlarmCallback] Error searching for JIRA issue=Failed to search issues, Cause=peer not authenticated 2016-06-29T16:41:26.702+02:00 WARN [AlertScannerThread] Alarm callback <Graylog JIRA integration plugin> failed. Skipping. org.graylog2.plugin.alarms.callbacks.AlarmCallbackException: Failed searching for duplicate issue at com.bidorbuy.graylog.alarmcallbacks.jira.JiraIssueClient.isDuplicateJiraIssue(JiraIssueClient.java:115) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraIssueClient.trigger(JiraIssueClient.java:78) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback.call(JiraAlarmCallback.java:153) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback.call(JiraAlarmCallback.java:128) ~[?:?] at org.graylog2.periodical.AlertScannerThread.doRun(AlertScannerThread.java:113) [graylog.jar:?] at org.graylog2.plugin.periodical.Periodical.run(Periodical.java:77) [graylog.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_73] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_73] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_73] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_73] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_73] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_73] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_73] Caused by: net.rcarz.jiraclient.JiraException: Failed to search issues at net.rcarz.jiraclient.Issue.search(Issue.java:895) ~[?:?] at net.rcarz.jiraclient.Issue.search(Issue.java:836) ~[?:?] at net.rcarz.jiraclient.JiraClient.searchIssues(JiraClient.java:227) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraIssueClient.isDuplicateJiraIssue(JiraIssueClient.java:99) ~[?:?] ... 12 more Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431) ~[?:1.8.0_73] at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126) ~[?:?] at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:437) ~[?:?] at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[?:?] at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) ~[?:?] at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643) ~[?:?] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) ~[?:?] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) ~[?:?] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) ~[?:?] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) ~[?:?] at net.rcarz.jiraclient.RestClient.request(RestClient.java:126) ~[?:?] at net.rcarz.jiraclient.RestClient.get(RestClient.java:243) ~[?:?] at net.rcarz.jiraclient.Issue.search(Issue.java:893) ~[?:?] at net.rcarz.jiraclient.Issue.search(Issue.java:836) ~[?:?] at net.rcarz.jiraclient.JiraClient.searchIssues(JiraClient.java:227) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraIssueClient.isDuplicateJiraIssue(JiraIssueClient.java:99) ~[?:?] ... 12 more 2016-06-29T16:43:26.129+02:00 ERROR [JiraAlarmCallback] Error searching for JIRA issue=Failed to search issues, Cause=peer not authenticated 2016-06-29T16:43:26.130+02:00 WARN [AlertScannerThread] Alarm callback <Graylog JIRA integration plugin> failed. Skipping. org.graylog2.plugin.alarms.callbacks.AlarmCallbackException: Failed searching for duplicate issue at com.bidorbuy.graylog.alarmcallbacks.jira.JiraIssueClient.isDuplicateJiraIssue(JiraIssueClient.java:115) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraIssueClient.trigger(JiraIssueClient.java:78) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback.call(JiraAlarmCallback.java:153) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraAlarmCallback.call(JiraAlarmCallback.java:128) ~[?:?] at org.graylog2.periodical.AlertScannerThread.doRun(AlertScannerThread.java:113) [graylog.jar:?] at org.graylog2.plugin.periodical.Periodical.run(Periodical.java:77) [graylog.jar:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_73] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_73] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_73] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_73] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_73] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_73] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_73] Caused by: net.rcarz.jiraclient.JiraException: Failed to search issues at net.rcarz.jiraclient.Issue.search(Issue.java:895) ~[?:?] at net.rcarz.jiraclient.Issue.search(Issue.java:836) ~[?:?] at net.rcarz.jiraclient.JiraClient.searchIssues(JiraClient.java:227) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraIssueClient.isDuplicateJiraIssue(JiraIssueClient.java:99) ~[?:?] ... 12 more Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:431) ~[?:1.8.0_73] at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:126) ~[?:?] at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:437) ~[?:?] at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) ~[?:?] at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) ~[?:?] at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643) ~[?:?] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) ~[?:?] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) ~[?:?] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) ~[?:?] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) ~[?:?] at net.rcarz.jiraclient.RestClient.request(RestClient.java:126) ~[?:?] at net.rcarz.jiraclient.RestClient.get(RestClient.java:243) ~[?:?] at net.rcarz.jiraclient.Issue.search(Issue.java:893) ~[?:?] at net.rcarz.jiraclient.Issue.search(Issue.java:836) ~[?:?] at net.rcarz.jiraclient.JiraClient.searchIssues(JiraClient.java:227) ~[?:?] at com.bidorbuy.graylog.alarmcallbacks.jira.JiraIssueClient.isDuplicateJiraIssue(JiraIssueClient.java:99) ~[?:?] ... 12 more
Does that mean that the login into Jira respectively to the Rest-Api doesn't work?
Hi there,
the error
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
points at a SSL / certificate issue. If your JIRA server is publicly available, I would test the SSL installation - https://www.ssllabs.com/ssltest/analyze.html
It could very well be that a certificate in the chain is missing or it will certainly break if the certificate is self-signed (in which case you would have to import it into the certificate store where Graylog is running).
You could also run the SSL test on the Graylog server:
openssl s_client -showcerts -connect jira.mydomain.com:443
It should report a full cert-chain and no errors.
Hi Gerd,
I imported the certificate into the java keystore and it's working fine now :-). Thank you very much for your professional and quick help.
Regards,
Jan
This is great news - thanks for letting me know.