-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add the ability to define the tunnel URL for Edge Agent deployments #6251
Comments
TBH, I'd like to separate the URL out from the connection key - because it can change - the original join token (containing the URL) should (imo) be ephemeral, and only relevant to bootstrapping the initial connection. but you're right, we should managed to default that value all the time - but if there's a proxy setup, that default needs to be an editable setting. (I want to see it in the eng cfg screen for debug reasons, and to be able to edit it for IP change reasons) |
Also note the duplicate: #4683 |
Identical issue and also would like to see this implemented... |
Nevermind. I forgot to allow the request past Authelia :) Working now! |
I too would like to see the explicit naming of the edge tunnel URL to be made possible; as I have also never got the edge agent to work using the method of base64 Decode/Encode when attempting to communicate with my I've tried installing the edge agent on amd64, arm64, and arm32 architectures. with url-safe encoding without url-safe encoding |
The edge key contains the following info encoded as base64: |
I thought so too. However, swapping I always get the behaviour that I explaned above. Could it be because I use a cloudflared tunnel (aka argo tunnel) with this domain? I wouldn't expect this to be the cause of the issue. But maybe a factor? |
I have the exact same issue as you described, with the same setup ( portainer.example.com and edge.example.com) only difference is mine is behind a Traefik proxy (which makes zero difference to the other apps/services behind it). Same error message as well “short poll”. I spent countless hours troubleshooting but could never get it working, same as you. |
Hi @dafinga, I am using a Traefik proxy too. |
Cool, @simonlock - well maybe that has something to do with it. Troubleshooting this further is above my pay grade. I have since torn down the entire setup regardless (although I would love a solution to this issue to surface as it would be the way I want to utilise the edge agent). Will continue to monitor this thread, and live in hope! |
Hope to see this addressed. Having to manually decode, edit and encode edge agent ID's for every new edge environment is incredibly inconvenient for an application that otherwise makes everything incredibly convenient. This is also not documented very well and took me days of searching through threads and troubleshooting to figure out how to get edge agents behind a proxy to work. |
Why not just fix this for god's sake? Zero mention in the docs about having two different addresses in the key, no field to set edge address. If not for the solution suggested here on the issue post about decoding, correcting encoding, I wouldn't have found a solution. I've literally been looking for it for 2 and a half hours straight. |
I feel you on this one. Took me and a colleague hours to figure out how to fix this. |
You can give it a try by using the image |
@huib-portainer Attempted to setup a new edge agent on a new ec2 instance, setting the new "Portainer tunnel server address" to https://edge-portainer.redacted.com Used the new EDGE_ID, EDGE_KEY to configure the new edge agent. it seems to try to connect over tcp, even if you specify a https address |
The edge connection will use TCP yes (by using the Chisel library). |
I don't have a test environment so I don't see myself trying the pr, but
decoding the key with a base64 decoder, setting the second address to the
https edge endpoint and encoding again in base64 solves the problem and It
works flawlessly. This means to me, that it does work over https, if you
specify.
*Regards / Üdvözlettel:*
*Vámosi Flórián Balázs*
ügyvezető
tel: +36703680088
*Ultimate Waterprobe Solutions KFT*
*7432 Hetes, Pete Lajos köz 4/4.*
Ez az üzenet és annak bármely csatolt anyaga üzleti titkot, illetve
személyes adatokat tartalmazhat, erre tekintettel bizalmas és jogi védelem
alatt áll. Ha nem Ön az üzenet címzettje, kérjük haladéktalanul értesítse
erről a feladót és törölje az üzenetet, valamint annak összes csatolt
mellékletét a rendszeréből. Tájékoztatjuk, hogy az üzenetnek és az üzenet
bármely csatolt anyagának a jogosulatlan megszerzése, harmadik személlyel
történő közlése, felhasználása, nyilvánosságra hozatala üzleti titok-,
illetve a személyes adat sérelmével járhat.
This message and any attachment may include business secret or personal
information, for this purpose is confidential and legally privileged. If
you are not the intended recipient, please inform the sender by reply
transmission and delete this message and any attachment from your system.
Please note that unauthorized obtaining the message and any attachment,
forwarding to unauthorized third party, usage and disclosure may harm the
business secret or personal information.
Please consider the environment before printing this letter.
…On Sun, Oct 9, 2022 at 7:34 AM huib-portainer ***@***.***> wrote:
The edge connection will use TCP yes (by using the Chisel library).
—
Reply to this email directly, view it on GitHub
<#6251 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAVV5YWW6X342FW2Z2YTULWCJKNTANCNFSM5JYFTJLA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm kind of confused, I'd be happy if someone could help me out :) The Issue is still open, but the Documentation found at https://docs.portainer.io/admin/settings/edge already shows and mentions "Portainer tunnel server address". Is this feature available already? If it's a EE feature, having the documentation mention that would be really nice. The documentation for compose already has an issue using such a configuration. |
@acul009 Good catch, this is indeed a BE-only feature. I've updated the documentation to make this clearer. In some cases we don't have automation attached to the closing of issues, and because we're human sometimes we miss closing them once a release goes out. In any case, I'll close this one now too. |
Is your feature request related to a problem? Please describe.
When deploying an Edge Agent that is to communicate with a Portainer Server instance behind a reverse proxy (such as Traefik), the tunnel URL may need to be customized in order for the agent to correctly communicate with the server.
Consider the scenario where Portainer Server is running behind Traefik, with the following configuration (taken from our documentation):
In this instance, the Portainer Server is available at
https://portainer.yourdomain.com
whereas the Edge tunnel interface is athttps://edge.yourdomain.com
. At present, the tunnel URL is generated from the provided Portainer server URL, but without the protocol and with:8000
added to the end. This is provided to the Edge Agent via the base64 encoded join token. This with the above configuration fails to work, as port8000
is not available via Traefik.Currently, to make this work, a user would need to:
https://portainer.yourdomain.com|portainer.yourdomain.com:8000|aa:bb:cc:dd:ee:ff:00:00:00:01:00:00:00:00:00:00|3
https://portainer.yourdomain.com|https://edge.yourdomain.com|aa:bb:cc:dd:ee:ff:00:00:00:01:00:00:00:00:00:00|3
Describe the solution you'd like
An additional (optional) field in the Edge Agent creation screen to provide an alternative tunnel URL for those that are required to do so with their configuration. When defined, this overrides the generated tunnel URL with the one provided.
Additional information
Thanks to portainer/portainer-compose#24 (comment) for helping to point me in the right direction for discovering this workaround.
The text was updated successfully, but these errors were encountered: