SZJX

SZJX

Fly.io: The app is not listening on the expected address and will not be reachable by fly-proxy

I’m trying to deploy an existing Phoenix app to fly.io. After a few tries it seems to work, but now I get the “The app is not listening on the expected address and will not be reachable by fly-proxy.” error.

The log then proceeds to print this:

Found these processes inside the machine with open listening sockets:
  PROCESS

                                                          | ADDRESSES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------*---------------------------------------
  /app/erts-13.1.3/bin/beam.smp -- -root /app -bindir /app/erts-13.1.3/bin -progname erl -- -home /nonexistent -- -proto_dist inet6_tcp -- -noshell -s elixir sta
rt_cli -mode embedded -setcookie PWOVL6U2DQUEE7V7BNYSLJPK2XG7CYEZPH6MS4Y2QJQDIW6R7E4A==== -sname magpie -config /app/releases/2.3.4/sys -boot /app/releases/2.3.4
/start -boot_var RELEASE_LIB /app/lib -- -extra --no-halt | [::]:33127
  /.fly/hallpass

                                                          | [fdaa:2:6f01:a7b:141:65dd:fe42:2]:22
  /app/erts-13.1.3/bin/epmd -daemon

                                                          | 0.0.0.0:4369, [::]:4369

Curiously, the first item in the list seems to be my app? I have no idea why it’s listening on 33127 though.

I tried to run fly deploy again, and now it’s on 40627.

Is this the app process, or is this something irrelevant?

I checked my runtime.exs, prod.exs and config.exs against a vanilla new project, which I was able to deploy successfully, and I seem to find no difference in terms of the port configuration… (I still don’t know where the “8080” is supposed to come from in the first place though.)

Marked As Solved

SZJX

SZJX

OK I finally saw this line from the logs:

Configuration :server was not enabled for Magpie.Endpoint, http/https services won't start

I have no idea why this is the case, since my rel/overlays/bin/server has exactly the same content as the vanilla test app:

#!/bin/sh
cd -P -- "$(dirname -- "$0")"
PHX_SERVER=true exec ./magpie start

But anyways I removed the conditional part on

if System.get_env("PHX_SERVER") do
  config :magpie, MagpieWeb.Endpoint, server: true
end

in my runtime.exs and it finally worked.

Where Next?

Popular in Questions Top

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
nobody
How to bind a phoenix app to a specific ip address? could not find anything about that, nowhere, unfortunately, but for me this is quite...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
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
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
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New

We're in Beta

About us Mission Statement