Error on installation with Docker

When things doesn't work as they should.
Post Reply
zt0wn
Posts: 2
Joined: Sat Oct 13, 2018 4:19 pm

Error on installation with Docker

Post by zt0wn » Sat Oct 13, 2018 4:23 pm

Hello everyone,

I am trying to install Mayan in docker, and have followed all of the instructions but am unable to get it to run. The image will start, and get to this error and then restart itself. Here is the error log.

mayan: starting entrypoint.sh,
mayan: os_package_installs(),
mayan: pip_installs(),
mayan: initialize(),
Traceback (most recent call last):,
File "/opt/mayan-edms/bin/mayan-edms.py", line 10, in <module>,
execute_from_command_line(sys.argv),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line,
utility.execute(),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute,
self.fetch_command(subcommand).run_from_argv(self.argv),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv,
self.execute(*args, **cmd_options),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute,
output = self.handle(*args, **options),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/common/management/commands/initialsetup.py", line 89, in handle,
pre_initial_setup.send(sender=self),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 193, in send,
for receiver in self._live_receivers(sender),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/mayan/apps/common/handlers.py", line 10, in handler_pre_initial_setup,
management.call_command('migrate', interactive=False),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 131, in call_command,
return command.execute(*args, **defaults),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute,
output = self.handle(*args, **options),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 83, in handle,
executor = MigrationExecutor(connection, self.migration_progress_callback),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 20, in __init__,
self.loader = MigrationLoader(self.connection),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 52, in __init__,
self.build_graph(),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 209, in build_graph,
self.applied_migrations = recorder.applied_migrations(),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 65, in applied_migrations,
self.ensure_schema(),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 52, in ensure_schema,
if self.Migration._meta.db_table in self.connection.introspection.table_names(self.connection.cursor()):,
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 254, in cursor,
return self._cursor(),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 229, in _cursor,
self.ensure_connection(),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection,
self.connect(),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__,
six.reraise(dj_exc_type, dj_exc_value, traceback),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 213, in ensure_connection,
self.connect(),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/base/base.py", line 189, in connect,
self.connection = self.get_new_connection(conn_params),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py", line 176, in get_new_connection,
connection = Database.connect(**conn_params),
File "/opt/mayan-edms/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect,
conn = _connect(dsn, connection_factory=connection_factory, **kwasync),
django.db.utils.OperationalError: FATAL: password authentication failed for user "mayan",



I hope you guys can help me get this running!

Thanks

User avatar
rosarior
Posts: 159
Joined: Tue Aug 21, 2018 3:28 am

Re: Error on installation with Docker

Post by rosarior » Sat Oct 13, 2018 7:10 pm

File "/opt/mayan-edms/local/lib/python2.7/site-packages/psycopg2/__init__.py", line 130, in connect,
conn = _connect(dsn, connection_factory=connection_factory, **kwasync),
django.db.utils.OperationalError: FATAL: password authentication failed for user "mayan",
Check that the database credential (username, password, host) matches all instances where they are being used: when creating the database and when launching the Mayan container.

Another possibility is that your Docker host is not running on IP address 172.17.0.1. In that case update the IP address used in the installation process or use the Docker network process outlined here: viewtopic.php?f=7&t=97#p293

zt0wn
Posts: 2
Joined: Sat Oct 13, 2018 4:19 pm

Re: Error on installation with Docker

Post by zt0wn » Sat Oct 13, 2018 9:09 pm

I have tried changing the host ip to match the one that postgres has after that docker image is created. That just has a restart loop. So I tried the second option you gave me without exposing the port and I still have the above issue.

Do I need to manually create this database or will creating the postgres container with the user,db,password with the default install instructions work?

Post Reply