Skip to content

Upload release to BOSH director 261.2.0 fails with error 405 #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alex-slynko opened this issue Mar 20, 2017 · 6 comments
Closed

Upload release to BOSH director 261.2.0 fails with error 405 #180

alex-slynko opened this issue Mar 20, 2017 · 6 comments
Labels

Comments

@alex-slynko
Copy link
Contributor

Output of upload release


....
[httpClient] 2017/03/20 16:23:14 DEBUG - Sending POST request to endpoint 'https://10.0.7.4:25555/releases?'

                                                                           0.00%[httpClient] 2017/03/20 16:23:14 DEBUG - Sending POST request to endpoint 'https://10.0.7.4:8443/oauth/token?grant_type=<redacted>&refresh_token=<redacted>'
[attemptRetryStrategy] 2017/03/20 16:23:14 DEBUG - Making attempt #0 for *http.requestRetryable
[clientRetryable] 2017/03/20 16:23:14 DEBUG - [requestID=36126693-ea0e-4c68-534f-6667b17835aa] Requesting (attempt=1): Request{ Method: 'POST', URL: 'https://10.0.7.4:8443/oauth/token?grant_type=refresh_token&refresh_token=TOKEN-r' }
[attemptRetryStrategy] 2017/03/20 16:23:15 DEBUG - Making attempt #0 for *http.requestRetryable
[clientRetryable] 2017/03/20 16:23:15 DEBUG - [requestID=4f8a42d0-02ef-451f-50c2-7d59a675101d] Requesting (attempt=1): Request{ Method: 'POST', URL: 'https://10.0.7.4:25555/releases?' }
########################################################## 100.00% 42.88 KB/s 0s[httpClient] 2017/03/20 16:23:15 DEBUG - Sending POST request to endpoint 'https://10.0.7.4:8443/oauth/token?grant_type=<redacted>&refresh_token=<redacted>'
[attemptRetryStrategy] 2017/03/20 16:23:15 DEBUG - Making attempt #0 for *http.requestRetryable
[clientRetryable] 2017/03/20 16:23:15 DEBUG - [requestID=0a714191-d68a-4306-5f7d-46a6f0e29f43] Requesting (attempt=1): Request{ Method: 'POST', URL: 'https://10.0.7.4:8443/oauth/token?grant_type=refresh_token&refresh_token=TOKEN-r' }
########################################################## 100.00% 18.79 KB/s 1s
[director.clientRequest] 2017/03/20 16:23:16 DEBUG - Dumping Director client request:
GET /tasks/17 HTTP/0.0
Host: 10.0.7.4:25555
Authorization: [removed]
Content-Type: application/x-compressed

[director.clientRequest] 2017/03/20 16:23:16 DEBUG - Dumping Director client response:
HTTP/1.1 405 Not Allowed
Connection: close
Content-Length: 166
Content-Type: text/html
Date: Mon, 20 Mar 2017 16:23:16 GMT
Server: nginx
'

Exit code 1
bosh-cli -e hello_friend tasks --recent
Using environment '10.0.7.4' as '?'

#   State  Started At                    Last Activity At              User        Deployment  Description      Result

14  done   Mon Mar 20 16:05:55 UTC 2017  Mon Mar 20 16:05:55 UTC 2017  bosh_admin  -           create release   Created release 'release/1+dev.2'

I manually build last bosh-cli on my machine.

@alex-slynko
Copy link
Contributor Author

This issue was introduced somewhere between v2.0.1 and v.2.0.7

@dpb587-pivotal
Copy link
Contributor

I see HTTP/0.0 in that debug... that's not typical. I don't see that when locally running on a recent build, either. Are you sure you have a clean build of the CLI?

@drnic
Copy link
Contributor

drnic commented Apr 2, 2017

I saw this today on a bosh-lite; only error I saw in its logs was a connection error with postgres.

Hmm, I did also upgrade my bosh-lite from 0.0.147 to HEAD.

@tylerschultz
Copy link
Contributor

Go has changed the way headers are treated during a redirect in 1.8. The headers are preserved from the original request onto the redirect request. The original upload/POST request is successful, but the cli is unable make a successful /tasks request because of unexpected errors. I expect you'll see that the release is present in your director.

@dpb587-pivotal
Copy link
Contributor

Some related golang discussion about the change: golang/go#19973

@dpb587-pivotal
Copy link
Contributor

Fixed in v2.0.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants