gocd-contrib/gocd-build-status-notifier

Could not update build status

Closed this issue · 5 comments

Hi,

I am unable to get verification posted back to Gerrit post build based on the Go stage outcome:

2016-02-29 13:28:32,788 ERROR [75@MessageListener for PluginNotificationListener] BuildStatusNotifierPlugin:77 - Error occurred. Could not update build status - URL: http://< gerritserver >:8080/ Revision: fe4ef57f88f2f4b66203b878c80915e158c7a79a Build: sonar/26/gitbash/1 Result: Failed
java.lang.IllegalArgumentException: Host name may not be null
at org.apache.http.util.Args.containsNoBlanks(Args.java:81)
at org.apache.http.HttpHost.(HttpHost.java:80)
at com.tw.go.plugin.util.HTTPUtils.getHttpHost(HTTPUtils.java:88)
at com.tw.go.plugin.util.HTTPUtils.getRequest(HTTPUtils.java:28)
at com.tw.go.plugin.provider.gerrit.GerritProvider.updateStatus(GerritProvider.java:51)
at com.tw.go.plugin.BuildStatusNotifierPlugin.handleStageNotification(BuildStatusNotifierPlugin.java:178)
at com.tw.go.plugin.BuildStatusNotifierPlugin.handle(BuildStatusNotifierPlugin.java:88)
at com.thoughtworks.go.plugin.infra.DefaultPluginManager$1.execute(DefaultPluginManager.java:172)
at com.thoughtworks.go.plugin.infra.DefaultPluginManager$1.execute(DefaultPluginManager.java:167)
at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:315)
at com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.doOn(FelixGoPluginOSGiFramework.java:245)
at com.thoughtworks.go.plugin.infra.DefaultPluginManager.submitTo(DefaultPluginManager.java:167)
at com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:32)
at com.thoughtworks.go.plugin.access.notification.NotificationExtension.notify(NotificationExtension.java:74)
at com.thoughtworks.go.server.messaging.plugin.PluginNotificationService.notifyPlugin(PluginNotificationService.java:61)
at com.thoughtworks.go.server.messaging.plugin.PluginNotificationService.notifyPlugins(PluginNotificationService.java:53)
at com.thoughtworks.go.server.messaging.plugin.PluginNotificationListener.onMessage(PluginNotificationListener.java:30)
at com.thoughtworks.go.server.messaging.plugin.PluginNotificationListener.onMessage(PluginNotificationListener.java:21)
at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:65)
at com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:50)
at java.lang.Thread.run(Unknown Source)

Within the server.cmd of Go

-Dgo.plugin.build.status.gerrit.endpoint=http://< gerritserver >:8080/ -Dgo.plugin.build.status.gerrit.username=gocd -Dgo.plugin.build.status.gerrit.password= -Dgo.plugin.build.status.go-server=http://localhost:8153"

Material is setup in Go as :
URL: http://< gerritserver >:8080/
username: gocd
password:

Any reason or where this config must be setup?

Looks like it's not picking up -Dgo.plugin.build.status.gerrit.endpoint - Did you restart your server with these changes?

Yes, I've restarted it multiple times over the weeks.
Any idea where else it may be looking for the hostname?

ketan commented

Are you running the server as a windows service?

Hi Ketan, yes that's correct