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 fetch some archives' error while 'Installing SSHFS client' #67

Closed
mattarau opened this issue Jan 30, 2017 · 6 comments
Closed

Comments

@mattarau
Copy link

mattarau commented Jan 30, 2017

EDIT: Ubuntu guest only


Hello,

Since yesterday I‘ve been getting this error when setting up new Ubuntu and Debian VMs with the vagrant-sshfs plugin:

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

apt-get install -y sshfs

Stdout from the command:

Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  fuse libglib2.0-0 libglib2.0-data libxml2 sgml-base shared-mime-info
  xml-core
Suggested packages:
  sgml-base-doc debhelper
The following NEW packages will be installed:
  fuse libglib2.0-0 libglib2.0-data libxml2 sgml-base shared-mime-info sshfs
  xml-core
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,262 kB of archives.
After this operation, 11.2 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libglib2.0-0 amd64 2.40.2-0ubuntu1 [1,058 kB]
Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.6
  404  Not Found [IP: 91.189.91.26 80]
Err http://security.ubuntu.com/ubuntu/ trusty-security/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.6
  404  Not Found [IP: 91.189.88.152 80]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main sgml-base all 1.26+nmu4ubuntu1 [12.5 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main fuse amd64 2.9.2-4ubuntu4.14.04.1 [25.1 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libglib2.0-data all 2.40.2-0ubuntu1 [116 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ trusty/main shared-mime-info amd64 1.2-0ubuntu3 [415 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ trusty/main xml-core all 0.13+nmu2 [23.3 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ trusty/main sshfs amd64 2.5-1ubuntu1 [41.7 kB]
Fetched 1,691 kB in 2s (620 kB/s)


Stderr from the command:

stdin: is not a tty
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2_2.9.1+dfsg1-3ubuntu4.6_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

As the error suggested, I‘ve ssh-ed into the guest machine and ran sudo apt-get update --fix-missing. Then exit, vagrant reload and everything went fine:

...
==> default: Installing SSHFS client...
==> default: Mounting SSHFS shared folder...
==> default: Mounting folder via SSHFS: [host-folder-path] => [guest-folder-path]
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Folder Successfully Mounted!
...

I‘m not sure if just running sudo apt-get update --fix-missing when this error happens would be an ideal solution, but I saw that something similar has already been done for Arch.

I glad to send a PR, but I probably need to first discuss what‘s the best approach, since I don‘t have much experience developing vagrant plugins.

Cheers!

@dustymabe
Copy link
Owner

Hi, thanks for the report. I've been traveling the past few days. Please ping me again in a week if I haven't looked into this.

@dustymabe
Copy link
Owner

this works fine on debian/jessie64. Ubuntu doesn't make libvirt images (only vbox) and I don't have a virtualbox setup to try this on right now. Can you see if the problem happens on debian for you?

@mattarau
Copy link
Author

mattarau commented Feb 2, 2017

Hey @dustymabe,

I‘ve tested it with debian/jessie64 (also with debian/wheezy64 and minimal/wheezy64) and this error is not happening. It actually had a different error and I opened a separated issue for it: #71

The problem above seems to happen only on Ubuntu, since the actual error on the messages are:

...
Err http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.6
  404  Not Found [IP: 91.189.91.26 80]
Err http://security.ubuntu.com/ubuntu/ trusty-security/main libxml2 amd64 2.9.1+dfsg1-3ubuntu4.6
  404  Not Found [IP: 91.189.88.152 80]
...
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2_2.9.1+dfsg1-3ubuntu4.6_amd64.deb  404  Not Found [IP: 91.189.88.152 80]

This is probably because some boxes are old and haven‘t been updated for a while, so their packages list is not updated with Ubuntu‘s repository (more about this here).

So, I‘m pretty sure it might be solved by running apt-get update before apt-get install -y sshfs.

Let me know if you need more info.

Cheers!

@dustymabe
Copy link
Owner

Thanks for the info. I'll try to get a system with vbox and test ubuntu and make the relevant changes.

@dustymabe
Copy link
Owner

so I tested with ubuntu and did not see the issue (see output below). Is your ubuntu vagrant image up to date? I tested with the one that was built 20170202.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Setting the name of the VM: ubuntu_default_1486524122144_35361
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: When using virtualbox, a non-NAT network interface is required.
==> default: Adding a private network using DHCP
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Remote connection disconnect. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.3.36
    default: VirtualBox Version: 5.0
==> default: Configuring and enabling network interfaces...
==> default: Installing SSHFS client...
==> default: Mounting SSHFS shared folder...
==> default: Mounting folder via SSHFS: C:/cygwin64/tmp/ubuntu => /vagrant
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Folder Successfully Mounted!

@dustymabe
Copy link
Owner

hey @mdentinho - i'm going to close this for now. Please re-open and add more information if you can still reproduce the issue.

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