fout bij het installeren🙋 #1554
-
DescriptionHallo, ik probeer dsmrreader te installeren maar als ik ./manage.py migrate invoer gaat het verkeerd. mvg Dries bord: odroid xu4 DSMR-reader versionv4 DSMR-reader platformNative (e.g. manual installation) Debug info dump<!-- COPY OUTPUT BELOW -->
Traceback (most recent call last):
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/lib/python3/dist-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" (::1) and accepting
TCP/IP connections on port 5432?
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 10, in <module>
execute_from_command_line(sys.argv)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/home/dsmr/dsmr-reader/dsmr_backend/management/commands/dsmr_debuginfo.py", line 33, in handle
self._dump_application_info()
File "/home/dsmr/dsmr-reader/dsmr_backend/management/commands/dsmr_debuginfo.py", line 46, in _dump_application_info
for line in self._intercept_command_stdout('showmigrations', no_color=True).split("\n"):
File "/home/dsmr/dsmr-reader/dsmr_backend/tests/mixins.py", line 12, in _intercept_command_stdout
call_command(command, stdout=stdout, stderr=stderr, *args, **kwargs)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/core/management/__init__.py", line 168, in call_command
return command.execute(*args, **defaults)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/core/management/commands/showmigrations.py", line 52, in handle
return self.show_list(connection, options['app_label'])
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/core/management/commands/showmigrations.py", line 71, in show_list
loader = MigrationLoader(connection, ignore_no_migrations=True)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/migrations/loader.py", line 53, in __init__
self.build_graph()
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/migrations/loader.py", line 216, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
if self.has_table():
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 55, in has_table
with self.connection.cursor() as cursor:
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/base/base.py", line 259, in cursor
return self._cursor()
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/base/base.py", line 235, in _cursor
self.ensure_connection()
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
self.connect()
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
self.connection = self.get_new_connection(conn_params)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
return func(*args, **kwargs)
File "/home/dsmr/.virtualenvs/dsmrreader/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/lib/python3/dist-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" (::1) and accepting
TCP/IP connections on port 5432?
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? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Bedankt voor je vraag. Het lijkt erop dat de database niet draait of niet bereikbaar is. Heb je die wel gestart/cluster aangemaakt? Afhankelijk van het OS gebeurt dat wel of niet automatisch. Mogelijk mist de cluster nog, zie de blauwe notitie in https://dsmr-reader.readthedocs.io/nl/v4/tutorial/installation/step-by-step.html#database-backend-postgresql. Let op dat die versienummers nog vrij oud zijn. Wellicht dat je postgres versie nu 12 of 13 oid is.
|
Beta Was this translation helpful? Give feedback.
-
Bij nader inzien had je anders ook al een fout gehad bij het aanmaken van de DB user en database zelf. Kun je je herinneren of dat wel goed ging?
|
Beta Was this translation helpful? Give feedback.
-
die lijkt goed, de database lijkt mij ook correct aangemaakt:
|
Beta Was this translation helpful? Give feedback.
-
Ik denk dat je dan moet achterhalen op welke poort de DB draait. Dit zou de standaard moeten zijn:
Je kunt kijken met bijvoorbeeld netstat:
Bij mij:
|
Beta Was this translation helpful? Give feedback.
-
ok is gelukt , poort van postgres was standaard 5433 , had daar overgekeken. mvg, dries |
Beta Was this translation helpful? Give feedback.
ok is gelukt ,
poort van postgres was standaard 5433 , had daar overgekeken.
bedankt voor de hulp !
mvg, dries