<?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[Networking between applications?]]></title><description><![CDATA[<p dir="auto">I wrote a small <code>go</code> app to do the following:</p>
<ol>
<li>Subscribe to some MQTT channels.</li>
<li>Post data that it sees to a Directus instance.</li>
</ol>
<p dir="auto">When I run the application from my dev machine, everything is fine.</p>
<p dir="auto">When I containerize the application and run it on Cloudron, I get one <code>dial tcp</code> error, and then on subsequent runs (the container is automatically restarted, it seems) I get</p>
<pre><code>context deadline exceeded (Client.Timeout exceeded while awaiting headers)
</code></pre>
<p dir="auto">on my <code>GET</code> against the Directus server. (I did try and set a 5, 30, and 60s timeout on my calling HTTP context, none of which make a difference.)</p>
<p dir="auto">The containerized <code>go</code> application is being installed to my Cloudron server, and the Directus instance is also running on my Cloudron server.</p>
<p dir="auto">It really is a simple app. I would expect I could containerize and run it on Cloudron, given all it does is 1) listen to one server and 2) read/write to another (via HTTPS GET/POST).</p>
<p dir="auto">Thoughts welcome.</p>
]]></description><link>https://forum.cloudron.io/topic/6793/networking-between-applications</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Nov 2026 11:18:16 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/6793.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Apr 2022 19:36:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Networking between applications? on Wed, 13 Apr 2022 22:20:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jadudm" aria-label="Profile: jadudm">@<bdi>jadudm</bdi></a> said in <a href="/post/45953">Networking between applications?</a>:</p>
<blockquote>
<p dir="auto">A my-home-opnsense-firewall-is-doing-something thing?</p>
</blockquote>
<p dir="auto">The curl is supposed to work from an app shell/terminal. It's not working most likely because your network/router does not support hairpin routing.</p>
<p dir="auto">To debug, I would first SSH into the server and check if <code>curl -vvv -4 https://my.cloudron.example/</code> works i.e forget about docker etc.</p>
]]></description><link>https://forum.cloudron.io/post/46140</link><guid isPermaLink="true">https://forum.cloudron.io/post/46140</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Wed, 13 Apr 2022 22:20:30 GMT</pubDate></item><item><title><![CDATA[Reply to Networking between applications? on Mon, 11 Apr 2022 03:29:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jadudm" aria-label="Profile: jadudm">@<bdi>jadudm</bdi></a> My initial experiment suggests that I cannot use the Golang Docker SDK to do something like:</p>
<pre><code>
	ctx := context.Background()
	cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
	if err != nil {
		panic(err)
	}

	containers, err := cli.ContainerList(ctx, types.ContainerListOptions{})
	if err != nil {
		panic(err)
	}

	for _, container := range containers {
		fmt.Println("CID", container.ID)
	}
</code></pre>
<p dir="auto">The expected error of</p>
<pre><code>Apr 10 23:26:29 panic: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
</code></pre>
<p dir="auto">comes up. This is with the <code>docker</code> addon.</p>
<p dir="auto">It's late; I've done all the investigation I can for a weekend. If there's a solution where I can do this robustly on my Cloudron host, that would be ideal.</p>
]]></description><link>https://forum.cloudron.io/post/45957</link><guid isPermaLink="true">https://forum.cloudron.io/post/45957</guid><dc:creator><![CDATA[jadudm]]></dc:creator><pubDate>Mon, 11 Apr 2022 03:29:49 GMT</pubDate></item><item><title><![CDATA[Reply to Networking between applications? on Mon, 11 Apr 2022 03:15:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robi" aria-label="Profile: robi">@<bdi>robi</bdi></a> Thank you. This makes sense.</p>
<p dir="auto">Unfortunately, it is fragile. I am not guaranteed that my Directus instance will keep the same <code>172.*</code> address. I'm trying to read from my MQTT broker (running on my Cloudron host) and insert data into my Directus server (running on my Cloudron host). Those services have good (subdomain) names in the world, and I don't want to author an application that is fragile based on dynamic, internal Docker network IP addresses in the <code>172</code> range. Is there a better way?</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robi" aria-label="Profile: robi">@<bdi>robi</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> , <a class="plugin-mentions-user plugin-mentions-a" href="/user/nebulon" aria-label="Profile: nebulon">@<bdi>nebulon</bdi></a>, is there a more robust way for me to write an application that will run on my host and talk to another application on the host? For example, can I use the <code>docker</code> addon to list containers on the internal network, and from that, get their IP addresses and exposed ports?</p>
<p dir="auto">I feel like this is information that the Cloudron runtime knows, but I as an application author do not (but might <em>want</em> to know).</p>
<p dir="auto">My alternative... I can just run this on another VM on my Proxmox host. But, then I'm a sysadmin again. I <em>really</em> like the idea of being able to have a container that I can update and, when I do, Cloudron will pull the image and update the running application for me. (And, yes... I could use <code>watchtower</code> on the VM for this...)</p>
]]></description><link>https://forum.cloudron.io/post/45956</link><guid isPermaLink="true">https://forum.cloudron.io/post/45956</guid><dc:creator><![CDATA[jadudm]]></dc:creator><pubDate>Mon, 11 Apr 2022 03:15:39 GMT</pubDate></item><item><title><![CDATA[Reply to Networking between applications? on Mon, 11 Apr 2022 02:51:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jadudm" aria-label="Profile: jadudm">@<bdi>jadudm</bdi></a> You can't treat containerized apps on the same system as an app external to the system. The network flow is different.</p>
<p dir="auto">Cloudron Apps have their own private network, and all requests to them is proxied from outside to the inside.</p>
<p dir="auto">While that works while your custom app is on the outside, that same pattern doesn't work from the inside.</p>
<p dir="auto">Find the internal IP of your Directus app via <code>ifconfig</code> and use that to reach it from another app on the inside network.</p>
<p dir="auto">Also remember that docker maps ports from internal to external, so you'll need to compensate for that too by knowing which ports to use internally, but now you should have enough info to connect.</p>
]]></description><link>https://forum.cloudron.io/post/45954</link><guid isPermaLink="true">https://forum.cloudron.io/post/45954</guid><dc:creator><![CDATA[robi]]></dc:creator><pubDate>Mon, 11 Apr 2022 02:51:02 GMT</pubDate></item><item><title><![CDATA[Reply to Networking between applications? on Mon, 11 Apr 2022 01:59:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jadudm" aria-label="Profile: jadudm">@<bdi>jadudm</bdi></a> So.</p>
<p dir="auto">When I use <code>cloudron/base:3.1.0</code> for my container, I can get a shell (meaning, I can pound the <code>terminal</code> button in Cloudron and get a root prompt in the container). If, from within the container, I <code>curl</code> something like <code>https://www.google.com/</code>, I see a good grab. I can also use <code>openssl</code> to get the cert chain for Google. This tells me it is not a "general" SSL problem from within the container.</p>
<p dir="auto">When I try and hit a domain like <code>my.cloudron.example</code> running on my Cloudron host, both <code>curl</code> and <code>openssl</code> hang.</p>
<p dir="auto">Is this:</p>
<ol>
<li>A Docker networking thing?</li>
<li>A Cloudron-does-things-to-iptables thing?</li>
<li>A my-home-opnsense-firewall-is-doing-something thing?</li>
</ol>
<p dir="auto">This is almost certainly either a 1) Cloudron/Docker network thing, or 2) an interplay with my home network setup. That said, the container is on the host it is trying to reach.</p>
<pre><code>root@5b7bf2bf-f81d-4fdc-8952-13a99497d6ef:/# curl -vvv -4 https://my.cloudron.example/ 
*   Trying CORRECTIP:443...
* TCP_NODELAY set
</code></pre>
<p dir="auto">It is doing what it should from within the container. Something in the surrounding network universe is not?</p>
<p dir="auto">Help or recommendations would be welcome.</p>
]]></description><link>https://forum.cloudron.io/post/45953</link><guid isPermaLink="true">https://forum.cloudron.io/post/45953</guid><dc:creator><![CDATA[jadudm]]></dc:creator><pubDate>Mon, 11 Apr 2022 01:59:12 GMT</pubDate></item><item><title><![CDATA[Reply to Networking between applications? on Sun, 10 Apr 2022 19:39:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jadudm" aria-label="Profile: jadudm">@<bdi>jadudm</bdi></a> Oh... perhaps this is a certs issue...</p>
]]></description><link>https://forum.cloudron.io/post/45944</link><guid isPermaLink="true">https://forum.cloudron.io/post/45944</guid><dc:creator><![CDATA[jadudm]]></dc:creator><pubDate>Sun, 10 Apr 2022 19:39:49 GMT</pubDate></item></channel></rss>