matt-richardson / gocd-websocket-notifier

GoCD plugin to publish build notifications via websockets to any listener
11 stars 7 forks source link

Connection Refused #8

Closed chen01 closed 8 years ago

chen01 commented 8 years ago

I continue to hit this error java.net.ConnectException: Connection refused with the plugin, and I'm not sure what I'm missing here, would you happen to know what is going on? The log shows that the websocket server has started on the expected port. This is the error in the log when go events occur:

2016-09-14 16:19:26,287 ERROR [68@MessageListener for PluginNotificationListener] GoNotificationPlugin:77 - Failed to download pipeline instance details for requestBody '{"pipeline":{"name":"Notification-Testing","counter":"12","group":"test","build-cause":[{"material":{"git-configuration":{"shallow-clone":false,"branch":"master","url":"<git url>"},"type":"git"},"changed":false,"modifications":[{"revision":"351299d06544a6b67a62451f887b82c2eb7600ef","modified-time":"2016-07-29T23:11:24.000Z","data":{}}]}],"stage":{"name":"defaultStage","counter":"1","approval-type":"success","approved-by":"michelle.chen","state":"Passed","result":"Passed","create-time":"2016-09-14T16:18:58.522Z","last-transition-time":"2016-09-14T16:19:25.981Z","jobs":[{"name":"defaultJob","schedule-time":"2016-09-14T16:18:58.522Z","complete-time":"2016-09-14T16:19:25.981Z","state":"Completed","result":"Passed","agent-uuid":"<uuid>"}]}}}'
java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at java.net.Socket.connect(Socket.java:538)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
    at sun.net.www.http.HttpClient.New(HttpClient.java:308)
    at sun.net.www.http.HttpClient.New(HttpClient.java:326)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)
    at com.matt_richardson.gocd.websocket_notifier.PipelineDetailsPopulator.downloadPipelineInstanceDetails(PipelineDetailsPopulator.java:39)
    at com.matt_richardson.gocd.websocket_notifier.PipelineDetailsPopulator.extendMessageToIncludePipelineDetails(PipelineDetailsPopulator.java:60)
    at com.matt_richardson.gocd.websocket_notifier.WebSocketPipelineListener.notify(WebSocketPipelineListener.java:19)
    at com.matt_richardson.gocd.websocket_notifier.GoNotificationPlugin.handleStageNotification(GoNotificationPlugin.java:95)
    at com.matt_richardson.gocd.websocket_notifier.GoNotificationPlugin.handle(GoNotificationPlugin.java:65)
    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:66)
    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(Thread.java:745)
chen01 commented 8 years ago

Am I interpreting this correctly? when it is trying to download pipeline history, the default port it is using 8153 here?

chen01 commented 8 years ago

changing that port has fixed the connection issue but brought about another problem. I'm going to close this issue for now until I figure out what is going on now.