HEAD request to http://$API_HOST:5240/MAAS returns Internal Server Error

Bug #1819955 reported by Nikolay Vinogradov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Unassigned

Bug Description

I've installed MAAS 2.5 in LXD container (bionic) inside KVM Ubuntu 18.04.2 Server VM.

I started from with instructions from: https://docs.maas.io/2.5/en/installconfig-lxd-install inside KVM VM.

Then inside LXD container, according to: https://docs.maas.io/2.5/en/installconfig-package-install:
$ sudo apt-add-repository -yu ppa:maas/stable
$ sudo apt install maas
$ sudo maas createadmin --username=admin --email=root@localhost
$ maas createadmin --username=admin --email=root@localhost
Password:
Again:
Import SSH keys [] (lp:user-id or gh:user-id):
$

Then as it is stated in https://docs.maas.io/2.5/en/installconfig-webui:
$ api_host=localhost
$ export api_host
$ curl http://$api_host:5240/MAAS
<html>
  <head><title>405 - Method Not Allowed</title></head>
  <body>
    <h1>Method Not Allowed</h1>
    <p>Your browser approached me (at /MAAS) with the method "GET". I only allow the method HEAD here.</p>
  </body>
</html>
$

Ok, we try HEAD as MAAS suggests:
$ curl -I http://$api_host:5240/MAAS
HTTP/1.1 500 Internal Server Error
Server: TwistedWeb/17.9.0
Date: Wed, 13 Mar 2019 17:55:00 GMT
Content-Type: text/html
Content-Length: 5276
$

Tags: track
Revision history for this message
Nikolay Vinogradov (nikolay.vinogradov) wrote :

Adding maas logs

Changed in maas:
milestone: none → 2.6.0alpha2
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Can you try with a ending '/' in the URL?

Revision history for this message
Nikolay Vinogradov (nikolay.vinogradov) wrote :

Works:

root@bionic-maas:~# curl -I http://$api_host:5240/MAAS/
HTTP/1.1 302 Found
Server: TwistedWeb/17.9.0
Date: Wed, 13 Mar 2019 19:21:02 GMT
Content-Type: text/html; charset=utf-8
Location: /MAAS/accounts/login/?next=%2FMAAS%2F
Content-Length: 0
Vary: Cookie

Changed in maas:
milestone: 2.6.0alpha2 → 2.6.0beta1
Changed in maas:
milestone: 2.6.0beta1 → 2.6.0beta2
Changed in maas:
assignee: nobody → Blake Rouse (blake-rouse)
Changed in maas:
milestone: 2.6.0beta2 → 2.6.0rc1
tags: added: track
Changed in maas:
status: Triaged → In Progress
Changed in maas:
milestone: 2.6.0rc1 → 2.6.0beta4
Changed in maas:
milestone: 2.6.0beta4 → 2.6.0rc1
Changed in maas:
milestone: 2.6.0rc1 → 2.6.0rc2
milestone: 2.6.0rc2 → 2.6.0rc1
Changed in maas:
milestone: 2.6.0rc1 → 2.6.0rc2
Changed in maas:
status: In Progress → Triaged
Changed in maas:
milestone: 2.6.0rc2 → 2.7.0alpha1
no longer affects: maas/2.5
Changed in maas:
assignee: Blake Rouse (blake-rouse) → nobody
milestone: 2.7.0alpha1 → none
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

This got fixed sometime between 2.5 and now. Can you try to reproduce the issue on a more recent MAAS?

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Jacopo Rota (r00ta) wrote :

3.2 is working fine. Just to be precise, now `/MAAS/` redirects to `/MAAS/r` and then it works.

Revision history for this message
Anton Troyanov (troyanov) wrote :

Checked 3.2 and 3.3 and everything works fine.

Changed in maas:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.