LongTailBio / pangea-django

MIT License
0 stars 1 forks source link

IPK(pasteur institut korea) i got refused connection from the server #60

Closed wnvcks closed 3 years ago

wnvcks commented 3 years ago

i tried to follow your command " python3 manage.py migrate " i got some issues and "psycopg2.OperationalError: could not connect to server: Connection refused" cannot server connection if you don't mind could you help how to solve it...?

command line ----------------------------------------------------------------------------- (pangea-django) root@juchan-VirtualBox:~/Desktop/pangea-django# python3 manage.py migrate manage.py:10: UserWarning: Not reading .env - it doesn't exist. dotenv.read_dotenv() System check identified some issues:

WARNINGS: core.PipelineModule.dependencies: (fields.W340) null has no effect on ManyToManyField. core.Project.sample_groups: (fields.W340) null has no effect on ManyToManyField. core.Project.sub_projects: (fields.W340) null has no effect on ManyToManyField. treeoflife.Archaea.tree_node: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. HINT: ForeignKey(unique=True) is usually better served by a OneToOneField. treeoflife.Bacteria.tree_node: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. HINT: ForeignKey(unique=True) is usually better served by a OneToOneField. treeoflife.Fungi.tree_node: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. HINT: ForeignKey(unique=True) is usually better served by a OneToOneField. treeoflife.Virus.tree_node: (fields.W342) Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. HINT: ForeignKey(unique=True) is usually better served by a OneToOneField. Traceback (most recent call last): File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 220, in ensure_connection self.connect() File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 197, in connect self.connection = self.get_new_connection(conn_params) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 185, in get_new_connection connection = Database.connect(conn_params) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/psycopg2/init.py", line 126, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) psycopg2.OperationalError: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "manage.py", line 25, in main() File "manage.py", line 21, in main execute_from_command_line(sys.argv) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/core/management/init.py", line 401, in execute_from_command_line utility.execute() File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/core/management/init.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/core/management/base.py", line 328, in run_from_argv self.execute(*args, cmd_options) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/core/management/base.py", line 369, in execute output = self.handle(*args, *options) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/core/management/base.py", line 83, in wrapped res = handle_func(args, kwargs) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 86, in handle executor = MigrationExecutor(connection, self.migration_progress_callback) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in init self.loader = MigrationLoader(self.connection) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/migrations/loader.py", line 49, in init self.build_graph() File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/migrations/loader.py", line 212, in build_graph self.applied_migrations = recorder.applied_migrations() File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 76, in applied_migrations if self.has_table(): File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 56, in has_table return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, kwargs) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 260, in cursor return self._cursor() File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 236, in _cursor self.ensure_connection() File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, *kwargs) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 220, in ensure_connection self.connect() File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/utils.py", line 90, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 220, in ensure_connection self.connect() File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner return func(args, kwargs) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/base/base.py", line 197, in connect self.connection = self.get_new_connection(conn_params) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner return func(*args, kwargs) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 185, in get_new_connection connection = Database.connect(conn_params) File "/root/.pyenv/versions/pangea-django/lib/python3.8/site-packages/psycopg2/init.py", line 126, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

dcdanko commented 3 years ago

Sorry but I can't provide support for running a custom local instance of Pangea.

However in this case the issue looks like you don't have a Postgres database running.

Feel free to use the running instance at https://pangeabio.io/