Closed chen01 closed 8 years ago
Hmm. I hit that "port is hardcoded" issue last night when I was trying to flesh out some tests. Sorry to see you're hitting so many issues!
Can you start a PR with your changes and I can take a look?
Here it is! https://github.com/matt-richardson/gocd-websocket-notifier/pull/10/
Thanks for taking a look
What version of java are you running? (I'm clutching at straws here). It appears to build and run successfully (mostly) on travis so it looks like its happy under jdk 1.7?
(I really don't know that much java to be honest - I'm still learning...)
What version of GoCD?
I'm running Go version 16.5. I've actually changed everything over to just use the HTTP port, I still needed to add basic authentication
I am not seeing errors anymore in logs... but I'm still not seeing notifications through the websocket. I'm not very versed in websocketry, but I should be able to see messages come through if I connect to it using socat - TCP4-CONNECT:<host>:<port>
right?
When I get the chance I'll see if I can modify it to take custom ports for Go server and maybe authentication as well
I wonder how much of this information is available via the GoApplicationAccessor
...? When I wrote the plugin originally, the plugin model was still in flux, so it may have improved.
Hmm... I just had a look, and it doesn't appear to be able to give the information we need. I might be wrong though.
As for testing whether it works, I use http://www.websocket.org/echo.html. I've never come across socat
before.
You might want to check out the integration tests - they should run on any *nix system that has the docker daemon available.
hmm the sole issue I'm having right now I think is just not being able to connect to the websocket. Whenever I try to connect to the ws uri wss://<host>:<port>
it just closes with code 1006... which give me no information on what is going wrong.
should it be ws or wss?
I'll take a look at the integration tests and see
It will be ws:// as it's a non secure web socket.
Did you have any luck resolving this, @chen01?
@matt-richardson yes! thanks for your help, it turns out it was a problem with my client, but the error code wasn't all that helpful so it took a while to figure out. I'm working on a few changes to have custom go server ports and basic authentication for getting pipeline history. Just testing the changes now and will make PR when finished!
So I've taken the latest build and just made a few changes in the PipelineDetailesPopulator to accommodate HTTPS and changed the port. I hit this exception in the go server logs, wondering if you have seen this before? Really appreciate your help!
@matt-richardson