Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-6375

Webserver returns 500 when running Airflow behind a reverse proxy

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.10.7
    • Fix Version/s: None
    • Component/s: webserver
    • Labels:
      None

      Description

      When running with:

       

      [webserver]
      enable_proxy_fix = True

       

      proxy_fix_x_for is being setup/converted to str at some point causing the following TypeError:

      [2019-12-27 19:44:59 +0000] [34] [ERROR] Error handling request /
      Traceback (most recent call last):
        File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle
          self.handle_request(listener, req, client, addr)
        File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
          respiter = self.wsgi(environ, resp.start_response)
        File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/dispatcher.py", line 66, in __call__
          return app(environ, start_response)
        File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in __call__
          return self.wsgi_app(environ, start_response)
        File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 195, in __call__
          x_for = self._get_trusted_comma(self.x_for, environ_get("HTTP_X_FORWARDED_FOR"))
        File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 166, in _get_trusted_comma
          if len(values) >= trusted:
      TypeError: '>=' not supported between instances of 'int' and 'str'
      

       

      Reverting Airflow to version 1.10.6 solved the issue.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mschilman Mauro Schilman
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: