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

vbox: Ubuntu 16.04 (Inappropriate ioctl for device) #665

Closed
SebTM opened this issue Sep 23, 2016 · 21 comments
Closed

vbox: Ubuntu 16.04 (Inappropriate ioctl for device) #665

SebTM opened this issue Sep 23, 2016 · 21 comments

Comments

@SebTM
Copy link

SebTM commented Sep 23, 2016

Hello,

i still get "==> default: mesg: ttyname failed: Inappropriate ioctl for device" everytime vagrant starts a provision-script. I have the latest vagrant-version 1.8.5 on Mac OS X El Capitan.

Can I solve this?

Thanks!

@cheeseplus
Copy link
Contributor

Hello,

We're going to need a bit more detail to assist here. That bug, iirc, was related to issues with a specific Vagrant version. Perhaps you could post a bit more complete log and provider the version of the box you are using (vagrant box list).

@SebTM
Copy link
Author

SebTM commented Sep 23, 2016

Hello,

i will do my best to give you more informations. The message comes up everytime like this:

==> default: Running provisioner: shell...
default: Running: /var/folders/6t/nvkxb1yx0xd9hdwh2jc0zm2m0000gn/T/vagrant-shell20160923-4668-3p1dbo.sh
==> default: mesg: ttyname failed:
==> default: Inappropriate ioctl for device

But it is unrealted to the provision shell-script because it happend everytime on every script!

~ vagrant box list
bento/ubuntu-16.04 (virtualbox, 2.2.9)

I installed it today. Can you tell me which other logs you need and where to find them?

@cheeseplus
Copy link
Contributor

What version of virtualbox and vagrant please? (just to verify the CLI output as vbox doesn't always uninstall properly)

@SebTM
Copy link
Author

SebTM commented Sep 23, 2016

~ VBoxManage --version
5.1.6r110634

~ vagrant --version
Vagrant 1.8.5

Latest virtualbox-extension is also installed.

@cheeseplus
Copy link
Contributor

Try with the latest boxes (2.3.0) which is built with Vbox 5.1

@cheeseplus cheeseplus changed the title Ubuntu 16.04 vbox: Ubuntu 16.04 (Inappropriate ioctl for device) Oct 2, 2016
@SebTM
Copy link
Author

SebTM commented Oct 5, 2016

It still happens with the new version (==> default: mesg: ttyname failed: Inappropriate ioctl for device)

I also get sometimes "==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directory" e.g. while insalling kibana:

==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following NEW packages will be installed:
==> default: kibana
==> default: 0 upgraded, 1 newly installed, 0 to remove and 8 not upgraded.
==> default: Need to get 33.6 MB of archives.
==> default: After this operation, 125 MB of additional disk space will be used.
==> default: Get:1 http://packages.elastic.co/kibana/4.5/debian stable/main amd64 kibana amd64 4.5.4 [33.6 MB]
==> default: dpkg-preconfigure: unable to re-open stdin: No such file or directory
==> default: Fetched 33.6 MB in 18s (1,824 kB/s)
==> default: Selecting previously unselected package kibana.
==> default: (Reading database ...
==> default: (Reading database ... 5%
==> default: (Reading database ... 10%
==> default: (Reading database ... 15%

@SebTM
Copy link
Author

SebTM commented Oct 5, 2016

Sometimes in this "format":

==> default: mesg:
==> default: ttyname failed
==> default: :
==> default: Inappropriate ioctl for device

@cheeseplus
Copy link
Contributor

cheeseplus commented Oct 9, 2016

Have you tried upgrading to vagrant 1.8.6? I'm not sure what the other error has to do with this if anything.

The error related to stdin is likely coming from the shell provisioner commands as you aren't passing export DEBIAN_FRONTEND=noninteractive which is likely the fix as per http://serverfault.com/questions/500764/dpkg-reconfigure-unable-to-re-open-stdin-no-file-or-directory

@SebTM
Copy link
Author

SebTM commented Oct 11, 2016

Thx for your reply. Upgrading to vagrant 1.8.6 did not change this. I will have a look at the second part soon.

@PlugIN73
Copy link

PlugIN73 commented Oct 26, 2016

Have this issue too on MacOS X Sierra

MacBook-Pro-user:bento plugin73$ vagrant box list
bento/ubuntu-16.04 (virtualbox, 2.3.0)

MacBook-Pro-user:bento plugin73$ vagrant version
Installed Version: 1.8.6
Latest Version: 1.8.6

MacBook-Pro-user:bento plugin73$ VBoxManage --version
5.1.8r111374

This is log of vagrant up:

ERROR vagrant: The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

set -e
mkdir -p /vagrant
mount -o vers=3,udp 192.168.139.1:/Users/plugin73/vagrant/hexlet-box/bento /vagrant
if command -v /sbin/init && /sbin/init --version | grep upstart; then
  /sbin/initctl emit --no-wait vagrant-mounted MOUNTPOINT=/vagrant
fi

Stdout from the command:

Stderr from the command:

mesg: ttyname failed: Inappropriate ioctl for device
mount.nfs: Connection timed out

Some first vagrant up && restart was successful, but now I can't up my box during this error.

@SebTM
Copy link
Author

SebTM commented Oct 26, 2016

Hmm, I had this sometimes when destroying-vm and provision it again. It seems that "exports" under "/etc/exports" were not cleared correctly. After removing anything from there and rebooting my mac it works again.

I don't think your "mesg: ttyname failed: Inappropriate ioctl for device" is related to the nfs error.

@PlugIN73
Copy link

@SebTM thank you! I just cleaned /etc/exports on my mac and restart it. After I tried to start vagrant and it stucked yet with the same logs...

@cheeseplus
Copy link
Contributor

So can I consider this closed as it's external to bento?

@PlugIN73
Copy link

PlugIN73 commented Oct 27, 2016

I think, my issue consider to vagrant 1.8.6 because after I reverted it to 1.8.5 and reinit my box I can't replay it. Tnx all!

@SebTM
Copy link
Author

SebTM commented Oct 27, 2016

@cheeseplus I can't test at the moment if the problem is solved by downgrading vagrant

@cheeseplus
Copy link
Contributor

Closing this one as it doesn't seem specific to the bento boxes, more vagrant configuration and NFS. Feel free to open another issue if it's something specific to a bento build.

@ghost
Copy link

ghost commented Jan 11, 2017

Funny, Vagrant says just the opposite. hashicorp/vagrant#7155

It seems to me like they are saying "bento is doing it right," but I am seeing that other people have had the same issue even with the bento boxes.

@agabert
Copy link

agabert commented Apr 25, 2017

this happens to me when i call scripts with #!/usr/bin/env bash instead of #!/bin/bash

s.vm.provision :shell, path: "scripts/sbin/bootstrap.sh"

if the shebang in this bootstrap.sh file is #!/usr/bin/env bash then i can reproduce the above error with Inappropriate ioctl for device on my MBP

@jchook
Copy link

jchook commented May 10, 2017

I had the "mesg: ttyname failed: Inappropriate ioctl for device" issue with Vagrant 1.9.1 but it was fixed by upgrading to 1.9.4, in case anyone is googling this.

@Gundars
Copy link

Gundars commented Sep 21, 2017

Nope, 1.9.7, still happening

@lastsky
Copy link

lastsky commented May 26, 2018

 Vagrant.configure("2") do |config|
+  config.ssh.shell="bash"
   config.vm.box = "ubuntu/xenial64"
   config.vm.provider "virtualbox" do |v|
     v.customize [ "modifyvm", :id, "--memory", 2048 ]
     v.customize [ "modifyvm", :id, "--cpus", 2 ]
   end

solves this for me on mac os x.

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

7 participants