Linux Vagrant environment has frequent Proxy Error

RESOLVED FIXED

Status

Mozilla Developer Network
Setup / Install
--
minor
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jwhitlock, Unassigned)

Tracking

({in-triage})

Details

(Whiteboard: [specification][type:bug])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
What did you do?
================
Load https://developer-local.allizom.org/en-US/dashbaords/revisions in a browser

What happened?
==============
A proxy error is returned:

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /mwsgi/en-US/dashboards/revisions

Reason: DNS lookup failure for: localhost

Apache/2.4.7 (Ubuntu) Server at developer-local.allizom.org Port 443

What should have happened?
==========================
The dashboard running in the Vagrant VM should be displayed

Is there anything else we should know?
======================================
Re-running "vagrant provision" fixes the error.  Reported by Caktus contractor.
(Reporter)

Comment 1

2 years ago
Created attachment 8758264 [details]
proxy_error_kuma.png

Screenshot of Proxy Error in Chrome
Severity: normal → minor
Keywords: in-triage

Comment 2

2 years ago
The underlying problem here is that Vagrant is mangling the localhost line in the VM's /etc/hosts, see https://github.com/mitchellh/vagrant/issues/7263#issuecomment-224109329

I've satisfied myself that this is actually what is taking place by editing the comment in provisioning/roles/kuma/files/etc/hosts, doing a `vagrant provision`, then halting and upping the VM.  The /etc/hosts file will still have my addition to the comment, but localhost will be missing.

Comment 3

2 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/c1ef4789d0b2113088f7bc196a77ee749fdabdc2
fix bug 1276929 - Unset config.vm.hostname in the Vagrantfile

Having this option set (currently) causes Vagrant to destructively
edit the guest's /etc/hosts file, removing the localhost alias for
127.0.0.1.

This option shouldn't be needed, since the kuma role is copying over
/etc/hostname anyway.

https://github.com/mozilla/kuma/commit/e72e9341f7dad42154c5c4c561db303bf889d17c
Merge pull request #3898 from caktus/fix-vagrant-etc-hosts-1276929

fix bug 1276929 - Unset config.vm.hostname in the Vagrantfile

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.