<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[HA Proxy Portainer Agent]]></title><description><![CDATA[<p dir="auto">I am trying to reverse proxy the edge agent for the portainer but websocket fails to connect. I can see the status of the agent as online but when I try to manually connect agent gives error.</p>
<p dir="auto">I've tried everything I could think of but I need a little outside help from more experienced people I think.</p>
<p dir="auto">Some background info:<br />
Portainer uses 9443 for HTTPS and 8000 for WS.</p>
<p dir="auto">This test environment is all internal but I will later deploy it as remote.<br />
I have successfully added the portainer to my ACL rules and it can be accessed with no problem.<br />
Agent has been deployed to another local docker host and the connection status shows as up on the main portainer page.</p>
<p dir="auto">When I try to manage the remote machine through my portainer master. I see "Connecting to the Edge environment..." then this error msg <strong>"There was an issue connecting to edge agent via tunnel. Click 'Retry' below to retry now, or wait 10 seconds to automatically retry."</strong></p>
<p dir="auto">On the agent logs on remote machine:<br />
023/07/13 00:12:00 client: Connecting to ws://portainer.mydomain.org:8000<br />
2023/07/13 00:12:10 client: Connection error: dial tcp 10.10.10.10:8000: operation was canceled<br />
2023/07/13 00:12:10 client: Give up</p>
<p dir="auto">So I see that when I try to initiate a connection from the host, the remote machine tries to open a ws connection but fails. 10.10.10.10 is the virtual ip for the pfsense.</p>
<p dir="auto">Upon seeing that I have followed following guides but I saw no improvement<br />
https://www.haproxy.com/blog/websockets-load-balancing-with-haproxy</p>
<pre><code>## routing based on Host header
  acl host_ws hdr_beg(Host) -i ws.portainer
  use_backend bk_ws if host_ws
</code></pre>
<p dir="auto">https://portainer-notes.readthedocs.io/en/latest/faq.html</p>
<pre><code>acl portainer   hdr_end(host)   -i portainer.mydomain.org
use_backend     portainer       if portainer
</code></pre>
<p dir="auto">Any help would be appreciated here. I can provide more information if requested.<br />
Everything works fine if I use local IP instead of reverse proxy.</p>
]]></description><link>https://forum.netgate.com/topic/181480/ha-proxy-portainer-agent</link><generator>RSS for Node</generator><lastBuildDate>Mon, 09 Nov 2026 12:25:44 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/181480.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Jul 2023 00:16:29 GMT</pubDate><ttl>60</ttl></channel></rss>