Trying to transition from sqlite db to postgresql (based on the guide here:
https://www.ryanmerlin.com/2019/07/apache-airflow-installation-on-ubuntu-18-04-18-10/
) and getting mushroom cloud error at initial screen of webserver UI.
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py",
line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py",
line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)...
...File
"/home/airflow/.local/lib/python3.6/site-packages/airflow/www/utils.py",
line 93, in is_accessible
(not current_user.is_anonymous and current_user.is_superuser())
File
"/home/airflow/.local/lib/python3.6/site-packages/airflow/contrib/auth/backends/password_auth.py",
line 114, in is_superuser
return hasattr(self, 'user') and self.user.is_superuser()
AttributeError: 'NoneType' object has no attribute 'is_superuser'
Looking at the webserver logs does not reveal much...
------------------------------
[airflow@airflowetl airflow]$ tail airflow-webserver.*
==> airflow-webserver.err <==
/home/airflow/.local/lib/python3.6/site-packages/psycopg2/__init__.py:144:
UserWarning: The psycopg2 wheel package will be renamed from release 2.8;
in order to keep installing from binary please use "pip install
psycopg2-binary" instead. For details see: <
http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
""")
==> airflow-webserver.log <==
==> airflow-webserver.out <==
[2019-12-18 10:20:36,553] {settings.py:213} INFO -
settings.configure_orm(): Using pool settings. pool_size=5,
max_overflow=10, pool_recycle=1800, pid=72725
==> airflow-webserver.pid <==
72745
------------------------------
One thing that may be useful to note (since this appears to be due to some
kind of password issue) is that before trying to switch to postgres, I had
set bycrpt password according to the docs (
https://airflow.apache.org/docs/stable/security.html#password) with the
script here:
------------------------------
import airflow
from airflow import models, settings
from airflow.contrib.auth.backends.password_auth import PasswordUser
user = PasswordUser(models.User())
user.username = 'airflow'
user.email = '[email protected]'
user.password = 'mypasword'
session = settings.Session()
session.add(user)
session.commit()
session.close()
exit()
------------------------------
Anyone know what could be going on here or how to debug further?
--
This electronic message is intended only for the named
recipient, and may
contain information that is confidential or
privileged. If you are not the
intended recipient, you are
hereby notified that any disclosure, copying,
distribution or
use of the contents of this message is strictly
prohibited. If
you have received this message in error or are not the
named
recipient, please notify us immediately by contacting the
sender at
the electronic mail address noted above, and delete
and destroy all copies
of this message. Thank you.