[Gerrit-Trigger Plugin] Unable to connect successfully to our Gerrit server via the REST API

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gerrit-Trigger Plugin] Unable to connect successfully to our Gerrit server via the REST API

Bobby Bruce

Dear all,

We are currently in the process of setting up a Jenkins server to listen and respond to events on our Gerrit code review system. As such, we are using the "Gerrit-Trigger" plugin. A small problem is that those running our Gerrit server will not give us SSH access. We therefore have to rely solely on Gerrit's REST API. We have a HTTP username and password setup which we have verified is correct and has adequate permissions.

When adding the Gerrit server to the Gerrit-Trigger server list we add the frontend URL and, in the advanced section, select "Use REST API"  then enter our Gerrit HTTP Username and Password. Upon clicking "Test REST Connect" we receive the "Success" message. I have confirmed that we receive an error message when entering the wrong username and password, so I assume the Gerrit-Trigger plugin is able to make some kind of connection. When saving and leaving the configuration page we try to start the Gerrit-Trigger server by pressing the red button on the Gerrit-Trigger dashboard. The button blinks for a few seconds then stops. Looking into the Jenkins log, the following is given:

`2020-08-14 04:26:35.693+0000 [id=37] INFO c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to gem5-review, waiting for 64 second(s)`

The only theory we have right now is that perhaps the Gerrit-Trigger plugin requires SSH access as a prerequisite. We can't find this explicitly noted anywhere, and we don't know why this would be the case given the plugin has the access it requires via the REST API. If this is the case, it'd be nice if someone could verify this for us. If not, we would appreciate some help with this issue.

Attached is our gerrit-trigger.xml configuration file (passwords redacted).

Jenkins Version: 2.235.2
Gerrit Trigger Version: 2.30.5
Gerrit Code Review Version: 3.2.3-1238-g443f7314cb

Thank you very much for your time.

Kind regards,
Bobby


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a6094a7f-062a-41b0-9a06-5365990a7293n%40googlegroups.com.

gerrit-trigger.xml (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Gerrit-Trigger Plugin] Unable to connect successfully to our Gerrit server via the REST API

Bobby Bruce
I'm sorry for trying to revive this, but I didn't receive any answers from my initial posting.

I'm still currently blocked on this and some assistance, if possible, would be greatly appreciated.

Kind regards,
Bobby

On Friday, August 14, 2020 at 5:55:56 AM UTC-7 Bobby Bruce wrote:

Dear all,

We are currently in the process of setting up a Jenkins server to listen and respond to events on our Gerrit code review system. As such, we are using the "Gerrit-Trigger" plugin. A small problem is that those running our Gerrit server will not give us SSH access. We therefore have to rely solely on Gerrit's REST API. We have a HTTP username and password setup which we have verified is correct and has adequate permissions.

When adding the Gerrit server to the Gerrit-Trigger server list we add the frontend URL and, in the advanced section, select "Use REST API"  then enter our Gerrit HTTP Username and Password. Upon clicking "Test REST Connect" we receive the "Success" message. I have confirmed that we receive an error message when entering the wrong username and password, so I assume the Gerrit-Trigger plugin is able to make some kind of connection. When saving and leaving the configuration page we try to start the Gerrit-Trigger server by pressing the red button on the Gerrit-Trigger dashboard. The button blinks for a few seconds then stops. Looking into the Jenkins log, the following is given:

`2020-08-14 04:26:35.693+0000 [id=37] INFO c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to gem5-review, waiting for 64 second(s)`

The only theory we have right now is that perhaps the Gerrit-Trigger plugin requires SSH access as a prerequisite. We can't find this explicitly noted anywhere, and we don't know why this would be the case given the plugin has the access it requires via the REST API. If this is the case, it'd be nice if someone could verify this for us. If not, we would appreciate some help with this issue.

Attached is our gerrit-trigger.xml configuration file (passwords redacted).

Jenkins Version: 2.235.2
Gerrit Trigger Version: 2.30.5
Gerrit Code Review Version: 3.2.3-1238-g443f7314cb

Thank you very much for your time.

Kind regards,
Bobby


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7c2dc69e-89b6-40be-884c-2cfea1e0e48fn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: [Gerrit-Trigger Plugin] Unable to connect successfully to our Gerrit server via the REST API

Björn Pedersen
Hi,

the gerrit-trigger-plugin requires ssh access ( stream-events is only available via ssh in a standard setup).  Check the gerrit code review plugin (https://plugins.jenkins.io/gerrit-code-review/) if  
you  don't need stream events triggering.


Björn

[hidden email] schrieb am Sonntag, 23. August 2020 um 06:24:40 UTC+2:
I'm sorry for trying to revive this, but I didn't receive any answers from my initial posting.

I'm still currently blocked on this and some assistance, if possible, would be greatly appreciated.

Kind regards,
Bobby

On Friday, August 14, 2020 at 5:55:56 AM UTC-7 Bobby Bruce wrote:

Dear all,

We are currently in the process of setting up a Jenkins server to listen and respond to events on our Gerrit code review system. As such, we are using the "Gerrit-Trigger" plugin. A small problem is that those running our Gerrit server will not give us SSH access. We therefore have to rely solely on Gerrit's REST API. We have a HTTP username and password setup which we have verified is correct and has adequate permissions.

When adding the Gerrit server to the Gerrit-Trigger server list we add the frontend URL and, in the advanced section, select "Use REST API"  then enter our Gerrit HTTP Username and Password. Upon clicking "Test REST Connect" we receive the "Success" message. I have confirmed that we receive an error message when entering the wrong username and password, so I assume the Gerrit-Trigger plugin is able to make some kind of connection. When saving and leaving the configuration page we try to start the Gerrit-Trigger server by pressing the red button on the Gerrit-Trigger dashboard. The button blinks for a few seconds then stops. Looking into the Jenkins log, the following is given:

`2020-08-14 04:26:35.693+0000 [id=37] INFO c.s.h.p.g.t.GerritProjectListUpdater#tryLoadProjectList: Not connected to gem5-review, waiting for 64 second(s)`

The only theory we have right now is that perhaps the Gerrit-Trigger plugin requires SSH access as a prerequisite. We can't find this explicitly noted anywhere, and we don't know why this would be the case given the plugin has the access it requires via the REST API. If this is the case, it'd be nice if someone could verify this for us. If not, we would appreciate some help with this issue.

Attached is our gerrit-trigger.xml configuration file (passwords redacted).

Jenkins Version: 2.235.2
Gerrit Trigger Version: 2.30.5
Gerrit Code Review Version: 3.2.3-1238-g443f7314cb

Thank you very much for your time.

Kind regards,
Bobby


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/acc0fa90-c587-463b-9de2-cf4f57a8d7f0n%40googlegroups.com.