LexPredict / openedgar

OpenEDGAR (openedgar.io)
MIT License
294 stars 94 forks source link

Failure of Installation #12

Closed lixx3811 closed 6 years ago

lixx3811 commented 6 years ago
  1. Update .env file. For local testing (downloading files locally, instead of to S3), set CLIENT_TYPE to LOCAL and DOWNLOAD_PATH to a local path

....

b. Update DATABASE_URL

c. Update CELERY_BROKER_URL

What does b an c mean?

Then I've finished set up S3 bucket, IAM and update. Then when I try
d. $ python manage.py migrate

I got the following error

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

Traceback (most recent call last): File "manage.py", line 29, in execute_from_command_line(sys.argv) File "/opt/openedgar/env/lib/python3.6/site-packages/django/core/management/init.py", line 371, in execute_from_command_line utility.execute() File "/opt/openedgar/env/lib/python3.6/site-packages/django/core/management/init.py", line 365, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/openedgar/env/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv self.execute(*args, *cmd_options) File "/opt/openedgar/env/lib/python3.6/site-packages/django/core/management/base.py", line 335, in execute output = self.handle(args, options) File "/opt/openedgar/env/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 79, in handle executor = MigrationExecutor(connection, self.migration_progress_callback) File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/migrations/executor.py", line 18, in init self.loader = MigrationLoader(self.connection) File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/migrations/loader.py", line 49, in init self.build_graph() File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/migrations/loader.py", line 206, in build_graph self.applied_migrations = recorder.applied_migrations() File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 61, in applied_migrations if self.has_table(): File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 44, in has_table return self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()) File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/backends/base/base.py", line 255, in cursor return self._cursor() File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/backends/base/base.py", line 232, in _cursor self.ensure_connection() File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/backends/base/base.py", line 216, in ensure_connection self.connect() File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/utils.py", line 89, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/backends/base/base.py", line 216, in ensure_connection self.connect() File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/backends/base/base.py", line 194, in connect self.connection = self.get_new_connection(conn_params) File "/opt/openedgar/env/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 168, in get_new_connection connection = Database.connect(conn_params) File "/opt/openedgar/env/lib/python3.6/site-packages/psycopg2/init.py", line 130, 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? FATAL: password authentication failed for user "openedgar" FATAL: password authentication failed for user "openedgar"

schatimo commented 6 years ago

The current definition of .env file assumes that for the postgres db the password is openedgar, see DATABASE_URL="postgres://openedgar:openedgar@localhost:5432/openedgar" (l.2 in .env). If you have not set openedgar as pw for the db openedgar, then you have to change the DATABASE_URL in .env accordingly. Hope this helps.

lixx3811 commented 6 years ago

The current definition of .env file assumes that for the postgres db the password is openedgar, see DATABASE_URL="postgres://openedgar:openedgar@localhost:5432/openedgar" (l.2 in .env). If you have not set openedgar as pw for the db openedgar, then you have to change the DATABASEURL in .env_ accordingly. Hope this helps.

Thanks! That helps and I basically set up the environment (though I think my server memory is too low so in the end it crashed).

BTW at the Apache Tika step, the current file run into 404 as now the version is 19.1.