After putting the redash server (on an AWS EC2 instance) behind an elastic load balancer, our ability to send emails has disappeared. Running bin/run ./manage.py send_test_email just hangs and no email is sent/received. With that failure, I decided to run bin/run ./manage.py status, which resulted in the following traceback. I’ve not touched postgres at all, so not sure what happened. Thoughts?
Traceback (most recent call last):
File "/opt/redash/current/manage.py", line 58, in <module>
manager.run()
File "/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py", line 405, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/flask_script/__init__.py", line 384, in handle
return handle(app, *positional_args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flask_script/commands.py", line 145, in handle
return self.run(*args, **kwargs)
File "/opt/redash/current/manage.py", line 29, in status
print json.dumps(get_status(), indent=2)
File "/opt/redash/redash.0.10.1.b1834/redash/monitor.py", line 9, in get_status
status['queries_count'] = models.Query.select().count()
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2621, in count
return self.aggregate(convert=False) or 0
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2614, in aggregate
return self._aggregate(aggregation).scalar(convert=convert)
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2380, in scalar
row = self._execute().fetchone()
File "/opt/redash/redash.0.10.1.b1834/redash/metrics/database.py", line 50, in metered_execute
result = real_execute(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2371, in _execute
return self.database.execute_sql(sql, params, self.require_commit)
File "/opt/redash/redash.0.10.1.b1834/redash/metrics/database.py", line 22, in execute_sql
result = super(MeteredPostgresqlExtDatabase, self).execute_sql(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/playhouse/postgres_ext.py", line 369, in execute_sql
self.commit()
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2922, in __exit__
reraise(new_type, new_type(*exc_value.args), traceback)
File "/usr/local/lib/python2.7/dist-packages/playhouse/postgres_ext.py", line 358, in execute_sql
cursor = self.get_cursor()
File "/usr/local/lib/python2.7/dist-packages/playhouse/postgres_ext.py", line 345, in get_cursor
return self.get_conn().cursor()
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3022, in get_conn
self.connect()
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3004, in connect
self.initialize_connection(self.__local.conn)
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 2922, in __exit__
reraise(new_type, new_type(*exc_value.args), traceback)
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3002, in connect
**self.connect_kwargs)
File "/usr/local/lib/python2.7/dist-packages/playhouse/postgres_ext.py", line 373, in _connect
conn = super(PostgresqlExtDatabase, self)._connect(database, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/peewee.py", line 3316, in _connect
conn = psycopg2.connect(database=database, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect
conn = _connect(dsn, connection_factory=connection_factory, async=async)
peewee.OperationalError: FATAL: role "ubuntu" does not exist