Packer errors out trying to parse SSH port

26 views
Skip to first unread message

Nate

unread,
Mar 18, 2019, 11:54:05 AM3/18/19
to Packer
My host is Windows and I'm trying to use a Vagrant builder. I have no provisioners specified. Very basic. I get the following error. It does not repro on a Mac host and I get the below error on 2 separate Windows machines. I tried hardcoding the port w/ my own build of packer but then the SSH step times out after doing that. I have verified that `Vagrant SSH` will successfully get to the machine VM so I know it's in a healthy state. I suspect it may not be using Vagrant SSH for this step but I'm unsure. Any help is appreciated.


Debug mode enabled. Builds will not be parallelized.
vagrant output will be in this color.

==> vagrant: Pausing after run of step 'StepOutputDir'. Press enter to continue.
==> vagrant: Creating a Vagrantfile in the build directory...
==> vagrant: Pausing after run of step 'StepCreateVagrantfile'. Press enter to continue.
==> vagrant: Adding box using vagrant box add..
==> vagrant: Pausing after run of step 'StepAddBox'. Press enter to continue.
==> vagrant: Calling Vagrant Up...
==> vagrant: Pausing after run of step 'StepUp'. Press enter to continue.
==> vagrant: Pausing before cleanup of step 'StepUp'. Press enter to continue.
==> vagrant: destroying Vagrant box...
==> vagrant: Pausing before cleanup of step 'StepAddBox'. Press enter to continue.
==> vagrant: Pausing before cleanup of step 'StepCreateVagrantfile'. Press enter to continue.
==> vagrant: Pausing before cleanup of step 'StepOutputDir'. Press enter to continue.
==> vagrant: Deleting output directory...
Build 'vagrant' errored: strconv.Atoi: parsing "2222\r": invalid syntax

==> Some builds didn't complete successfully and had errors:
--> vagrant: strconv.Atoi: parsing "2222\r": invalid syntax

==> Builds finished but no artifacts were created.

Megan Marsh

unread,
Mar 20, 2019, 10:21:51 AM3/20/19
to packe...@googlegroups.com
Hi, Nate.  This looks like a line ending problem-- we're having trouble grabbing the port because we're not stripping whitespace properly. Can you open a github issue on https://github.com/hashicorp/packer/issues for me?  This should be a pretty quick fix.

Nate

unread,
Mar 20, 2019, 12:21:25 PM3/20/19
to Packer
Thanks Megan, issue submitted - https://github.com/hashicorp/packer/issues/7428 
Reply all
Reply to author
Forward
0 new messages