Fly does not report *why* a URL was malformed
Closed this issue · 4 comments
Attempting to run the following command:
fly -t aws hijack -j falcon/test
After selecting the build, I get the following error:
error: malformed ws or wss URL
Which is incredibly unhelpful - why is it malformed? What URL was it trying to access? Do I need to open up a port on AWS? If so, which port? Is there a problem with how I've named my team or tasks? It's really hard to figure out what has gone wrong with just this as the message. Ideally, I would like to see the precise URL it's trying to access so I can do something about the "malformed" part of it.
Hi there!
We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.
The current status is as follows:
- #135319783 Fly does not report why a URL was malformed
This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.
I'm also seeing this problem, on the same Concourse installation as @ipsi. I tried a CLI freshly downloaded from the ATC, so it's not a version mismatch.
I was saying back in 2009 that websockets were a bad idea, but nobody listened to me.
Okay, @mohamedBayoumyIsban and i went full Joe Friday on this one, with a little help from @ipsi down in the archives, and we've worked it out. Our .flyrc looked like this:
targets:
aws:
api: http://scott:tiger@concourse-elb-74248332.eu-west-1.elb.amazonaws.com
Note the username and password in the API URL. That's fine for HTTP URLs, but at some point, some part of concourse translated that into a WS URL, and retained the userinfo. WS URLs can't have userinfo, so this is a malformity.
The line which returned the error is hijacker.go:57. Would you accept a PR which decorated the returned error with a fmt.Errorf including the URL which failed?
Overall, though, is this a bug in Concourse, forming an illegal WS URL from a legal HTTP URL? Or pure PEBKAC?
Moved to concourse/concourse#1067