Docker image for 3.2 appears broken

When things don't work as they should.
jere
Posts: 8
Joined: Thu Jun 13, 2019 2:02 pm

Docker image for 3.2 appears broken

Post by jere » Thu Jun 13, 2019 2:11 pm

First off, I love Mayan even if I am still trying to figure it out.

Second, after upgrading from the 3.1.10 tag to the 3.2 tag, it won't start any more. The log shows that it complains of a missing python package, specifically the appearance package.

I also notice that the 3.2 image is almost 100 megabytes smaller than the 3.1.10 image. Maybe there is some stuff missing?

Thanks!

KevinPawsey
Posts: 85
Joined: Wed Aug 22, 2018 2:52 pm

Re: Docker image for 3.2 appears broken

Post by KevinPawsey » Thu Jun 13, 2019 2:50 pm

As much as I hate "me too"'s .... but me too... it does definitely appear to be broken.

Hopefully it will be fixed soon... in the meantime I my have to revert back to using the 3.1 tag for now.
Running Mayan-EDMS on: OpenMediaVault, (Docker plugin), on x86 dual-core

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

Re: Docker image for 3.2 appears broken

Post by rosarior » Thu Jun 13, 2019 4:08 pm

Thanks for the report. This version has many big changes like Python 3 supports and seems we missed a few things the tests didn't catch. We are on it.

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

Re: Docker image for 3.2 appears broken

Post by rosarior » Thu Jun 13, 2019 4:33 pm

Can you post screenshots of the errors? We are not getting any package errors in the logs with the Docker image.

jere
Posts: 8
Joined: Thu Jun 13, 2019 2:02 pm

Re: Docker image for 3.2 appears broken

Post by jere » Thu Jun 13, 2019 9:44 pm

Here's the output that I see:

Code: Select all

mayan: starting entrypoint.sh
mayan: changing uid/guid
usermod: no changes
mayan: os_package_installs()
mayan: pip_installs()
mayan: upgrade()
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 338, in execute
django.setup()
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/opt/mayan-edms/local/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named appearance

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

Re: Docker image for 3.2 appears broken

Post by rosarior » Fri Jun 14, 2019 1:40 am

Thanks for the debug output. "appearance" is one of the core app of Mayan. In this version the apps need to be referenced by their full path and not just the name. Edit the "config.yml" in the "media" folder and update the app names with the prefix "mayan.apps.". Here are more details: https://docs.mayan-edms.com/releases/3. ... le-changes

If you are using the Docker image and haven't done any configuration changes beyond setting the basic (database parameters). You can delete the "config.yml" file and it will be re-created with correct values.

The image is smaller due to improvements in the creation of the image.

jere
Posts: 8
Joined: Thu Jun 13, 2019 2:02 pm

Re: Docker image for 3.2 appears broken

Post by jere » Sat Jun 15, 2019 7:04 pm

Yup. Deleting the config.yaml let it start up.

Thanks!

daniel1113
Posts: 24
Joined: Tue Aug 21, 2018 2:32 pm

Re: Docker image for 3.2 appears broken

Post by daniel1113 » Tue Jun 18, 2019 1:01 pm

How about those of us loading a custom settings module with Docker (e.g., MAYAN_SETTINGS_MODULE=mayan_settings.settings_ldap)? Something is now broken. Is there a new way to import the base settings?

Code: Select all

from mayan.settings.production import *

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

Re: Docker image for 3.2 appears broken

Post by rosarior » Fri Jun 28, 2019 3:48 pm

What is the error you are getting when using a custom settings file with the Docker image?

daniel1113
Posts: 24
Joined: Tue Aug 21, 2018 2:32 pm

Re: Docker image for 3.2 appears broken

Post by daniel1113 » Fri Jun 28, 2019 9:06 pm

It looks like I mis-diagnosed the source of the problem. I thought it was the loading of the settings module, but it is actually tied to the installation of the packages needed for LDAP. Starting a container with:

Code: Select all

-e MAYAN_APT_INSTALLS="libldap2-dev libsasl2-dev libssl-dev" -e MAYAN_PIP_INSTALLS="python-ldap django-auth-ldap"
Now errors out with:

Code: Select all

mayan: pip_installs()
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
WARNING: The directory '/home/mayan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/home/mayan/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting python-ldap
  Downloading https://files.pythonhosted.org/packages/ea/93/596f875e003c770447f4b99267820a0c769dd2dc3ae3ed19afe460fcbad0/python-ldap-3.2.0.tar.gz (367kB)
Collecting django-auth-ldap
  Downloading https://files.pythonhosted.org/packages/c1/c4/e1586a835b5bf76d4d914f1622020ae9ab9d9be7149e216e19c8428670d1/django_auth_ldap-1.7.0-py2.py3-none-any.whl
Collecting pyasn1>=0.3.7 (from python-ldap)
  Downloading https://files.pythonhosted.org/packages/7b/7c/c9386b82a25115cccf1903441bba3cbadcfae7b678a20167347fa8ded34c/pyasn1-0.4.5-py2.py3-none-any.whl (73kB)
Collecting pyasn1_modules>=0.1.5 (from python-ldap)
  Downloading https://files.pythonhosted.org/packages/91/f0/b03e00ce9fddf4827c42df1c3ce10c74eadebfb706231e8d6d1c356a4062/pyasn1_modules-0.2.5-py2.py3-none-any.whl (74kB)
Requirement already satisfied: Django>=1.11 in /opt/mayan-edms/lib/python2.7/site-packages (from django-auth-ldap) (1.11.20)
Requirement already satisfied: pytz in /opt/mayan-edms/lib/python2.7/site-packages (from Django>=1.11->django-auth-ldap) (2019.1)
Building wheels for collected packages: python-ldap
  WARNING: Building wheel for python-ldap failed: [Errno 13] Permission denied: '/home/mayan'
Failed to build python-ldap
Installing collected packages: pyasn1, pyasn1-modules, python-ldap, django-auth-ldap
  Running setup.py install for python-ldap: started
    Running setup.py install for python-ldap: finished with status 'error'
    ERROR: Complete output from command /opt/mayan-edms/bin/python2 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-3NvkVk/python-ldap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-LRffWR/install-record.txt --single-version-externally-managed --compile --install-headers /opt/mayan-edms/include/site/python2.7/python-ldap:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying Lib/ldapurl.py -> build/lib.linux-x86_64-2.7
    copying Lib/ldif.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/async.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/constants.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/functions.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/filter.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/dn.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/compat.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-2.7/ldap
    copying Lib/ldap/logger.py -> build/lib.linux-x86_64-2.7/ldap
    creating build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-2.7/ldap/controls
    copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-2.7/ldap/controls
    creating build/lib.linux-x86_64-2.7/ldap/extop
    copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-2.7/ldap/extop
    copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-2.7/ldap/extop
    creating build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.7/ldap/schema
    copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.7/ldap/schema
    creating build/lib.linux-x86_64-2.7/slapdtest
    copying Lib/slapdtest/__init__.py -> build/lib.linux-x86_64-2.7/slapdtest
    copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-2.7/slapdtest
    running egg_info
    writing requirements to Lib/python_ldap.egg-info/requires.txt
    writing Lib/python_ldap.egg-info/PKG-INFO
    writing top-level names to Lib/python_ldap.egg-info/top_level.txt
    writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
    reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'Doc/.build'
    writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
    creating build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-2.7/slapdtest/certs
    copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-2.7/slapdtest/certs
    running build_ext
    building '_ldap' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/Modules
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.2.0 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
    unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/opt/mayan-edms/bin/python2 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-3NvkVk/python-ldap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-LRffWR/install-record.txt --single-version-externally-managed --compile --install-headers /opt/mayan-edms/include/site/python2.7/python-ldap" failed with error code 1 in /tmp/pip-install-3NvkVk/python-ldap/
mayan: upgrade()
So I'll need to track this one down. It doesn't appear to be Mayan-specific, but rather related to python-ldap.

Post Reply