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

Restarting network (via systemctl): [FAILED] #2430

Closed
kelbyers opened this Issue Oct 28, 2013 · 14 comments

Comments

Projects
None yet
10 participants
@kelbyers

kelbyers commented Oct 28, 2013

After upgrading from Vagrant 1.3.3 to 1.3.5 and upgrading vagrant-vmware-fusion from 2.0.5 to 2.0.8, my Fedora 19 guests get errors up starting:

Kels-MacBook-Pro:800 jxb2016$ vagrant reload vpre
[vpre] Attempting graceful shutdown of VM...
Connection to 192.168.254.193 closed by remote host.
[vpre] Verifying vmnet devices are healthy...
[vpre] Preparing network adapters...
[vpre] Starting the VMware VM...
[vpre] Waiting for the VM to finish booting...
[vpre] The machine is booted and ready!
[vpre] Forwarding ports...
[vpre] -- 22 => 2222
[vpre] Setting hostname...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

service network restart

Stdout from the command:

Restarting network (via systemctl): [FAILED]

Stderr from the command:

Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.

Kels-MacBook-Pro:800 jxb2016$ vagrant ssh vpre
Last login: Mon Oct 28 12:30:44 2013 from url-fw03-websensedmz.homedepot.com
[vagrant@pre ~]$ sudo systemctl status network.service
network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since Mon 2013-10-28 14:13:51 EDT; 7min ago
Process: 2030 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

Oct 28 14:13:51 pre.p2v.vagrantup.com network[2030]: RTNETLINK answers: File exists
Oct 28 14:13:51 pre.p2v.vagrantup.com network[2030]: RTNETLINK answers: File exists
Oct 28 14:13:51 pre.p2v.vagrantup.com network[2030]: RTNETLINK answers: File exists
Oct 28 14:13:51 pre.p2v.vagrantup.com network[2030]: RTNETLINK answers: File exists
Oct 28 14:13:51 pre.p2v.vagrantup.com network[2030]: RTNETLINK answers: File exists
Oct 28 14:13:51 pre.p2v.vagrantup.com network[2030]: RTNETLINK answers: File exists
Oct 28 14:13:51 pre.p2v.vagrantup.com network[2030]: RTNETLINK answers: File exists
Oct 28 14:13:51 pre.p2v.vagrantup.com systemd[1]: network.service: control process exited, code=exited status=1
Oct 28 14:13:51 pre.p2v.vagrantup.com systemd[1]: Failed to start LSB: Bring up/down networking.
Oct 28 14:13:51 pre.p2v.vagrantup.com systemd[1]: Unit network.service entered failed state.
[vagrant@pre ~]$ sudo journalctl -xn
-- Logs begin at Mon 2013-08-05 17:58:43 EDT, end at Mon 2013-10-28 14:21:09 EDT. --
Oct 28 14:14:12 pre.p2v.vagrantup.com systemd[1]: Starting Stop Read-Ahead Data Collection...
-- Subject: Unit systemd-readahead-done.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit systemd-readahead-done.service has begun starting up.
Oct 28 14:14:12 pre.p2v.vagrantup.com systemd-journal[170]: Forwarding to syslog missed 22 messages.
-- Subject: One or more messages could not be forwarded to syslog
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/catalog/0027229ca0644181a76c4e92458afa2e

-- One or more messages could not be forwarded to the syslog service
-- running side-by-side with journald. This usually indicates that the
-- syslog implementation has not been able to keep up with the speed of
-- messages queued.
Oct 28 14:14:12 pre.p2v.vagrantup.com systemd[1]: Started Stop Read-Ahead Data Collection.
-- Subject: Unit systemd-readahead-done.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit systemd-readahead-done.service has finished starting up.

-- The start-up result is done.
Oct 28 14:16:38 pre.p2v.vagrantup.com avahi-daemon[734]: Invalid response packet from host 192.168.254.1.
Oct 28 14:19:08 pre.p2v.vagrantup.com avahi-daemon[734]: Invalid response packet from host 192.168.254.1.
Oct 28 14:20:54 pre.p2v.vagrantup.com sshd[2178]: Accepted publickey for vagrant from 192.168.254.1 port 51431 ssh2
Oct 28 14:20:54 pre.p2v.vagrantup.com systemd-logind[731]: New session 2 of user vagrant.
-- Subject: A new session 2 has been created for user vagrant
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat

-- A new session with the ID 2 has been created for the user vagrant.

-- The leading process of the session is 2178.
Oct 28 14:20:54 pre.p2v.vagrantup.com sshd[2178]: pam_unix(sshd:session): session opened for user vagrant by (uid=0)
Oct 28 14:21:01 pre.p2v.vagrantup.com sudo[2209]: vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/systemctl
Oct 28 14:21:09 pre.p2v.vagrantup.com sudo[2211]: vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/journalctl

@kelbyers

This comment has been minimized.

Show comment
Hide comment
@kelbyers

kelbyers Oct 28, 2013

After restoring my ~/.vagrant.d and ~/.gem from Time Machine, I still get the same error.

After reinstalling Vagrant 1.3.3 (without uninstalling 1.3.5), the networking starts up and configures correctly.

kelbyers commented Oct 28, 2013

After restoring my ~/.vagrant.d and ~/.gem from Time Machine, I still get the same error.

After reinstalling Vagrant 1.3.3 (without uninstalling 1.3.5), the networking starts up and configures correctly.

@kelbyers

This comment has been minimized.

Show comment
Hide comment
@kelbyers

kelbyers Nov 14, 2013

What's going on with this issue? It has been open for 3 weeks with no response.

kelbyers commented Nov 14, 2013

What's going on with this issue? It has been open for 3 weeks with no response.

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh Nov 25, 2013

Member

I have a feeling this is fixed in master since we did a lot of changes around networks on Fedora. However, I don't have a box to test it at the moment so I can't close this issue.

Member

mitchellh commented Nov 25, 2013

I have a feeling this is fixed in master since we did a lot of changes around networks on Fedora. However, I don't have a box to test it at the moment so I can't close this issue.

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh Nov 25, 2013

Member

Can you give me a minimal Vagrant file that reproduces this, as well?

Member

mitchellh commented Nov 25, 2013

Can you give me a minimal Vagrant file that reproduces this, as well?

@kelbyers

This comment has been minimized.

Show comment
Hide comment
@kelbyers

kelbyers Dec 2, 2013

I just created a MacOSX vm, installed vagrant 1.3.5, and installed vagrant-vmware-fusion 2.1.0 (the current default). I am unable to recreate this so far using those versions. I'll see if I can use different combinations of versions to recreate this issue.

kelbyers commented Dec 2, 2013

I just created a MacOSX vm, installed vagrant 1.3.5, and installed vagrant-vmware-fusion 2.1.0 (the current default). I am unable to recreate this so far using those versions. I'll see if I can use different combinations of versions to recreate this issue.

@mitchellh

This comment has been minimized.

Show comment
Hide comment
@mitchellh

mitchellh Dec 8, 2013

Member

This might be fixed with the latest version of Vagrant coming out (1.4). I'd like it to be tested there. I still don't have a minimal test case so I'm sorry I can't check this myself. Going to close for now since we can't recreate.

Member

mitchellh commented Dec 8, 2013

This might be fixed with the latest version of Vagrant coming out (1.4). I'd like it to be tested there. I still don't have a minimal test case so I'm sorry I can't check this myself. Going to close for now since we can't recreate.

@mitchellh mitchellh closed this Dec 8, 2013

@promisedlandt

This comment has been minimized.

Show comment
Hide comment
@promisedlandt

promisedlandt Dec 20, 2013

@mitchellh Sadly not fixed on 1.4.1 (didn't try 1.4.0).

Debug log

Example Vagrantfile

promisedlandt commented Dec 20, 2013

@mitchellh Sadly not fixed on 1.4.1 (didn't try 1.4.0).

Debug log

Example Vagrantfile

@marun

This comment has been minimized.

Show comment
Hide comment
@marun

marun Jan 13, 2014

I'm seeing this same problem on packer-built fedora 20, latest vagrant 1.4.3, vmware fusion driver. Somebody has also filed a duplicate bug: #2745

I think this issue deserves to be reopened.

marun commented Jan 13, 2014

I'm seeing this same problem on packer-built fedora 20, latest vagrant 1.4.3, vmware fusion driver. Somebody has also filed a duplicate bug: #2745

I think this issue deserves to be reopened.

@dverhelst

This comment has been minimized.

Show comment
Hide comment
@dverhelst

dverhelst commented Jan 15, 2014

+1.

@wusong

This comment has been minimized.

Show comment
Hide comment
@wusong

wusong Feb 28, 2014

http://www.server-world.info/en/note?os=Fedora_20&p=initial_conf&f=3
hello ,i have the same problem i
config the network like this and the problem dispare

wusong commented Feb 28, 2014

http://www.server-world.info/en/note?os=Fedora_20&p=initial_conf&f=3
hello ,i have the same problem i
config the network like this and the problem dispare

@davidpelaez

This comment has been minimized.

Show comment
Hide comment
@davidpelaez

davidpelaez Mar 20, 2014

So this was one was closed in favor of #2745 or has it been solved already? If so, what's the solution?

davidpelaez commented Mar 20, 2014

So this was one was closed in favor of #2745 or has it been solved already? If so, what's the solution?

@ndbroadbent

This comment has been minimized.

Show comment
Hide comment
@ndbroadbent

ndbroadbent Apr 3, 2014

+1, we are still experiencing this issue with Vagrant 1.5.2

ndbroadbent commented Apr 3, 2014

+1, we are still experiencing this issue with Vagrant 1.5.2

@jamesdbloom

This comment has been minimized.

Show comment
Hide comment
@jamesdbloom

jamesdbloom commented May 4, 2014

+1

@lsim

This comment has been minimized.

Show comment
Hide comment
@lsim

lsim Aug 3, 2016

+1 in Vagrant 1.8.5 (centos 7 guest):

==> default: Setting hostname...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

Update sysconfig

sed -i 's/(HOSTNAME=).*/\1cis-latest/' /etc/sysconfig/network

Update DNS

sed -i 's/(DHCP_HOSTNAME=)./\1"cis-latest"/' /etc/sysconfig/network-scripts/ifcfg-

Set the hostname - use hostnamectl if available

echo 'cis-latest' > /etc/hostname
if command -v hostnamectl; then
hostnamectl set-hostname --static 'cis-latest'
hostnamectl set-hostname --transient 'cis-latest'
else
hostname -F /etc/hostname
fi

Remove comments and blank lines from /etc/hosts

sed -i'' -e 's/#.*$//' -e '/^$/d' /etc/hosts

Prepend ourselves to /etc/hosts

grep -w 'cis-latest' /etc/hosts || {
sed -i'' '1i 127.0.0.1\tcis-latest\tcis-latest' /etc/hosts
}

Restart network

service network restart

Stdout from the command:

/bin/hostnamectl
Restarting network (via systemctl): [FAILED]

Stderr from the command:

Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

lsim commented Aug 3, 2016

+1 in Vagrant 1.8.5 (centos 7 guest):

==> default: Setting hostname...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

Update sysconfig

sed -i 's/(HOSTNAME=).*/\1cis-latest/' /etc/sysconfig/network

Update DNS

sed -i 's/(DHCP_HOSTNAME=)./\1"cis-latest"/' /etc/sysconfig/network-scripts/ifcfg-

Set the hostname - use hostnamectl if available

echo 'cis-latest' > /etc/hostname
if command -v hostnamectl; then
hostnamectl set-hostname --static 'cis-latest'
hostnamectl set-hostname --transient 'cis-latest'
else
hostname -F /etc/hostname
fi

Remove comments and blank lines from /etc/hosts

sed -i'' -e 's/#.*$//' -e '/^$/d' /etc/hosts

Prepend ourselves to /etc/hosts

grep -w 'cis-latest' /etc/hosts || {
sed -i'' '1i 127.0.0.1\tcis-latest\tcis-latest' /etc/hosts
}

Restart network

service network restart

Stdout from the command:

/bin/hostnamectl
Restarting network (via systemctl): [FAILED]

Stderr from the command:

Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment