Closed jameskyle closed 9 years ago
I'm having the same issue. I just tried with 15.04 today and got this.
I've tried
sudo systemctl unmask hostname.service
it seems everything ok, no errors, but if i want to start the service, it is still masked.
Any ideas?
having the same issue
I got the same error message. On my Ubuntu VM ( based on image from cloud.ubuntu) I saw the next:
sudo systemctl status hostname
● hostname.service
Loaded: masked (/dev/null)
Active: inactive (dead)
ls -la /lib/systemd/system/hostname.service
lrwxrwxrwx 1 root root 9 Apr 18 21:11 /lib/systemd/system/hostname.service -> /dev/null
As temporary workaround it is possible to use /etc/init.d/hostname.sh
I encounter the same problem reported by @jameskyle but on a Debian Wheezy, after an apt-get update ; apt-get upgrade .
root@local:~# uname -a
Linux local 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64 GNU/Linu
I retested with a upgraded Debian box 7.8, the creation of the VM is working fine, but after a vagrant halt and vagrant up with this line in Vagrantfile
config.vm.hostname = "local.supercool.com"
I encounter the same problem.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
hostname -f
Stdout from the command:
Stderr from the command:
sudo: unable to resolve host local
stdin: is not a tty
hostname: Name or service not known
Here are the Vagrant Log:
/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
INFO interface: error: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
hostname -f
Stdout from the command:
Stderr from the command:
sudo: unable to resolve host local
stdin: is not a tty
hostname: Name or service not known
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
hostname -f
Stdout from the command:
Stderr from the command:
sudo: unable to resolve host local
stdin: is not a tty
hostname: Name or service not known
INFO interface: Machine: error-exit ["Vagrant::Errors::VagrantError", "The following SSH command responded with a non-zero exit status.\nVagrant assumes that this means the command failed!\n\nhostname -f\n\nStdout from the command:\n\n\n\nStderr from the command:\n\nsudo: unable to resolve host local\nstdin: is not a tty\nhostname: Name or service not known\n"]
It seems like the only work-around for now is
#host.vm.hostname = "skynet"
host.vm.provision :shell, inline: "hostnamectl set-hostname skynet"
Encountering the same on Ubuntu 15.04.
Same here. Can't wait to see the fix!
yup
After updating to Vagrant 1.7.4
everything works fine. Tested with ubuntu/vivid64
@czerasz version upgrade to Vagrant 1.7.4
fixed the issue for me as well with ubuntu/vivid64
This is breaking again on the Wily betas. Can we have a better fix that doesn't rely on checking the codename of one specific release?
Still broken with ubuntu/wily and vagrant 1.7.4...
Still broken with ubuntu/wily and vagrant 1.7.4...
+1
I saw it fixed for vivid but came up again for wily.
PR'd https://github.com/mitchellh/vagrant/pull/6470 -> avoids hard-coding Ubuntu distribution names
Closed and reopened: https://github.com/mitchellh/vagrant/pull/6471
Problem is also there in 16.04 (fix #6470 does not work): root@ns399965:/tmp/ispconfig3/install# hostnamectl set-hostname ns1 root@ns399965:/tmp/ispconfig3/install# sudo systemctl status hostname ● hostname.service Loaded: masked (/dev/null; bad) Active: inactive (dead) root@ns399965:/tmp/ispconfig3/install#
workaround: root@ns399965:/tmp/ispconfig3/install# sh /etc/init.d/hostname.sh root@ns399965:/tmp/ispconfig3/install# hostname -f ns1.soulternative.eu
@nubae can you file a new issue, please?
@nubae actually, https://github.com/mitchellh/vagrant/issues/7288 is this, no?
@reedloden yup that seems to be the same issue... still need to re-file a new issue or not?
Using Vagrant 1.7.4 with Ubunut 16.04 and still having the issue:
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
service hostname start
Stdout from the command:
Stderr from the command:
sudo: unable to resolve host ubuntu-xenial: Connection timed out
mesg: ttyname failed: Inappropriate ioctl for device
Failed to start hostname.service: Unit hostname.service is masked.
Ubuntu Box Version: '20161214.0.0'
@ravishtiwari Upgrading to Vagrant 1.9.1 solved this for me.
@awibmer - I've recently upgraded to Vagrant 1.9.1 will confirm if the issue is fixed for me as well.
Thanks
Upgrading to 1.8.5 solved this for me
@awibmer - upgrading to 1.9.1 has resolved this for me as well, thanks for your help.
Im now on vagrant 2.2.1 and have the same problem now
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Error below. The hostname service is masked in ubuntu 15.04, the recommended way to control the hostname seems to be hostnamectl.