Papercups

Papercups

I am trying to build a mix release but it is failing on start

MIX_ENV=prod mix release papercups
SECRET_KEY_BASE="test"  DATABASE_URL=ecto://postgres:postgres@localhost/chat_api_dev _build/prod/rel/papercups/bin/papercups start
chat_api: generated priv/static/swagger.json
* assembling papercups-0.1.0 on MIX_ENV=prod
* using config/releases.exs to configure the release at runtime

Release created at _build/prod/rel/papercups!

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

Once the release is running:

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

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

To list all commands:

    _build/prod/rel/papercups/bin/papercups

20:42:39.224 [info] Running ChatApiWeb.Endpoint with cowboy 2.8.0 at :::4000 (http)
20:42:39.226 [info] Application chat_api exited: ChatApi.Application.start(:normal, []) returned an error: shutdown: failed to start child: ChatApiWeb.Endpoint
    ** (EXIT) an exception was raised:
        ** (FunctionClauseError) no function clause matching in Kernel.=~/2
            (elixir 1.10.4) lib/kernel.ex:2011: Kernel.=~(nil, ~r/[^:]:\d/)
            (phoenix 1.5.5) lib/phoenix/endpoint/supervisor.ex:352: Phoenix.Endpoint.Supervisor.build_url/2
            (phoenix 1.5.5) lib/phoenix/endpoint/supervisor.ex:288: Phoenix.Endpoint.Supervisor.url/1
            (phoenix 1.5.5) lib/phoenix/config.ex:54: Phoenix.Config.cache/3
            (phoenix 1.5.5) lib/phoenix/endpoint/supervisor.ex:483: Phoenix.Endpoint.Supervisor.log_access_info/2
            (phoenix 1.5.5) lib/phoenix/endpoint/supervisor.ex:17: Phoenix.Endpoint.Supervisor.start_link/3
            (stdlib 3.13) supervisor.erl:385: :supervisor.do_start_child_i/3
            (stdlib 3.13) supervisor.erl:371: :supervisor.do_start_child/2
{"Kernel pid terminated",application_controller,"{application_start_failure,chat_api,{{shutdown,{failed_to_start_child,'Elixir.ChatApiWeb.Endpoint',{'EXIT',{function_clause,[{'Elixir.Kernel','=~',[nil,#{'__struct__' => 'Elixir.Regex',opts => <<>>,re_pattern => {re_pattern,0,0,0,<<69,82,67,80,76,0,0,0,0,0,0,0,65,0,0,0,255,255,255,255,255,255,255,255,0,0,58,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131,0,8,31,58,29,58,7,120,0,8,0>>},re_version => {<<\"8.44 2020-02-12\">>,little},source => <<\"[^:]:\\d\">>}],[{file,\"lib/kernel.ex\"},{line,2011}]},{'Elixir.Phoenix.Endpoint.Supervisor',build_url,2,[{file,\"lib/phoenix/endpoint/supervisor.ex\"},{line,352}]},{'Elixir.Phoenix.Endpoint.Supervisor',url,1,[{file,\"lib/phoenix/endpoint/supervisor.ex\"},{line,288}]},{'Elixir.Phoenix.Config',cache,3,[{file,\"lib/phoenix/config.ex\"},{line,54}]},{'Elixir.Phoenix.Endpoint.Supervisor',log_access_info,2,[{file,\"lib/phoenix/endpoint/supervisor.ex\"},{line,483}]},{'Elixir.Phoenix.Endpoint.Supervisor',start_link,3,[{file,\"lib/phoenix/endpoint/supervisor.ex\"},{line,17}]},{supervisor,do_start_child_i,3,[{file,\"supervisor.erl\"},{line,385}]},{supervisor,do_start_child,2,[{file,\"supervisor.erl\"},{line,371}]}]}}}},{'Elixir.ChatApi.Application',start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,chat_api,{{shutdown,{failed_to_start_child,'Elixir.ChatApiWeb.Endpoint',{'EXIT',{function_clause,[{'Elixir.Kernel','=~',[nil,

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

The code is on this branch to repro https://github.com/papercups-io/papercups/tree/prod-self-deploy-docker

I m not too sure how to debug this would love any feedback or help
Thanks!

Showing Posts 1 to 2

RudManusachi

RudManusachi

I think it expects for configuration for (:chat_api, ChatApiWeb.Endpoint) is not set properly
according to this part

config :chat_api, ChatApiWeb.Endpoint,
  http: [port: {:system, "PORT"}],
  url: [scheme: "https", host: {:system, "BACKEND_URL"}, port: 443],

try to start release with BACKEND_URL and PORT env variables

UPD. I though it should fallback to default “localhost”, though.. :thinking:

Papercups

Papercups OP

Thanks Rud! It was ChatApiWeb.Endpoint but in the releases.exs

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews