clemensm

clemensm

Unable to serve static files using podman with Parallels as backend from shared folder

Hi everyone

I’ve got a somewhat unique question on how to continue debugging, this is probably mainly interesting for the people who know the in- and outs of the bandit http server.

So the situation is as following: I’m using a Mac with the new ARM chips for development. Recently I wanted to have a closer look at containers using podman and check out if I can use them for local development as well. The idea here was to mount my local elixir project folder into the container, so that I could run my editor etc from my native machine and would only use the container for compiling and controlling the elixir version.

However given that using the native option of podman that runs a Fedora Linux using QEMU is just as slow as using docker with the same setup, I decided to try to use the podman remote feature, where you can basically use any Linux machine that you can access using ssh as your “local” podman backend. And in this case I wanted to use a Fedora server hosted in Paralles, given how fast access to the hosts file system is in Parallels.

Now basically this all works as expected (some more setup is required, but that is not really relevant here), with the notable exception that I cannot serve static files like app.js at all. If I try to e.g. fetch the file using curl, even from inside the container, the download never starts and curl gives me an error like this:

curl: (18) transfer closed with 783282 bytes remaining to read

So after some more testing I’ve found out that this only happens on shared folders from my Mac host, but not if I create a new project inside the container itself. In the latter case this works fine.

I’ve now tried to debug this, however I can’t seem to find what kind of debugging I can activate that will help me futher. I’ve tried using the Bandit.Logger.attach_logger() functions, but those do not give any helpfull output. I’ve also tried to add dbg statements in various parts of the Bandit and ThousandIlands packages, however the last place I could trace was the ThousandIsland.Handler.handle_continuation function, which seems to return normally. So what ever happens must be happening later.

Can anyone give me a pointer if I can somehow check if mabye Erlang is unable to write the file to the socket, or something like that?

Thanks already for any help, it would be really nice if I could get this to work :slight_smile:

First Post!

clemensm

clemensm

Some more info from my side, I’ve setup a simple nginx server on the parallels VM and tried to serve the files on the shared folder using that, and I get the same error/problem. So it seems that this is not related to elixir or Erlang in any way, but is a problem with how the shared folders are handled by Parallels.

Thanks anyway!

Where Next?

Popular in Questions Top

albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement