Skip to content

problem connecting to workspace behind application proxy #324

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
mnebelnlb opened this issue Nov 2, 2023 · 3 comments
Closed

problem connecting to workspace behind application proxy #324

mnebelnlb opened this issue Nov 2, 2023 · 3 comments

Comments

@mnebelnlb
Copy link

mnebelnlb commented Nov 2, 2023

I started the JetBrains Gateway and want to connect to my coder workspace. The workspace is located behind an Azure AppProxy, so the Authorization-Header has to be set. This is accomplished by the use of the header-command.

When I try to connect, a new session token is requested, I authorize against AAD and retrieve the token. Then the Gateway want to retrieve the coder-binary and this fails with an error:

` CLI exited unexpectedly with 2.

org.zeroturnaround.exec.InvalidExitValueException: Unexpected exit value: 2, allowed exit values: [0], executed command [/Users/mnebel/Library/Application Support/coder-gateway/coder...e/coder-darwin-amd64, login, https://coder....de, --token, GwDRJ0azLh-Ctaklf3TdDpZmC7Hwfa5UX, --global-config, /Users/mnebel/Library/Application Support/coder-gateway/coder..../config], output was 583 bytes:
/Users/mnebel/Library/Application Support/coder-gateway/coder..../coder-darwin-amd64: line 1:
: command not found
/Users/mnebel/Library/Application Support/coder-gateway/coder.c.../coder-darwin-amd64: line 2:
: command not found
/Users/mnebel/Library/Application Support/coder-gateway/coder..../coder-darwin-amd64: line 3: syntax error near unexpected token (
/Users/mnebel/Library/Application Support/coder-gateway/coder.c.../coder-darwin-amd64: line 3: < -- Copyright (C) Microsoft Corporation. All rights reserved. -- >
'
at org.zeroturnaround.exec.InvalidExitUtil.checkExit(InvalidExitUtil.java:27)
`

I tried to debug the problem by using the mitmproxy and got the following screenshot:

image

The first two requests have the Authorization-Header set (not shown here) - but the requests to get the coder-binary lacks the header. This seems to be the cause for my problem, but I may be wrong. Has anyone been able to connect to a coder workspace behind an AppProxy?

@bpmct
Copy link
Member

bpmct commented Nov 15, 2023

Thanks for reporting! We plan on taking a look next week :)

@code-asher
Copy link
Member

I think this got fixed in #323, we were missing headers on the binary download.

@mnebelnlb
Copy link
Author

confirmed - updating to 2.9.1 solved the problem!

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

No branches or pull requests

3 participants