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 #1178

Closed
levlaz opened this Issue Nov 2, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@levlaz

levlaz commented Nov 2, 2017

MacOS 10.12.6
Vagrant: Installed Version: 1.9.7
Virtualbox: Version 5.1.24 r117012

I tried to run vagrant up from the latest master and it failed to create the database properly.

Full log output:

Levs-iMac:pythondotorg levlaz$ 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: A newer version of the box 'ubuntu/trusty64' is available! You currently
==> default: have version '20171030.0.0'. The latest is version '20171030.0.1'. Run
==> default: `vagrant box update` to update.
==> default: Setting the name of the VM: pythondotorg_default_1509594353978_43981
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) en1: Wi-Fi (AirPort)
2) en0: Ethernet
3) en2: Thunderbolt 1
4) en3: Thunderbolt 13
5) p2p0
6) awdl0
7) bridge0
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
    default: Which interface should the network bridge to? 1
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: bridged
==> default: Forwarding ports...
    default: 8000 (guest) => 8001 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (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:
    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.1
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /home/vagrant/pythondotorg => /Users/levlaz/git/pythondotorg
==> default: Running provisioner: ansible...
    default: Running ansible-playbook...
[DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and
make sure become_method is 'sudo' (default). This feature will be removed in
version 2.6. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
 [WARNING]: Ignoring invalid attribute: sudo

 [WARNING]: Ignoring invalid attribute: sudo_user


PLAY [Create a pythondotorg VM via Vagrant] ************************************

TASK [Gathering Facts] *********************************************************
ok: [default]

TASK [Run apt-get update] ******************************************************
changed: [default]

TASK [Install base packages] ***************************************************
changed: [default] => (item=[u'build-essential', u'libpq-dev', u'libxml2-dev', u'libxslt-dev', u'lib32z1-dev', u'git', u'python3', u'python3-dev', u'python-setuptools', u'python-pip', u'ruby'])

TASK [Install base Python packages] ********************************************
changed: [default]

TASK [Install python-lxml deps] ************************************************
changed: [default]

TASK [Install base Ruby packages] **********************************************
changed: [default]

TASK [Install PostgreSQL] ******************************************************
changed: [default] => (item=[u'postgresql', u'postgresql-contrib', u'libpq-dev', u'python-psycopg2'])

TASK [Ensure the PostgreSQL service is running] ********************************
ok: [default]

TASK [Ensure database is created] **********************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: OperationalError: FATAL:Peer authentication failed for user "postgres"
fatal: [default]: FAILED! => {"changed": false, "failed": true, "msg": "unable to connect to database: FATAL:  Peer authentication failed for user \"postgres\"\n"}
        to retry, use: --limit @/Users/levlaz/git/pythondotorg/provisioning/pythondotorg.retry

PLAY RECAP *********************************************************************
default                    : ok=8    changed=6    unreachable=0    failed=1

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Nov 2, 2017

Member

Thank you for the report. This may be related to these warnings:

 [WARNING]: Ignoring invalid attribute: sudo

 [WARNING]: Ignoring invalid attribute: sudo_user

Can you do vagrant ssh and check that the postgres user does exist?

Member

berkerpeksag commented Nov 2, 2017

Thank you for the report. This may be related to these warnings:

 [WARNING]: Ignoring invalid attribute: sudo

 [WARNING]: Ignoring invalid attribute: sudo_user

Can you do vagrant ssh and check that the postgres user does exist?

@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Nov 2, 2017

Member

FYI, I almost make this work. However, I need to upgrade our box to 16.04 LTS because we need PostgreSQL 9.4+.

Member

berkerpeksag commented Nov 2, 2017

FYI, I almost make this work. However, I need to upgrade our box to 16.04 LTS because we need PostgreSQL 9.4+.

@levlaz

This comment has been minimized.

Show comment
Hide comment
@levlaz

levlaz Nov 2, 2017

levlaz commented Nov 2, 2017

@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Nov 2, 2017

Member

Ansible 1.9.6 IIRC.

Member

berkerpeksag commented Nov 2, 2017

Ansible 1.9.6 IIRC.

@berkerpeksag

This comment has been minimized.

Show comment
Hide comment
@berkerpeksag

berkerpeksag Nov 2, 2017

Member

@levlaz could you please try PR #1182?

Member

berkerpeksag commented Nov 2, 2017

@levlaz could you please try PR #1182?

berkerpeksag added a commit to berkerpeksag/pythondotorg that referenced this issue Nov 3, 2017

berkerpeksag added a commit to berkerpeksag/pythondotorg that referenced this issue Nov 3, 2017

@berkerpeksag berkerpeksag closed this in #1182 Nov 3, 2017

berkerpeksag added a commit to berkerpeksag/pythondotorg that referenced this issue Sep 12, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment