Closed willfore closed 6 years ago
Output of Application.get_all_env
iex(grid@127.0.0.1)1> Application.get_all_env(:grid)
[
{Grid.Repo,
[
adapter: Ecto.Adapters.Postgres,
username: "----",
password: "----",
database: "grid_prod",
pool_size: 15
]},
{:ecto_repos, [Grid.Repo]},
{GridWeb.Endpoint,
[
render_errors: [view: GridWeb.ErrorView, accepts: ["html", "json"]],
pubsub: [name: Grid.PubSub, adapter: Phoenix.PubSub.PG2],
cache_static_manifest: "priv/static/cache_manifest.json",
http: [port: 4000],
url: [host: "localhost", port: 4000],
load_from_system_env: true,
server: true
]},
{:erlang_magic_cookie,
:"wVElm5xRdYn4RhCsoCUB6X9KyXj6rXBkuzCu4EV/ZBc4GerS6YUQLGSBxsY9svkU"}
]
@willfore Can you paste the output of Application.loaded_applications
and Application.started_applications
? I think it may also be useful to see your boot script, which should be _build/<env>/rel/grid/releases/<version>/grid.script
(assuming you are running straight after building the release, otherwise change _build/<env>/rel/
to wherever your deploy root is.
Sure thing.. Here are the results:
Based on that output, Phoenix is started, but your output is truncated, so we can't tell if your app itself is started. What happens if you run Application.ensure_all_started(:grid)
? If it returns {:ok, pid}
can you test to see if the endpoint starts working? If it does, I believe the fix for this is in 2.0.0-rc.4, so upgrading and trying again would be necessary to eliminate some of the possibilities - it shows you are currently on 2.0.0-rc.2.
It returned:
{:ok, [:mix, :bootleg, :grid]}
After running that lsof -i :4000
shows beam.smp is listening on port 4000. I'll update to rc4 real quick and test again and post the progress for you.
Yeah, I think I know what's up, what version is the :grid
application? It's possible it's a different issue, but let's see how your retest goes and we can dig in further.
EDIT: I'm an idiot, Distillery is the one with the version number throwing things out of wack, and your app depends on Distillery haha
hahah.. OK, I redeployed with rc.4 and it still doesn't show to be listening until I run Application.ensure_all_started(:grid)
I figured out what's up - :bootleg
has added :mix
to it's :extra_applications
list, which it shouldn't be doing; but the reason that is a problem is because :mix
is being added to the release with a start type of :load
by Distillery, which is preventing :bootleg
from starting, which in turn is preventing :grid
from starting.
That said, I'm pretty sure you don't need :bootleg
in your release, right? I think you are missing a runtime: false
flag on that dependency, which would clear this up. In any case, I'll have to look at how to handle this in the future. I think this is probably something we need a warning for.
That did the trick.
EDIT: It said it in the docs, I missed it.
Thanks for your help!
Steps to reproduce
MIX_ENV=prod mix release --env=prod --verbose
Verbose Logs
Description of issue
I just upgraded from OTP 20 to 21 and Elixir 1.7.1 from 1.6.6. When I did this, I updated my deps as normal and realized through that process I needed to be running the new 2.0-rc.2 to get around the errors already resolved. Everything works as it should, the server runs, responds to pings, console works, remote_console works but it is not listening on port 4000.
What are the expected results? server to listen on port 4000
What OS, Erlang/Elixir versions are you seeing this issue on? Ubuntu 16.04 OTP 21/1.7.1
If possible, also provide your
rel/config.exs
, as it is often my first troubleshooting question, and you'll save us both time :)