Reputation: 3870
I'm trying to port sayIt
, a django app with postgresql as a sandstorm app.
I have an instance running on Ubuntu, and using raw packaging to run it in dev mode. However, an error occurs as below:
...** SANDSTORM SUPERVISOR: Starting up grain. Sandbox type: userns Unhandled exception in thread started by Performing system checks... System check identified no issues (0 silenced). Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 229, in wrapper fn(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 116, in inner_run self.check_migrations() File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 168, in check_migrations executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS]) File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 19, in __init__ self.loader = MigrationLoader(self.connection) File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 47, in __init__ self.build_graph() File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 191, in build_graph self.applied_migrations = recorder.applied_migrations() File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 59, in applied_migrations self.ensure_schema() File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/recorder.py", line 49, in ensure_schema if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()): File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 162, in cursor cursor = self.make_debug_cursor(self._cursor()) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 135, in _cursor self.ensure_connection() File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 130, in ensure_connection self.connect() File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 98, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 130, in ensure_connection self.connect() File "/usr/local/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 119, in connect self.connection = self.get_new_connection(conn_params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection connection = Database.connect(**conn_params) File "/usr/local/lib/python2.7/dist-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) django.db.utils.OperationalError: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432?
I tried to enter the grain, but the document just says read vagrant-spk's source code which I read but can't understand.
It seems like postgresql is not running and listening, but I totally have no idea why. Any hint is appreciated. Thank you!
Upvotes: 1
Views: 158