marocchino

marocchino

erlang 22.0.7
elixir 1.9.1

I am trying to test release.
I can success with build. but, It can not start with some error messages.

{"init terminating in do_boot",{'cannot get bootfile','/Users/marocchino/Documents/backend/_build/prod/rel/backend/bin/start.boot'}}
init terminating in do_boot ({cannot get bootfile,/Users/marocchino/Documents/backend/_build/prod/rel/backend/bin/start.boot})

Crash dump is being written to: erl_crash.dump...done

BTW, start.boot file was exists in release directory.

$ ls _build/prod/rel/backend/bin
backend     backend.bat
$ ls _build/prod/rel/backend/releases/0.1.0/
backend.rel        elixir             env.sh             releases.exs       start.script       start_clean.script vm.args
consolidated       env.bat            iex                start.boot         start_clean.boot   sys.config

Do I need more path setting?

Full log is below:

$ mix compile
==> deferred_config
Compiling 2 files (.ex)
warning: variable "k" is unused (if the variable is not meant to be used, prefix it with an underscore)
  lib/replacing_walk.ex:70: ReplacingWalk.walk/3

warning: variable "v" is unused (if the variable is not meant to be used, prefix it with an underscore)
  lib/replacing_walk.ex:70: ReplacingWalk.walk/3

Generated deferred_config app
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> connection
Compiling 1 file (.ex)
Generated connection app
==> gettext
Compiling 1 file (.erl)
Compiling 20 files (.ex)
Generated gettext app
===> Compiling ranch
===> Compiling telemetry
==> decimal
Compiling 1 file (.ex)
Generated decimal app
==> jason
Compiling 8 files (.ex)
Generated jason app
==> peerage
Compiling 6 files (.ex)
Generated peerage app
==> db_connection
Compiling 14 files (.ex)
Generated db_connection app
==> ecto
Compiling 54 files (.ex)
Generated ecto app
==> phoenix_pubsub
Compiling 13 files (.ex)
Generated phoenix_pubsub app
===> Compiling cowlib
===> Compiling cowboy
==> mime
Compiling 2 files (.ex)
Generated mime app
==> postgrex
Compiling 61 files (.ex)
Generated postgrex app
==> ecto_sql
Compiling 25 files (.ex)
Generated ecto_sql app
==> plug_crypto
Compiling 4 files (.ex)
Generated plug_crypto app
==> plug
Compiling 1 file (.erl)
Compiling 39 files (.ex)
warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch
  lib/plug/conn/wrapper_error.ex:23

Generated plug app
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> plug_cowboy
Compiling 6 files (.ex)
Generated plug_cowboy app
==> phoenix
Compiling 67 files (.ex)
Generated phoenix app
==> phoenix_live_reload
Compiling 4 files (.ex)
Generated phoenix_live_reload app
==> phoenix_ecto
Compiling 6 files (.ex)
Generated phoenix_ecto app
==> backend
Compiling 13 files (.ex)
Generated backend app
$ MIX_ENV=prod mix release
==> deferred_config
Compiling 2 files (.ex)
warning: variable "k" is unused (if the variable is not meant to be used, prefix it with an underscore)
  lib/replacing_walk.ex:70: ReplacingWalk.walk/3

warning: variable "v" is unused (if the variable is not meant to be used, prefix it with an underscore)
  lib/replacing_walk.ex:70: ReplacingWalk.walk/3

Generated deferred_config app
==> connection
Compiling 1 file (.ex)
Generated connection app
==> gettext
Compiling 1 file (.erl)
Compiling 20 files (.ex)
Generated gettext app
===> Compiling ranch
===> Compiling telemetry
==> decimal
Compiling 1 file (.ex)
Generated decimal app
==> jason
Compiling 8 files (.ex)
Generated jason app
==> peerage
Compiling 6 files (.ex)
Generated peerage app
==> db_connection
Compiling 14 files (.ex)
Generated db_connection app
==> ecto
Compiling 54 files (.ex)
Generated ecto app
==> phoenix_pubsub
Compiling 13 files (.ex)
Generated phoenix_pubsub app
===> Compiling cowlib
===> Compiling cowboy
==> mime
Compiling 2 files (.ex)
Generated mime app
==> postgrex
Compiling 61 files (.ex)
Generated postgrex app
==> ecto_sql
Compiling 25 files (.ex)
Generated ecto_sql app
==> plug_crypto
Compiling 4 files (.ex)
Generated plug_crypto app
==> plug
Compiling 1 file (.erl)
Compiling 39 files (.ex)
warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch
  lib/plug/conn/wrapper_error.ex:23

Generated plug app
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> plug_cowboy
Compiling 6 files (.ex)
Generated plug_cowboy app
==> phoenix
Compiling 67 files (.ex)
Generated phoenix app
==> phoenix_ecto
Compiling 6 files (.ex)
Generated phoenix_ecto app
==> backend
Compiling 13 files (.ex)
Generated backend app
* assembling backend-0.1.0 on MIX_ENV=prod
* using config/releases.exs to configure the release at runtime
* creating _build/prod/rel/backend/releases/0.1.0/vm.args
* creating _build/prod/rel/backend/releases/0.1.0/env.sh
* creating _build/prod/rel/backend/releases/0.1.0/env.bat
* skipping elixir.bat for windows (bin/elixir.bat not found in the Elixir installation)
* skipping iex.bat for windows (bin/iex.bat not found in the Elixir installation)

Release created at _build/prod/rel/backend!

    # To start your system
    _build/prod/rel/backend/bin/backend start

Once the release is running:

    # To connect to it remotely
    _build/prod/rel/backend/bin/backend remote

    # To stop it gracefully (you may also send SIGINT/SIGTERM)
    _build/prod/rel/backend/bin/backend stop

To list all commands:

    _build/prod/rel/backend/bin/backend
$ DB_URL=ecto://postgres:postgres@localhost/backend_dev \
> RELEASE_COOKIE=foo \
> SECRET_KEY_BASE=foo \
> HOSTNAME=127.0.0.1 \
> SERVICE_NAME=localhost.svc \
> APP_HOST=localhost \
> PORT=4000 \
> _build/prod/rel/backend/bin/backend start
{"init terminating in do_boot",{'cannot get bootfile','/Users/marocchino/Documents/backend/_build/prod/rel/backend/bin/start.boot'}}
init terminating in do_boot ({cannot get bootfile,/Users/marocchino/Documents/backend/_build/prod/rel/backend/bin/start.boot})

Crash dump is being written to: erl_crash.dump...done

# mix.exs
defmodule Backend.MixProject do
  use Mix.Project

  def project do
    [
      app: :backend,
      version: "0.1.0",
      elixir: "~> 1.9",
      elixirc_paths: elixirc_paths(Mix.env()),
      compilers: [:phoenix, :gettext] ++ Mix.compilers(),
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps()
    ]
  end

  # Configuration for the OTP application.
  #
  # Type `mix help compile.app` for more information.
  def application do
    [
      mod: {Backend.Application, []},
      extra_applications: [:logger, :runtime_tools, :peerage]
    ]
  end

  # Specifies which paths to compile per environment.
  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  # Specifies your project dependencies.
  #
  # Type `mix help deps` for examples and options.
  defp deps do
    [
      {:phoenix, "~> 1.4.9"},
      {:phoenix_pubsub, "~> 1.1"},
      {:phoenix_ecto, "~> 4.0"},
      {:ecto_sql, "~> 3.1"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 2.11"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:gettext, "~> 0.11"},
      {:jason, "~> 1.0"},
      {:plug_cowboy, "~> 2.0"},
      {:peerage, "~> 1.0"}
    ]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  # For example, to create, migrate and run the seeds file at once:
  #
  #     $ mix ecto.setup
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    [
      "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
      "ecto.reset": ["ecto.drop", "ecto.setup"],
      test: ["ecto.create --quiet", "ecto.migrate", "test"]
    ]
  end
end
# config/releases.exs
import Config

service_name = System.fetch_env!("SERVICE_NAME")
db_url = System.fetch_env!("DB_URL")
secret_key_base = System.fetch_env!("SECRET_KEY_BASE")
port = System.fetch_env!("PORT")

config :backend, Backend.Repo, url: db_url

config :backend, BackendWeb.Endpoint,
  http: [port: port],
  secret_key_base: secret_key_base,
  url: [host: {:system, "APP_HOST"}, port: {:system, "PORT"}]

config :peerage,
  via: Peerage.Via.Dns,
  dns_name: service_name,
  app_name: "backend"
rel/env.sh.eex
#!/bin/sh

# Sets and enables heart (recommended only in daemon mode)
# case $RELEASE_COMMAND in
#   daemon*)
#     HEART_COMMAND="$RELEASE_ROOT/bin/$RELEASE_NAME $RELEASE_COMMAND"
#     export HEART_COMMAND
#     export ELIXIR_ERL_OPTIONS="-heart"
#     ;;
#   *)
#     ;;
# esac

# Set the release to work across nodes. If using the long name format like
# the one below (my_app@127.0.0.1), you need to also uncomment the
# RELEASE_DISTRIBUTION variable below.
export RELEASE_DISTRIBUTION=backend
export RELEASE_NODE=<%= @release.name %>@${HOSTNAME}

Showing Posts 1 to 2

marocchino

marocchino OP

update: that part was wrong. I update that It is little progress.

export RELEASE_DISTRIBUTION=name

but still hanging on start. I can call with rpc but, no 4000 port response.
It occurs when I generate a project with --no-webpack option.

$ DB_URL=ecto://postgres:postgres@localhost/backend_dev RELEASE_COOKIE=foo SECRET_KEY_BASE=foo HOSTNAME=127.0.0.1 SERVICE_NAME=localhost.svc APP_HOST=localhost PORT=4001 _build/prod/rel/backend/bin/backend start
# no response after this.
# another terminal
$ DB_URL=ecto://postgres:postgres@localhost/backend_dev RELEASE_COOKIE=foo SECRET_KEY_BASE=foo HOSTNAME=127.0.0.1 SERVICE_NAME=localhost.svc APP_HOST=localhost PORT=4001 _build/prod/rel/backend/bin/backend rpc 'IO.inspect Application.loaded_applications'
[
  {:plug_cowboy, 'A Plug adapter for Cowboy', '2.1.0'},
  {:kernel, 'ERTS  CXC 138 10', '6.4.1'},
  {:eex, 'eex', '1.9.1'},
  {:plug_crypto, 'Crypto-related functionality for the web, used by Plug.',
   '1.0.0'},
  {:gettext, 'Internationalization and localization through gettext', '0.17.0'},
  {:sasl, 'SASL  CXC 138 11', '3.4'},
  {:peerage,
   'Easy clustering, pluggable discovery: via DNS (for Kubernetes, Weave, discoverd, Swarm and others), UDP multicast, or a plain list of nodes. Easy extensibility for custom Providers.\n',
   '1.0.3'},
  {:phoenix_pubsub, 'Distributed PubSub and Presence platform', '1.1.2'},
  {:telemetry, 'Dynamic dispatching library for metrics and instrumentations',
   '0.4.0'},
  {:crypto, 'CRYPTO', '4.5.1'},
  {:elixir, 'elixir', '1.9.1'},
  {:ecto, 'A toolkit for data mapping and language integrated query for Elixir',
   '3.1.7'},
  {:postgrex, 'PostgreSQL driver for Elixir', '0.15.0'},
  {:ranch, 'Socket acceptor pool for TCP protocols.', '1.7.1'},
  {:mime, 'A MIME type module for Elixir', '1.3.1'},
  {:logger, 'logger', '1.9.1'},
  {:decimal, 'Arbitrary precision decimal arithmetic.', '1.8.0'},
  {:deferred_config,
   'Seamless runtime config with one line of code. No special accessors or mappings. Full support for \'{:system...} tuple\' and \'{m,f,a}\' runtime config patterns.',
   '0.1.1'},
  {:ssl, 'Erlang/OTP SSL application', '9.3.5'},
  {:phoenix_html, 'Phoenix view functions for working with HTML templates',
   '2.13.3'},
  {:db_connection,
   'Database connection behaviour for database transactions and connection pooling\n',
   '2.1.1'},
  {:plug,
   'A specification and conveniences for composable modules between web applications',
   '1.8.3'},
  {:stdlib, 'ERTS  CXC 138 10', '3.9.2'},
  {:connection, 'Connection behaviour for connection processes\n', '1.0.4'},
  {:public_key, 'Public key infrastructure', '1.6.7'},
  {:compiler, 'ERTS  CXC 138 10', '7.4.4'},
  {:runtime_tools, 'RUNTIME_TOOLS', '1.13.3'},
  {:phoenix,
   'Productive. Reliable. Fast. A productive web framework that\ndoes not compromise speed or maintainability.\n',
   '1.4.9'},
  {:jason, 'A blazing fast JSON parser and generator in pure Elixir.\n',
   '1.1.2'},
  {:cowlib, 'Support library for manipulating Web protocols.', '2.7.3'},
  {:phoenix_ecto, 'Integration between Phoenix & Ecto', '4.0.0'},
  {:ecto_sql, 'SQL-based adapters for Ecto and database migrations', '3.1.6'},
  {:cowboy, 'Small, fast, modern HTTP server.', '2.6.3'},
  {:backend, 'backend', '0.1.0'},
  {:asn1, 'The Erlang ASN1 compiler version 5.0.9', '5.0.9'}
]
marocchino

marocchino OP

It was just endpoint config.

problem resolved. :smile:

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews