Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statman error after building release with exrm #3

Open
ghost opened this issue Oct 13, 2016 · 5 comments
Open

Statman error after building release with exrm #3

ghost opened this issue Oct 13, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Oct 13, 2016

When I try to start my app after creating a release with exrm, I get the following error:

14:04:51.276 [info] Application discorelic exited: exited in: Discorelic.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function :statman_server.add_subscriber/1 is undefined (module :statman_server is not available)
            :statman_server.add_subscriber(:statman_aggregator)
            (discorelic) lib/discorelic.ex:26: Discorelic.start/2
            (kernel) application_master.erl:273: :application_master.start_it_old/4
{"Kernel pid terminated",application_controller,"{application_start_failure,discorelic,{bad_return,{{'Elixir.Discorelic',start,[normal,[]]},{'EXIT',{undef,[{statman_server,add_subscriber,[statman_aggregator],[]},{'Elixir.Discorelic',start,2,[{file,\"lib/discorelic.ex\"},{line,26}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,273}]}]}}}}}"}

This happens on both macOS and CentOS, erlang/OTP 18 and 19, and elixir 1.3.3

@blatyo
Copy link

blatyo commented Oct 16, 2016

If it works outside of exrm, it's likely you're missing an application in your mix.exs.

@ghost
Copy link
Author

ghost commented Oct 17, 2016

@blatyo Thanks for the response. I get this error when I try to add statman to my applications list

10:25:59.104 [info] Application statman exited: :statman_app.start(:normal, []) returned an error: shutdown: failed to start child: :statman_server
    ** (EXIT) already started: #PID<0.1313.0>
{"Kernel pid terminated",application_controller,"{application_start_failure,statman,{{shutdown,{failed_to_start_child,statman_server,{already_started,<0.1313.0>}}},{statman_app,start,[normal,[]]}}}"}

Crash dump is being written to: erl_crash.dump...done
Kernel pid terminated (application_controller) ({application_start_failure,statman,{{shutdown,{failed_to_start_child,statman_server,{already_started,<0.1313.0>}}},{statman_app,start,[normal,[]]}}})

@blatyo
Copy link

blatyo commented Oct 17, 2016

I've not used exrm, so I don't think I'll be able to help you much more. I believe exrm doesn't pull in an application unless it's in the applications list, which was your first issue. Now, you have the issue that this library is starting statman, so, the line in applications is conflicted with that one. I'm not sure if there's a way in exrm to say you need that application, but to not start it.

@cloudsan42-zz
Copy link

I was not able to see data on relic server
I have added discorelic info in mix.exs and config.exs

defp deps do
[{:phoenix, "> 1.2.0"},
{:phoenix_pubsub, "
> 1.0"},
{:phoenix_html, "> 2.6"},
{:phoenix_live_reload, "
> 1.0", only: :dev},
{:gettext, "> 0.11"},
{:discorelic, "
> 0.1.0", github: "nogates/discorelic"},
{:cowboy, "~> 1.0"}]

def application do
[mod: {Appname, []},
applications: [:phoenix, :phoenix_pubsub, :phoenix_html, :discorelic, :cowboy, :logger, :gettext]]
end

in config.exs
config :discorelic,
application_name: "appname",
license_key: System.get_env("key")
Please let me know if I'm missing any thing..

@nogates
Copy link
Owner

nogates commented Mar 30, 2017

Sorry for the late, late reply :( I guess that you probably either solved it or moved to another thing... but yeah, let me know if this is still an issue for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants