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

Unable to ping or remote_console into application after upgrading to 2.0 #699

Open
jeremyowensboggs opened this issue Jul 17, 2019 · 1 comment

Comments

@jeremyowensboggs
Copy link

jeremyowensboggs commented Jul 17, 2019

Steps to reproduce

Our vm.args.eex

## Name of the node
-sname blaster

## Cookie for distributed erlang
-setcookie <%= release.profile.cookie %>

# Enable SMP automatically based on availability
-smp auto

Verbose Logs

This doesn't work:

sudo ./blaster2 ping
Automatically converted short name (blaster) to long name (blaster@k--3652t)!
It is recommended that you set a fully-qualified name in vm.args instead
▸ Received 'pang' from blaster@k--3652t!
▸ Possible reasons for this include:
▸ - The cookie is mismatched between us and the target node
▸ - We cannot establish a remote connection to the node

But this does

sudo ./blaster2 ping --name blaster@k--3652t.local
Automatically converted short name (blaster) to long name (blaster@k--3652t)!
It is recommended that you set a fully-qualified name in vm.args instead
pong

Unfortunately, the remote_console does not allow the --name options, so I still cannot connect to the remote_console

Description of issue

  • What are the expected results?
  • What version of Distillery?
    2.0.14
  • What OS, Erlang/Elixir versions are you seeing this issue on?
    Ubuntu 18
  • If possible, also provide your rel/config.exs, as it is often
# Import all plugins from `rel/plugins`
# They can then be used by adding `plugin MyPlugin` to
# either an environment, or release definition, where
# `MyPlugin` is the name of the plugin module.
Path.join(["rel", "plugins", "*.exs"])
|> Path.wildcard()
|> Enum.map(&Code.eval_file(&1))

use Mix.Releases.Config,
  # This sets the default release built by `mix release`
  default_release: :default,
  # This sets the default environment used by `mix release`
  default_environment: Mix.env()

# For a full list of config options for both releases
# and environments, visit https://hexdocs.pm/distillery/configuration.html

# You may define one or more environments in this file,
# an environment's settings will override those of a release
# when building in that environment, this combination of release
# and environment configuration is called a profile

environment :dev do
  # If you are running Phoenix, you should make sure that
  # server: true is set and the code reloader is disabled,
  # even in dev mode.
  # It is recommended that you build with MIX_ENV=prod and pass
  # the --env flag to Distillery explicitly if you want to use
  # dev mode.
  set(dev_mode: true)
  set(include_erts: false)
  set(cookie: :"randomstringofstuff"
end

environment :stage do
  set(include_erts: true)
  set(include_src: false)
  set(cookie: :"randomstringofstuff")
end

environment :prod do
  set(include_erts: true)
  set(include_src: false)
  set(cookie: :"randomstringofstuff")
end

# You may define one or more releases in this file.
# If you have not set a default release, or selected one
# when running `mix release`, the first release in the file
# will be used by default

release :blaster2 do
  set(version: current_version(:blaster))
  set(vm_args: "rel/config/vm.args.eex")

  set(
    applications: [
      :runtime_tools,
      blaster: :permanent,
      blaster_web: :permanent,
      devices: :permanent
    ]
  )

  set(
    commands: [
      "setup.couchdb": "rel/commands/setup_couchdb.sh",
      "setup.blaster": "rel/commands/setup_blaster.sh",
      "configure.rankone": "rel/commands/configure_rankone.sh"
    ]
  )
end
  • Is there documentation that says one thing, but Distillery does
    another? If so, please link the doc here so it can be updated if
    it's a documentation issue, or so that the fix can be based around
    what's documented.
  • If this is a runtime configuration issue, please also provide your config file
    (with any sensitive information stripped of course). This is almost
    always necessary to understand why some configuration may not be working.

If you do not provide the above information and I need it to help troubleshoot, it may delay things significantly,
as I will have to ask you for all of these things anyway. Help me help you!

@nifoc
Copy link

nifoc commented Aug 26, 2019

We're facing the exact same issue. To add a new observation:

For ping the --name argument is specified twice and for remote_console it's only specified once.

# ping
/home/username/appname/erts-10.4/bin/erl \
-boot_var ERTS_LIB_DIR /home/username/appname/lib \
-boot /home/username/appname/bin/start_clean \
-config /home/username/appname/var/sys.config -noshell \
-s elixir start_cli -logger handle_sasl_reports false -extra \
-e Distillery.Releases.Runtime.Control.main \
--logger-sasl-reports false -- ping --name=appname \
--cookie=appname --name=appname@username
# remote_console
/home/username/appname/erts-10.4/bin/erl \
-boot_var ERTS_LIB_DIR /home/username/appname/lib \
-boot /home/username/appname/bin/start_clean \
-config /home/username/appname/var/sys.config -noshell \
-s elixir start_cli -logger handle_sasl_reports false -extra \
-e Distillery.Releases.Runtime.Control.main \
--logger-sasl-reports false -- ping --name=appname \
--cookie=appname

nifoc added a commit to nifoc/distillery that referenced this issue Aug 26, 2019
-sname support was not working in all cases (e.g. bitwalker#699).
This fixes at least the things mentioned in the above issue.
@nifoc nifoc mentioned this issue Aug 27, 2019
4 tasks
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

2 participants