1

Topic: 1.2.1->1.3 failed upgrade iRedapd

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.2
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: CentOS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Good morning

When trying to pass the iredapd 4.4 update script, the iredapd service stops working. At the moment I have relaunched the iredapd 3.6 script until we can fix the problem.

This is the execution output of the script..

[root@mail tools]# bash upgrade_iredapd.sh
* Detected Linux/BSD distribution: RHEL
* Checking dependent Python modules:
  + [required] wheel
  + [required] sqlalchemy
  + [required] dnspython
  + [required] requests
  + [required] web.py
Install packages: python36-PyMySQL gcc python3-devel
Complementos cargados:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.cixug.es
* epel: mirrors.powernet.com.ru
* extras: ftp.cixug.es
* updates: ftp.cixug.es
El paquete python36-PyMySQL-0.9.3-1.el7.noarch ya se encuentra instalado con su versión más reciente
El paquete gcc-4.8.5-39.el7.x86_64 ya se encuentra instalado con su versión más reciente
El paquete python3-devel-3.6.8-13.el7.x86_64 ya se encuentra instalado con su versión más reciente
Nada para hacer
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting python-ldap==3.3.1
  Using cached https://files.pythonhosted.org/packages … 3.1.tar.gz
Requirement already up-to-date: pyasn1>=0.3.7 in /usr/local/lib/python3.6/site-packages (from python-ldap==3.3.1)
Requirement already up-to-date: pyasn1_modules>=0.1.5 in /usr/local/lib/python3.6/site-packages (from python-ldap==3.3.1)
Building wheels for collected packages: python-ldap
  Running setup.py bdist_wheel for python-ldap ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0_sca8ow/python-ldap/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmps8ccpe_0pip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.6
  copying Lib/ldif.py -> build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.6/ldap
  copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.6/ldap
  creating build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.6/ldap/controls
  copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.6/ldap/controls
  creating build/lib.linux-x86_64-3.6/ldap/extop
  copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.6/ldap/extop
  copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-3.6/ldap/extop
  copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.6/ldap/extop
  creating build/lib.linux-x86_64-3.6/ldap/schema
  copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.6/ldap/schema
  copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-3.6/ldap/schema
  copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.6/ldap/schema
  copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.6/ldap/schema
  creating build/lib.linux-x86_64-3.6/slapdtest
  copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.6/slapdtest
  copying Lib/slapdtest/__init__.py -> build/lib.linux-x86_64-3.6/slapdtest
  running egg_info
  writing Lib/python_ldap.egg-info/PKG-INFO
  writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
  writing requirements to Lib/python_ldap.egg-info/requires.txt
  writing top-level names to Lib/python_ldap.egg-info/top_level.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-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.6/slapdtest/certs
  copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
  running build_ext
  building '_ldap' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/Modules
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/include/python3.6m -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.6/Modules/LDAPObject.o
  In file included from Modules/LDAPObject.c:3:0:
  Modules/common.h:15:18: error fatal: lber.h: No existe el fichero o el directorio
   #include <lber.h>
                    ^
  compilación terminada.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for python-ldap
  Running setup.py clean for python-ldap
Failed to build python-ldap
Installing collected packages: python-ldap
  Running setup.py install for python-ldap ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0_sca8ow/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-va3u8uys-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.6
    copying Lib/ldif.py -> build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.6/ldap
    copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.6/ldap
    creating build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/__init__.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.6/ldap/controls
    copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.6/ldap/controls
    creating build/lib.linux-x86_64-3.6/ldap/extop
    copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.6/ldap/extop
    copying Lib/ldap/extop/__init__.py -> build/lib.linux-x86_64-3.6/ldap/extop
    copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.6/ldap/extop
    creating build/lib.linux-x86_64-3.6/ldap/schema
    copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.6/ldap/schema
    copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-3.6/ldap/schema
    copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.6/ldap/schema
    copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.6/ldap/schema
    creating build/lib.linux-x86_64-3.6/slapdtest
    copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.6/slapdtest
    copying Lib/slapdtest/__init__.py -> build/lib.linux-x86_64-3.6/slapdtest
    running egg_info
    writing Lib/python_ldap.egg-info/PKG-INFO
    writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
    writing requirements to Lib/python_ldap.egg-info/requires.txt
    writing top-level names to Lib/python_ldap.egg-info/top_level.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-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.6/slapdtest/certs
    copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.6/slapdtest/certs
    running build_ext
    building '_ldap' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/Modules
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/usr/include/python3.6m -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.6/Modules/LDAPObject.o
    In file included from Modules/LDAPObject.c:3:0:
    Modules/common.h:15:18: error fatal: lber.h: No existe el fichero o el directorio
     #include <lber.h>
                      ^
    compilación terminada.
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0_sca8ow/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-va3u8uys-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0_sca8ow/python-ldap/
* Found iRedAPD directory: /opt/iredapd, symbol link of iRedAPD-4.4
* Found iRedAPD config file: /opt/iredapd/settings.py
* Add new SQL tables - if there's any
* Copying new version to /opt/iRedAPD-4.4
* Copy old config file: settings.py (/opt/iredapd/settings.py -> /opt/iRedAPD-4.4/settings.py)
cp: «/opt/iredapd/settings.py» y «/opt/iRedAPD-4.4/settings.py» son el mismo fichero
* Copy custom plugins: iRedAPD-4.4/plugins/custom_*.py.
* Set correct owner and permission for /opt/iRedAPD-4.4: root:root, 0500.
* Set permission for iRedAPD config file: /opt/iRedAPD-4.4/settings.py -> 0400.
* Re-create symbol link: /opt/iredapd -> /opt/iRedAPD-4.4
* Remove existing systemd service files.
* Copy systemd service file: /opt/iredapd/rc_scripts/iredapd.service -> /lib/systemd/system/iredapd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/iredapd.service to /usr/lib/systemd/system/iredapd.service.
Redirecting to /bin/systemctl restart rsyslog.service
* Replace py2 by py3 in cron jobs.
* Restarting iRedAPD service.
Redirecting to /bin/systemctl restart iredapd.service
Job for iredapd.service failed because the control process exited with error code. See "systemctl status iredapd.service" and "journalctl -xe" for details.
Failed, please restart iRedAPD service manually.
* Upgrade completed.

< NOTE > If iRedAPD doesn't work as expected, please post your issue in our
< NOTE > online support forum: http://www.iredmail.org/forum/
< NOTE >
< NOTE > * Turn on debug mode: http://www.iredmail.org/docs/debug.iredapd.html
< NOTE > * iRedAPD log file is /var/log/iredapd/iredapd.log.

2

Re: 1.2.1->1.3 failed upgrade iRedapd

Do you have package "openldap-devel" installed?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: 1.2.1->1.3 failed upgrade iRedapd

Finally after installing openldap it has worked. I gave the solution yesterday and I was going to put it in the forum today.
Thank you