Repository navigation
Description
I've been trying to use fly execute to test out some tasks that I'm working on, connecting to a simple Concourse instance deployed on AWS via BOSH, as it suggests in the docs. However, that functionality seems to be completely broken (And I'm not sure if it's Fly or ATC or BOSH or what have you that's the problem, hence raising this against the Concourse Release).
When attempting to use the following command:
# fly -k -t https://<user>:<pass>@<blah>.elb.amazonaws.com execute -i <input>=`pwd`/ -c ci/deploy-to-aws.yml
I get the following output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:01:01 --:--:-- 02015/06/01 12:35:42 bad response when uploading bits: &{504 GATEWAY_TIMEOUT 504 HTTP/1.1 1 1 map[Content-Length:[0] Connection:[keep-alive]] 0x2087c4040 0 [] false map[] 0x2087a0410 0x20874c580}
HTTP/1.1 504 GATEWAY_TIMEOUT
Content-Length: 0
Connection: keep-alive
Which is not ideal. I've looked at AWS, and I have the Idle Timeout set to 3600 seconds in the Elastic Load Balance configuration, and it still consistently times out after a minute.
If I fiddle with the AWS configuration slightly and talk to ATC directly, I get the following:
# fly -k -t http://<user>:<pass>@<elastic_ip>:8080 execute -i <input>=`pwd`/ -c ci/deploy-to-aws.yml
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:02:06 --:--:-- 0curl: (7) Failed to connect to <eip> port 8080: Connection timed out
gunzip: invalid magic
tar: short read
exit status 1
resource script '/opt/resource/in [/tmp/build/get]' failed: exit status 1
errored
Note how there is no movement in any of the numbers, either, so I'm not even sure if it's uploading.
Having a look with cURL, I get the following:
curl -k -v -X PUT http://<eip>:8080/api/v1/pipes/f2f65bc5-31cf-45a9-6c3b-8eb1fb4baf3f -u <user:pass> --data-binary @tmp.tgz > out
* About to connect() to <eip> port 8080 (#0)
* Trying <eip>...
* Adding handle: conn: 0x7fc81c00aa00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fc81c00aa00) send_pipe: 1, recv_pipe: 0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to <eip> (<eip>) port 8080 (#0)
* Server auth using Basic with user '<user>'
> PUT /api/v1/pipes/f2f65bc5-31cf-45a9-6c3b-8eb1fb4baf3f HTTP/1.1
> Authorization: Basic <auth>
> User-Agent: curl/7.30.0
> Host: <eip>:8080
> Accept: */*
> Content-Length: 56823313
> Content-Type: application/x-www-form-urlencoded
> Expect: 100-continue
>
0 54.1M 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0< HTTP/1.1 100 Continue
} [data not shown]
22 54.1M 0 0 22 11.9M 0 6746 2:20:23 0:30:55 1:49:28 0
This time, we can see that it actually uploaded about 12M, and then stopped. Nothing else happened (running cURL against the ELB rather than the Elastic IP also produced a 504).
A smaller file set (<12MB) uploaded OK with cURL, but not with fly - fly execute still responded with the same gunzip: invalid magic, and did not appear to actually send any data (though tcpdump + WireShark suggests it should have).
Any idea what's going on? Any configuration I'm likely to be missing?
EDIT: This seems to occur when deploying to BOSH Lite as well, using the latest concourse + garden release combination (from https://github.com/concourse/concourse/releases)
Activity
vito commentedon Jun 1, 2015
Shot in the dark, but make sure your elb is set up with TCP or SSL listeners and not http or https. Even if that doesn't fix it you'll want to keep it that way so hijack can work.
ipsi commentedon Jun 1, 2015
Huh - I don't recall seeing that mentioned anywhere. Anyway, I've updated my ELB so it's now using an SSL socket on 443 -> a TCP socket on 8080, which means I now get the following error:
I can still access Concourse either via the web or by using
fly l, however.vito commentedon Jun 1, 2015
Yeah, the docs skimp on that detail, sorry.
Not sure what's going on here. Maybe try with a smaller payload? Switching to SSL shouldn't inherently cause problems but may result in different failures from the same issue.
ipsi commentedon Jun 1, 2015
Even with a (much) smaller payload of about 300KB, still get the same issue.
ipsi commentedon Jun 3, 2015
Issue was ultimately caused by the following:
I had a subnet
private-snand another subnetpublic-sn.My BOSH and Concourse VMs were all in
private-sn, and I had a NAT VM inpublic-sn. When I created the load balancer, I'd specified theAvailability Zonesasprivate-sn. As per this thread, that's a bad idea. The ELB must be placed in the same subnet as the NAT box.Very strange, but not actually a Concourse problem.
bump tail logrus gunk hdrhistogram metrics cli atc blackbox fly proto…
tscolari commentedon Nov 12, 2015
We are having a similar issue when using the cloudformation scripts.
It creates 3 subnets:
It then places the LoadBalancer on the
LoadBalancersubnet.When trying to run
fly executewe get:When we tried to move the ELB to the same subnet of NAT (Bosh) the concourse/Web was out of reach. We added the ELB to both,
BOSHandinternalsubnets, and we could access concourse again through it. But still having issues withfly execute:Note that, in this configuration, the stack error happens most of the time, but some times it fails with the
invalid magicmessage too.tscolari commentedon Nov 25, 2015
We found a solution to our
fly executeproblem:When you login to concourse targeting with httpauth credentials:
It creates a .flyrc with the "https://user:pass@concourse" as the alias:
But then, when you use the same url as target for the execute, it fails.
Probably because it's resolving it as an concourse url instead of looking up
at the .flyrc for the target. Renaming the target name in the .flyrc to
londonand using it as the target of the execute, fixed the issue.
bump atc
bump atc
bramswenson commentedon Mar 10, 2017
I had this issue, it was my firewall blocking ports when accessed from my vpn clients. Not a bug. Using an AWS VPC, with public and private subnets. The docker host concourse is on is in the private subnet. The VPN/gateway servers are in the public subnet. We run software firewalls on all the node (in addition to AWS sec groups). Inside my vpc, public or private subnets everything worked. From vpn clients (different address range) fly failures (timeouts). For me the fix was to open the soft firewall on the ports we are serving concourse ATC/TSA on.
bump etree tsa handlers mux clockwork goxmldsig genproto grpc