You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Matthias (JIRA)" <ji...@apache.org> on 2018/08/28 14:57:00 UTC

[jira] [Commented] (AIRFLOW-2190) base_url with a subpath generates TypeError

    [ https://issues.apache.org/jira/browse/AIRFLOW-2190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16595096#comment-16595096 ] 

Matthias commented on AIRFLOW-2190:
-----------------------------------

I'm seeing the same problem but with version 1.10, installed from pypi.

 
{code:java}
[2018-08-28 14:53:46 +0000] [99] [ERROR] Error handling request /admin/
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/wsgi.py", line 826, in __call__
return app(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/airflow/www/app.py", line 173, in root_app
resp(b'404 Not Found', [(b'Content-Type', b'text/plain')])
File "/usr/local/lib/python3.6/site-packages/gunicorn/http/wsgi.py", line 253, in start_response
self.process_headers(headers)
File "/usr/local/lib/python3.6/site-packages/gunicorn/http/wsgi.py", line 260, in process_headers
raise TypeError('%r is not a string' % name)
TypeError: b'Content-Type' is not a string

{code}
 

> base_url with a subpath generates TypeError
> -------------------------------------------
>
>                 Key: AIRFLOW-2190
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2190
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: webserver
>    Affects Versions: 1.9.0
>            Reporter: John Arnold
>            Priority: Major
>
> I'm running into what looks like a bug in airflow webserver. Running against master:
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: [2018-03-07 18:20:13 +0000] [102] [ERROR] Error handling request /
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: Traceback (most recent call last):
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: self.handle_request(listener, req, client, addr)
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: respiter = self.wsgi(environ, resp.start_response)
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: File "/usr/local/lib/python3.6/site-packages/werkzeug/wsgi.py", line 826, in call
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: return app(environ, start_response)
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: File "/usr/local/lib/python3.6/site-packages/airflow/www/app.py", line 166, in root_app
> Mar 7 18:20:13 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: resp(b'404 Not Found', [(b'Content-Type', b'text/plain')])
> Mar 7 18:20:14 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: File "/usr/local/lib/python3.6/site-packages/gunicorn/http/wsgi.py", line 261, in start_response
> Mar 7 18:20:14 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: self.process_headers(headers)
> Mar 7 18:20:14 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: File "/usr/local/lib/python3.6/site-packages/gunicorn/http/wsgi.py", line 268, in process_headers
> Mar 7 18:20:14 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: raise TypeError('%r is not a string' % name)
> Mar 7 18:20:14 netdocker1-eastus2 daemon INFO ca5ce9db3af6[92630]: TypeError: b'Content-Type' is not a string
>  
> I just started using the base_url to put the webserver behind nginx proxy under a sub-path, elg [http://domain.com/airflow]
> I've tried following the docs for nginx proxy, i.e.
> [webserver]
> base_url = [http://localhost/airflow|http://airflow-web/airflow]
>  
> I've also tried setting the base_url to the fully-qualified endpoint:
> base_url = [https://example.com/airflow|https://domain.com/airflow]
>  
> Neither work, both give the TypeError exception.
>  
> If I remove the sub-path:
> base_url = [https://example.com|https://domain.com/]
> then the app starts and runs ok and i can access it on the host but not through the proxy.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)