Skip to content

The host specified in config.managed.server is not reachable. #27

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

Open
rchekaluk opened this issue Oct 21, 2014 · 5 comments
Open

The host specified in config.managed.server is not reachable. #27

rchekaluk opened this issue Oct 21, 2014 · 5 comments

Comments

@rchekaluk
Copy link

Able to "vagrant up" (link) but issuing either "vagrant ssh" or "vagrant provision" returns this error:

==> default: Warning! The ManagedServers provider doesn't support any of the Vagrant
==> default: high-level network configurations (`config.vm.network`). They
==> default: will be silently ignored.
==> default: The host specified in `config.managed.server` is not reachable.

Very simple Vagrantfile per README.md :

Vagrant.configure("2") do |config|
  config.vm.box = "tknerr/managed-server-dummy"

  config.vm.provider :managed do |managed, override|
    managed.server                = "REDACTED.DOMAIN.COM"
    override.ssh.username         = 'REDACTED-USERNAME'
    override.ssh.private_key_path = '/home/REDACTED-USERNAME/.ssh/id_rsa'

  end
end

Yet, the server is reachable:

$ ping REDACTED.DOMAIN.COM
PING REDACTED.DOMAIN.COM (1.2.3.4) 56(84) bytes of data.
64 bytes from REDACTED.DOMAIN.COM (1.2.3.4): icmp_seq=1 ttl=64 time=0.548 ms
64 bytes from REDACTED.DOMAIN.COM (1.2.3.4): icmp_seq=2 ttl=64 time=1.14 ms
64 bytes from REDACTED.DOMAIN.COM (1.2.3.4): icmp_seq=3 ttl=64 time=0.844 ms

Versions:

$ vagrant --version
Vagrant 1.6.5

$ vagrant plugin list
vagrant-login (1.0.1, system)
vagrant-managed-servers (0.3.0)
vagrant-share (1.1.2, system)

Am I doing something wrong? What gives?

@rchekaluk
Copy link
Author

Is it possible to have the plugin provide some kind of --debug or --verbose option that can reveal greater detail about the specific network operation that failed?

@tknerr
Copy link
Owner

tknerr commented Oct 29, 2014

Yes the error message is not very precise atm, it can currently mean
anything between:

  • host not reachable
  • host reachable, but ssh port not open
  • host reachable, ssh port open, but auth failed

From your description it looks like the host is reachable though.

Can you try logging in to the vm via the supplied ssh credentials in
addition to pinging?

Any PRs on improving that are heartily welcome. This is indeed quite
confusing currently...
Am 29.10.2014 15:24 schrieb "rchekaluk" [email protected]:

Is it possible to have the plugin provide some kind of --debug or
--verbose option that can reveal greater detail about the specific network
operation that failed?


Reply to this email directly or view it on GitHub
#27 (comment)
.

@tknerr
Copy link
Owner

tknerr commented Oct 29, 2014

In fact I already wanted to do this some time ago, but I never finished it so it's commented out now:
https://github.com/tknerr/vagrant-managed-servers/blob/master/lib/vagrant-managed-servers/action/read_state.rb#L23-41

Would be a good base to start though...

@rchekaluk
Copy link
Author

I spent a few hours looking at your draft code, but I don't have any experience with Vagrant internals so it's going slow.

I don't follow the intent or usage of methods action_read_state, read_state, or state. Using the vagrant-managed-server development process, I cannot invoke:

$ bundle exec vagrant read_state my_server

Can you either give some guidance, or finish up this feature yourself?

I was wondering if it's possible to expose existing Vagrant errors that occur during a connection attempt?

@tknerr
Copy link
Owner

tknerr commented Jan 17, 2015

Hi @rchekaluk,

right, bundle exec vagrant read_state my_server will not work, but bundle exec vagrant up fake_managed_server should work.

You can also have a look what happens when you run bundle exec rake acceptance:
https://github.com/tknerr/vagrant-managed-servers/blob/master/Rakefile#L14-23

The intent of the read_state related methods are to read the state from the managed server, i.e. it currently only checks whether it can connect via ssh with the given credentials. The resulting state will be either :running or :not_reachable. The state (or rather a translation of it) is what is shown when you run vagrant status.

Hope that gets you further a bit. I would love to finish that, but right now my time does not allow for it. Maybe mid february I might get a chance though.

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