On 6/13/19 6:51 PM, James E Keenan wrote:
On 6/13/19 6:09 PM, Brian Cain wrote:


On Thu, Jun 13, 2019 at 12:49 PM James E Keenan <[email protected] <mailto:[email protected]>> wrote:

    On 6/13/19 11:15 AM, Brian Cain wrote:
     >
     >
     > On Wed, Jun 12, 2019 at 10:57 PM James E Keenan
    <[email protected] <mailto:[email protected]>
     > <mailto:[email protected] <mailto:[email protected]>>> wrote:
     >
     >     On 6/12/19 5:37 PM, Brian Cain wrote:
     >      > Hey there,
     >      >
     >      > Do you have a full debug log showing this provisioning
    behavior
     >     when you
     >      > run Vagrant up or vagrant provision? Thanks!
     >
     >     I haven't been able to locate any logging for Vagrant (only for
     >     VirtualBox).  Where would I find that?
     >
     >
     > It's only enabled when you use the flag. So you'll need to rerun
    your
     > command with --debug then capture the output.
     >
     >


    Thank you very much for that suggestion.

    As a basis for comparison, I ran 'vagrant provision --debug' and logged
    the output in each of *two* VMs:  the first being the problematic
    FreeBSD-12 VM, the second a FreeBSD-13 VM we have been using for
    several
    months without incident.  The Vagrantfiles in each are similarly
    structured, i.e., each uses a shell script for provisioning.  The
    Vagrantfile for the FreeBSD-13VM has real content in its shell script
    and completes successfully.

    In each of the two log files, the following is the first 'ERROR'
    line to
    appear:

    #####
    E, [datestamp #id] ERROR -- net.ssh.authentication.agent[404b67954]:
    could not connect to ssh-agent: Agent not configured
    #####

    In the FreeBSD-13 VM, this is the *only* 'ERROR' message in the log.
    Please see attachment freebsd13.following.ERROR.txt for how 'vagrant
    provision' recovered from this.  (The expected STDOUT begins at the end
    of this excerpt.)

    In the FreeBSD-12 VM, this is the first of 11 'ERROR' messages in the
    log (though many of the instances are repeats).  Please see attachment
    freebsd12.following.ERROR.txt.

    What seems to be the first instance of real failure is these lines from
    the FreeBSD-12 debug log:

    #####
       INFO ssh: Execute: chown -R vagrant /tmp/vagrant-shell (sudo=true)
    DEBUG ssh: stderr: sudo
    DEBUG ssh: stderr: :
    DEBUG ssh: stderr: no tty present and no askpass program specified
    DEBUG ssh: stderr:

    DEBUG ssh: Exit status: 1
    #####


I think this is a fairly common issue, and might just be an issue with how that box has setup the root account? I believe this error is essentially saying that it's trying to run the script as root but there is no configured shell to be used on the root account. I'm guessing maybe if you update the root account to be able to allocate a shell, the error should go away?



This is what I have for the key users on each of 2 VMs.  FreeBSD-12 is not working.  FreeBSD-13 is working.

#####
$ uname -mrs;grep -E '^(root|vagrant)' /etc/passwd | cut -d ':' -f1,7
FreeBSD 12.0-RELEASE-p4 amd64
root:/bin/csh
vagrant:/usr/local/bin/bash

% uname -mrs;grep -E '^(root|vagrant)' /etc/passwd | cut -d ':' -f1,7
FreeBSD 13.0-CURRENT amd64
root:/bin/csh
vagrant:/bin/csh
######

Could it be that the vagrant user's shell must be /bin/csh?

Well, in the faulty FreeBSD-12 VM, I changed user 'vagrant's shell to /bin/csh. I then exited the VM and called 'vagrant provision --debug' and logged the output.

I got no improvement.  Once again I got:

#####
DEBUG ssh: == Net-SSH connection debug-level log END ==
 INFO ssh: Execute: chown -R vagrant /tmp/vagrant-shell (sudo=true)
DEBUG ssh: stderr: sudo
DEBUG ssh: stderr: :
DEBUG ssh: stderr: no tty present and no askpass program specified
DEBUG ssh: stderr:
#####


    The corresponding lines in the FreeBSD-13 VM debug line are:

    #####
    DEBUG ssh: == Net-SSH connection debug-level log END ==
       INFO ssh: Execute: chown -R vagrant /tmp/vagrant-shell (sudo=true)
    DEBUG ssh: stderr: 41e57d38-b4f7-4e46-9c38-13873d338b86-vagrant-ssh
    DEBUG ssh: Exit status: 0
    DEBUG ssh: Uploading: /tmp/vagrant-shell20190613-60554-odqtcv.ps1 to
    /tmp/vagrant-shell
    DEBUG ssh: Re-using SSH connection.
    #####

    I can supply complete debug logs off-line upon request.

    So, can you suggest what is going wrong in the FreeBSD-12 VM (taking
    into consideration that several days ago I did achieve one successful
    provisioning of this VM) and how to remedy it?

    Thank you very much.
    Jim Keenan

    --

Thank you very much.
Jim Keenan


--
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/5f1746c1-f749-934d-b772-0c688f2a2768%40pobox.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to