its-jira connection issues..

533 views
Skip to first unread message

Rick Balwani

unread,
Jan 14, 2015, 8:19:31 PM1/14/15
to repo-d...@googlegroups.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hey Everyone - 

I am working on linking my gerrit installation with JIRA. I have added "its-base" and "its-jira" plugins into gerrit and have the following configs:

In gerrit.config:

[its-jira]
        url=https://jira.xxx.com
username=SVCsearchGerrit
commentOnChangeAbandoned = true
  commentOnChangeCreated = true
commentOnChangeMerged = true
commentOnChangeRestored = false
commentOnCommentAdded = true
commentOnFirstLinkedPatchSetCreated = false
commentOnPatchSetCreated = false
commentOnRefUpdatedGitWeb = false

[commentLink "its-jira"]
match = ([A-Z]+-[0-9]+)
html = <a href=\"https://jira.xxx.com/browse/$1\">$1</a>
association = SUGGESTED

In secure.config: 

[its-jira]
  password = **************

In issue-state-transition.config

[action "Start Progress"]
change=created

[action "Start Review"]
change=created

[action "Resolve Issue"]
change=merged

In /its/action.config

[rule "patch-set"]
        event-type = patchset-created
status = !, DRAFT
        action = add-comment A new patchset was added to che Gerrit change
action = log-event
[rule "merged"]
        event-type = change-merged
        action = add-standard-comment
action = log-event
[rule "verified_no"]
        event-type = comment-added
        approval-Verified = -1
        action = add-comment Verification by Jenkins failed
action = log-event
[rule "verified_yes"]
        event-type = comment-added
        approval-Verified = +1
        action = add-comment Verification by Jenkins was successful

I have tried, using the interactive setup and am getting a failure in connection to JIRA. 

This is the error:

Checking Jira connectivity ... *FAILED* (javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target)

Any help would really be appreciated.
Thanks,
Rick

Zaro

unread,
Jan 14, 2015, 11:26:40 PM1/14/15
to Rick Balwani, repo-d...@googlegroups.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
What version of Gerrit are you on?  Which version of the plugin are you using?  Also you should only install its-jira.jar, don't install its-base.jar



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luca Milanesio

unread,
Jan 15, 2015, 2:29:22 AM1/15/15
to Rick Balwani, repo-d...@googlegroups.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
It seems like your Jira SSL certificate is not trusted by the JVM: this is not related to its-Jira plugin but rather on the $JRE_HOME/lib/security/certs not containing any valid root certificate to validate the HTTPS connectivity to your Jira Server.

Luca

Sent from my iPhone
--

Luca Milanesio

unread,
Jan 15, 2015, 3:00:46 AM1/15/15
to Rick Balwani, repo-d...@googlegroups.com
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Please look at [1] for guidance on how to import the SSL certificate into your JRE keystore.

HTH

Luca.

Rick Balwani

unread,
Jan 15, 2015, 10:06:02 PM1/15/15
to repo-d...@googlegroups.com, ri...@balwani.org
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Thanks for the suggestion Luca. I'll give importing JIRA SSL certificates in the the Gerrit JRE keystore a try. I'll post back with results!

Thanks!
Rick

Rick Balwani

unread,
Jan 15, 2015, 10:10:32 PM1/15/15
to repo-d...@googlegroups.com, ri...@balwani.org
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hey Khai, I am using Gerrit 2.9.4 and I'm using version 2.9 of the plugin. So, you're saying I don't need "its-base"?? Could this be the source of my problems?

Thanks!
Rick

Rick Balwani

unread,
Jan 16, 2015, 7:35:56 PM1/16/15
to repo-d...@googlegroups.com, ri...@balwani.org
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hey Luca, 

I was able to export my jira PEM file, and followed the instructions to create a keystore on my gerrit instance, and imported the JIRA pem file. 

I am now able to connect to my JIRA instance :)



Unfortunately, I'm still not getting JIRA updates when verifying, or reviewing changes in Gerrit..

The only output i'm seeing in the log when making a change in gerrit is 


[2015-01-16 16:18:02,081] WARN  com.google.gerrit.httpd.GitWebConfig : No Pattern specified for gitweb.roottree, disabling.

Could this be related?

I was reading that there is a way to see plugin errors by piping them to the gerrit error.log..and I added the following to /its/action.config

[rule "LOG"]
        action = log-event info

..but still not seeing any error output from plugin.


Also copying in startup log for reference:

[2015-01-16 16:17:26,274] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /home/gerrit/review/plugins
[2015-01-16 16:17:26,645] INFO  com.googlesource.gerrit.plugins.hooks.jira.JiraModule : JIRA is configured as ITS
[2015-01-16 16:17:30,135] INFO  com.googlesource.gerrit.plugins.hooks.jira.JiraItsFacade : Connected to https://jira.xxx.com as username=rbalwa1, token=652f9c26157fdac39b91902cf700ab195cb9783f
[2015-01-16 16:17:30,525] INFO  com.googlesource.gerrit.plugins.hooks.jira.JiraItsFacade : Connected to JIRA at https://jira.xxx.com, reported version is 6.1.9
[2015-01-16 16:17:30,834] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin its-jira, version 2.9-SNAPSHOT
[2015-01-16 16:17:30,984] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin deleteproject, version 1.0
[2015-01-16 16:17:31,118] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v2.9.4
[2015-01-16 16:17:31,501] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin javamelody, version v2.9-rc1-739-g0acab4a
[2015-01-16 16:17:31,901] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin reviewnotes, version v2.9.4
[2015-01-16 16:17:32,345] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v2.9.4
[2015-01-16 16:17:32,666] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin reviewers, version 2.8.2
[2015-01-16 16:17:32,862] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin singleusergroup, version v2.9.4
[2015-01-16 16:17:34,728] INFO  com.google.gerrit.sshd.SshDaemon : Started Gerrit SSHD-CORE-0.9.0-4-G5967CFD on *:29418
[2015-01-16 16:17:34,822] INFO  org.eclipse.jetty.server.Server : jetty-9.1.0.v20131115
[2015-01-16 16:17:37,409] INFO  org.eclipse.jetty.server.handler.ContextHandler : Started o.e.j.s.ServletContextHandler@77dc089d{/,file:/data1/home/gerrit/review/tmp/gerrit_647398106013991111_app/gerrit_war/,AVAILABLE}
[2015-01-16 16:17:37,417] INFO  org.eclipse.jetty.server.ServerConnector : Started ServerConnector@83ba9fc{HTTP/1.1}{0.0.0.0:8080}
[2015-01-16 16:17:37,420] INFO  com.google.gerrit.pgm.Daemon : Gerrit Code Review 2.9.4 ready

Thank you again for your help!!! :)

-Rick


On Thursday, January 15, 2015 at 12:00:46 AM UTC-8, lucamilanesio wrote:

lucamilanesio

unread,
Jan 17, 2015, 5:46:48 AM1/17/15
to repo-d...@googlegroups.com, ri...@balwani.org
Why this is marked as abuse? It has been marked as abuse.
Report not abuse


On Saturday, January 17, 2015 at 12:35:56 AM UTC, Rick Balwani wrote:
Hey Luca, 

I was able to export my jira PEM file, and followed the instructions to create a keystore on my gerrit instance, and imported the JIRA pem file. 

I am now able to connect to my JIRA instance :)

Congrats :-)
 



Unfortunately, I'm still not getting JIRA updates when verifying, or reviewing changes in Gerrit..

This seems more related to your its-jira config settings ...
 

The only output i'm seeing in the log when making a change in gerrit is 


[2015-01-16 16:18:02,081] WARN  com.google.gerrit.httpd.GitWebConfig : No Pattern specified for gitweb.roottree, disabling.

This is a warning from GitWeb config, nothing to do with Jira integration.

 

Could this be related?

I was reading that there is a way to see plugin errors by piping them to the gerrit error.log..and I added the following to /its/action.config

[rule "LOG"]
        action = log-event info

..but still not seeing any error output from plugin.


Also copying in startup log for reference:

[2015-01-16 16:17:26,274] INFO  com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /home/gerrit/review/plugins
[2015-01-16 16:17:26,645] INFO  com.googlesource.gerrit.plugins.hooks.jira.JiraModule : JIRA is configured as ITS
[2015-01-16 16:17:30,135] INFO  com.googlesource.gerrit.plugins.hooks.jira.JiraItsFacade : Connected to https://jira.xxx.com as username=rbalwa1, token=652f9c26157fdac39b91902cf700ab195cb9783f
[2015-01-16 16:17:30,525] INFO  com.googlesource.gerrit.plugins.hooks.jira.JiraItsFacade : Connected to JIRA at https://jira.xxx.com, reported version is 6.1.9
[2015-01-16 16:17:30,834] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin its-jira, version 2.9-SNAPSHOT
[2015-01-16 16:17:30,984] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin deleteproject, version 1.0
[2015-01-16 16:17:31,118] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin download-commands, version v2.9.4
[2015-01-16 16:17:31,501] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin javamelody, version v2.9-rc1-739-g0acab4a
[2015-01-16 16:17:31,901] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin reviewnotes, version v2.9.4
[2015-01-16 16:17:32,345] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin commit-message-length-validator, version v2.9.4
[2015-01-16 16:17:32,666] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin reviewers, version 2.8.2
[2015-01-16 16:17:32,862] INFO  com.google.gerrit.server.plugins.PluginLoader : Loaded plugin singleusergroup, version v2.9.4
[2015-01-16 16:17:34,728] INFO  com.google.gerrit.sshd.SshDaemon : Started Gerrit SSHD-CORE-0.9.0-4-G5967CFD on *:29418
[2015-01-16 16:17:34,822] INFO  org.eclipse.jetty.server.Server : jetty-9.1.0.v20131115
[2015-01-16 16:17:37,409] INFO  org.eclipse.jetty.server.handler.ContextHandler : Started o.e.j.s.ServletContextHandler@77dc089d{/,file:/data1/home/gerrit/review/tmp/gerrit_647398106013991111_app/gerrit_war/,AVAILABLE}
[2015-01-16 16:17:37,417] INFO  org.eclipse.jetty.server.ServerConnector : Started ServerConnector@83ba9fc{HTTP/1.1}{0.0.0.0:8080}
[2015-01-16 16:17:37,420] INFO  com.google.gerrit.pgm.Daemon : Gerrit Code Review 2.9.4 ready


From the start-up log, no issues at all.
Can you enable some Log4J logging? (DEBUG for instance)

On Gerrit.config:
[container]
        user = gerrit
        javaHome = /usr/java/jdk1.7.0_51/jre
        javaOptions = -Dlog4j.configuration=file:///path/to//log4j.properties

and for log4j.properties ... there are plenty of examples on the Internet :-)

Luca.

Rick Balwani

unread,
Jan 19, 2015, 6:07:48 PM1/19/15
to repo-d...@googlegroups.com, ri...@balwani.org
Why this is marked as abuse? It has been marked as abuse.
Report not abuse
Hey Luca,

Thanks again for the super helpful advice!!

I enabled DEBUG level log4j for Gerrit, following log4j properties I found on another thread in this forum. 
I got a similar output (See Below) as someone else where you mentioned that it was likely JIRA permissions issue.

__________________________________________________________________________________________________________

returnQName: loginReturn

returnType:  {http://www.w3.org/2001/XMLSchema}string

returnClass: class java.lang.String

elementQName:null

soapAction:  null

style:       rpc

use:         encoded

numInParams: 2

method:null

 ParameterDesc[0]:

  name:       in0

  typeEntry:  null

  mode:       IN

  position:   0

  isReturn:   false

  typeQName:  {http://www.w3.org/2001/XMLSchema}string

  javaType:   class java.lang.String

  inHeader:   false

  outHeader:  false


 ParameterDesc[1]:

  name:       in1

  typeEntry:  null

  mode:       IN

  position:   1

  isReturn:   false

  typeQName:  {http://www.w3.org/2001/XMLSchema}string

  javaType:   class java.lang.String

  inHeader:   false

  outHeader:  false


 FaultDesc[0]:

  name: null

  qname: {http://localhost:8090/jira/rpc/soap/jirasoapservice-v2}fault

  type: {http://exception.rpc.jira.atlassian.com}RemoteAuthenticationException

  Class: com.atlassian.jira.rpc.soap.client.RemoteAuthenticationException


 FaultDesc[1]:

  name: null

  qname: {http://localhost:8090/jira/rpc/soap/jirasoapservice-v2}fault

  type: {http://exception.rpc.jira.atlassian.com}RemoteException

  Class: com.atlassian.jira.rpc.soap.client.RemoteException



2015-01-19 13:51:48 DEBUG Call:2045 - operation.getNumParams()=2

2015-01-19 13:51:48 DEBUG Call:2068 - getParamList number of params: 2

2015-01-19 13:51:48 DEBUG Call:2405 - Enter: Call::invoke(RPCElement)

2015-01-19 13:51:48 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(attachEnabled)

2015-01-19 13:51:48 DEBUG Message:289 - Attachment support is enabled?  true

2015-01-19 13:51:48 DEBUG SOAPPart:182 - Enter: SOAPPart ctor(FORM_SOAPENVELOPE)

2015-01-19 13:51:48 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(setMsgForm)

2015-01-19 13:51:48 DEBUG SOAPPart:374 - Setting current message form to: FORM_SOAPENVELOPE (currentMessage is now org.apache.axis.message.SOAPEnvelope)

2015-01-19 13:51:48 DEBUG SOAPPart:188 - Exit: SOAPPart ctor()

2015-01-19 13:51:48 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(addBody00)

2015-01-19 13:51:48 DEBUG SOAPBody:168 - Adding body element to message...

2015-01-19 13:51:48 DEBUG Call:2638 - Enter: Call::invoke()

2015-01-19 13:51:48 DEBUG MessageContext:748 - MessageContext: setTargetService(jirasoapservice-v2)

2015-01-19 13:51:48 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(noService10)

2015-01-19 13:51:48 DEBUG ConfigurationException:110 - Exception:

org.apache.axis.ConfigurationException: No service named jirasoapservice-v2 is available

org.apache.axis.ConfigurationException: No service named jirasoapservice-v2 is available


___________________________________________________________________________________________________________


Our JIRA happens to be maintained by an external team, so would you suggest that I ask them to install jirasoapservice-v2?


Really appreciate the help Luca!!


Thanks,

Rick

Reply all
Reply to author
Forward
0 new messages