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

Vagrant Up Fails for SMB Share with JSONParseError #3229

Closed
balajisivaraman opened this issue Mar 15, 2014 · 4 comments
Closed

Vagrant Up Fails for SMB Share with JSONParseError #3229

balajisivaraman opened this issue Mar 15, 2014 · 4 comments

Comments

@balajisivaraman
Copy link

Hi,

I am trying to set up an SMB share on a Windows 8 machine with a Ubuntu 12.04 LTS Guest VM, and it fails with the following error.

C:\Coding\Ruby\discourse [master...origin/master +0 ~1 -0]> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Preparing SMB shared folders...
    default: You will be asked for the username and password to use for the SMB
    default: folders shortly. Please use the proper username/password of your
    default: Windows account.
    default:
    default: Username: Balaji Sivaraman
    default: Password (will be hidden):
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 3000 => 4000 (adapter 1)
    default: 1080 => 4080 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: 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.2.0
    default: VirtualBox Version: 4.3
==> default: Configuring and enabling network interfaces...
==> default: Mounting SMB shared folders...
 (JSON::ParserError)p/Vagrant/embedded/lib/ruby/2.0.0/json/common.rb:155:in `parse': 757: unexpected token at 'C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/synced_folders/smb/scripts/host_info.ps1
'
        from C:/Software/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/json/common.rb:155:in `parse'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/synced_folders/smb/synced_folder.rb:140:in `load_host_ips'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/synced_folders/smb/synced_folder.rb:94:in `enable'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/synced_folders.rb:75:in `block in call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/synced_folders.rb:73:in `each'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/synced_folders.rb:73:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/synced_folders/nfs/action_cleanup.rb:19:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:118:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/env_set.rb:19:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/provision.rb:76:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builder.rb:116:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `block in run'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `run'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/call.rb:51:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builder.rb:116:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `block in run'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `run'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/call.rb:51:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builder.rb:116:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `block in run'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `run'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/call.rb:51:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/box_check_outdated.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/call.rb:57:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builtin/call.rb:57:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/builder.rb:116:in `call'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `block in run'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/action/runner.rb:69:in `run'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/machine.rb:157:in `action'
        from C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/batch_action.rb:72:in `block (2 levels) in run'
C:\Coding\Ruby\discourse [master...origin/master +0 ~1 -0]>

At first, I thought this was maybe an issue with the unavailability of SMBS/CIFS on the Guest. But even if I install cifs-utils on the Ubuntu VM, I keep getting the same error. And I am running it in a Cmd Prompt/Powershell window with Adminstrative privileges, so that cannot be the issue.

I don't know whether it is relevant, but the username I enter above is a Windows Live username which I use to login to my Windows machine.

Any advice? Thanks in advance.

@kikitux
Copy link
Contributor

kikitux commented Mar 17, 2014

On Sun, Mar 16, 2014 at 2:31 AM, Balaji Sivaraman
notifications@git.luolix.topwrote:

==> default: Mounting SMB shared folders...
(JSON::ParserError)p/Vagrant/embedded/lib/ruby/2.0.0/json/common.rb:155:in
`parse': 757: unexpected token at
'C:/Software/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.5.1/plugins/synced_folders/smb/scripts/host_info.ps1

does that file looks like this one?

https://github.com/mitchellh/vagrant/blob/master/plugins/synced_folders/smb/scripts/host_info.ps1

@balajisivaraman
Copy link
Author

@kikitux Yup! That is exactly how host_info.ps1 looks on my machine.

@crankeye
Copy link

Duplicates #3192
Fixed by #3210

@mitchellh
Copy link
Contributor

Yep! Thanks @crankeye

@ghost ghost locked and limited conversation to collaborators Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants