Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    [solved] db-backend kopano-cli MAPI error 80040111 (MAPI_E_LOGON_FAILED)

    Kopano Groupware Core
    3
    13
    1996
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tjoen
      tjoen last edited by fbartels

      kopanocore-8.6.80.1005
      mariadb-10.2.14
      System; x86_64 LFS (from sources)
      I had configured and used Zarafa in the past

      # grep -v "^#" /etc/kopano/server.cfg | grep -v ^$
      server_listen = *:236
      local_admin_users = root kopano
      log_file = /var/log/kopano/server.log
      log_level = 6
      #mysql_user = kopano gives same errors
      mysql_password = kopano
      
      mysql> CREATE DATABASE kopano;
      mysql> CREATE USER 'kopano'@'localhost' IDENTIFIED BY 'kopano';
      mysql> GRANT ALL ON kopano.* TO 'kopano'@'localhost';
      

      After restarting mariadb and kopano-server:

      # kopano-cli --list-users
      [error  ] virtual HRESULT M4LMAPISession::OpenMsgStore(ULONG_PTR, ULONG, const ENTRYID*, LPCIID, ULONG, IMsgStore**): msp->Logon failed: logon failed (80040111)
      MAPI error 80040111 (MAPI_E_LOGON_FAILED)
      
      $ cat /var/log/kopano/server.log
      Tue Jun 26 15:43:32 2018: [debug  ] Accepted incoming connection from file:///var/run/kopano/server.sock
      

      /var/lib/mysql/localhost.log shows 7 times

      Connect   root@localhost as anonymous on kopano
      

      and other sql statements

      Suggestions how to fix this problem?

      1 Reply Last reply Reply Quote 0
      • tjoen
        tjoen last edited by tjoen

        Same error with

        user_plugin = unix
        
        # kopano-cli --list-users --debug
        [error  ] virtual HRESULT M4LMAPISession::OpenMsgStore(ULONG_PTR, ULONG, const ENTRYID*, LPCIID, ULONG, IMsgStore**): msp->Logon failed: logon failed (80040111)
        Traceback (most recent call last):
          File "/usr/lib/python2.7/site-packages/kopano_cli/__init__.py", line 590, in main
            check_options(parser, options, server)
          File "/usr/lib/python2.7/site-packages/kopano_cli/__init__.py", line 576, in check_options
            if server.multitenant and not (options.companies or options.groups or options.users):
          File "/usr/lib/python2.7/site-packages/kopano/server.py", line 503, in multitenant
            self._companylist()
          File "/usr/lib/python2.7/site-packages/kopano/server.py", line 497, in _companylist
            return [eccompany.Companyname for eccompany in self.sa.GetCompanyList(MAPI_UNICODE)]
          File "/usr/lib/python2.7/site-packages/kopano/server.py", line 282, in sa
            self._sa = self.mapistore.QueryInterface(IID_IECServiceAdmin)
          File "/usr/lib/python2.7/site-packages/kopano/server.py", line 276, in mapistore
            self._mapistore = GetDefaultStore(self.mapisession)
          File "/usr/lib/python2.7/site-packages/MAPI/Util/__init__.py", line 101, in GetDefaultStore
            return session.OpenMsgStore(0, row[1].Value, None, MDB_WRITE)
          File "/usr/lib/python2.7/site-packages/MAPICore.py", line 1464, in OpenMsgStore
            return _MAPICore.IMAPISession_OpenMsgStore(self, ulUIParam, cbEntryID, lpInterface, ulFlags)
        MAPIErrorLogonFailed: MAPI error 80040111 (MAPI_E_LOGON_FAILED)
        
        $ cat /var/lib/mysql/localhost.log
        180627 20:14:57    31 Connect   kopano@localhost as anonymous on kopano
                           31 Query     SHOW tables
                           31 Query     SHOW variables LIKE 'max_allowed_packet'
                           31 Query     SET NAMES utf8
                           31 Query     SHOW SESSION VARIABLES LIKE 'group_concat_max_len'
                           31 Query     set max_sp_recursion_depth = 255
                           31 Query     SET SESSION sql_mode = 'STRICT_ALL_TABLES,NO_UNSIGNED_SUBTRACTION'
                           31 Query     SELECT hierarchy.id, stores.guid, stores.hierarchy_id, stores.type FROM stores join hierarchy on stores.hierarchy_id=hierarchy.parent WHERE stores.user_id=2 AND stores.type=0 LIMIT 1
                           24 Query     SELECT hierarchy.id, stores.guid, stores.hierarchy_id, stores.type FROM stores JOIN hierarchy on stores.hierarchy_id=hierarchy.parent WHERE stores.user_id = 1 LIMIT 1
        

        This is kopanocore-8.6.80.1005. Would a newer version work?

        1 Reply Last reply Reply Quote 0
        • fbartels
          fbartels Kopano last edited by

          Can you try an installation from our packages and see if you get the same errors?

          Regards Felix

          Resources:
          https://kopano.com/blog/how-to-get-kopano/
          https://documentation.kopano.io/
          https://kb.kopano.io/

          Support overview:
          https://kopano.com/support/

          1 Reply Last reply Reply Quote 0
          • tjoen
            tjoen last edited by

            I see they are newer: 8.6.80.1055
            I’ll build my own rpm and report back
            I think it is also needed to delete the database

            1 Reply Last reply Reply Quote 0
            • tjoen
              tjoen last edited by tjoen

              intermediate report
              8.6.80.1076 fom souces resulted in same error
              Python2 was built after openssl
              Installed 8.6.80.1055.rpms for Fedora Rawhide
              I have icu-60.2, So dependency icu-61.1 compiled.
              Missing dependency libgsoapssl++-2.8.60.so
              I think I can create it from libgsoapssl+±.a

              1 Reply Last reply Reply Quote 0
              • tjoen
                tjoen last edited by tjoen

                core-8.6.80.1055 from Fedora_Rawhide-x86_64 with gsoap-2.8.66 from Fedora-28
                resuted in same error with command

                #  kopano-cli --list-users
                

                Same result after dropping database and user kopano and rescreating user and grantt all without CREATE DATABASE kopano;
                (startiup kopano-server creates database if not exists)
                Something wrong with my Python-2.7.14? I built it with

                ./configure --prefix=/usr --enable-shared --with-system-expat \
                  --with-system-ffi --enable-unicode=ucs4 --with-ensurepip=yes
                
                1 Reply Last reply Reply Quote 0
                • tjoen
                  tjoen last edited by

                  kopanocore-8.6.80.1248
                  After recompiling with previously missing libkcoidc-0.3.0 and ibs3-4.1 and upgradet to icu-61.1 results same MAPI error 80040111
                  Clean installed Fedora-28 same error.
                  There are packaging bugs:
                  1 Fedora-28 has only libicu-60 but the kopano packackages are linked to libicu-61
                  2 python2-kopano dependency python-tz doesnt exist. Should be python2-pytz

                  jengelh 1 Reply Last reply Reply Quote 0
                  • jengelh
                    jengelh Banned @tjoen last edited by

                    @tjoen said in db-backend kopano-cli MAPI error 80040111 (MAPI_E_LOGON_FAILED):

                    1 Fedora-28 has only libicu-60 but the kopano packackages are linked to libicu-61

                    17:06 a4:../core_master/kopano > rpm -qRp binaries/libkcutil0-8.6.80.1317-189.4.x86_64.rpm |grep icu
                    warning: binaries/libkcutil0-8.6.80.1317-189.4.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID ec07c591: NOKEY
                    libicudata.so.60()(64bit)
                    libicui18n.so.60()(64bit)
                    libicuuc.so.60()(64bit)
                    

                    2 python2-kopano dependency python-tz doesnt exist. Should be python2-pytz

                    17:06 a4:../core_master/kopano > rpm -qRp binaries/python2-kopano-8.6.80.1317-189.4.x86_64.rpm 
                    warning: binaries/python2-kopano-8.6.80.1317-189.4.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID ec07c591: NOKEY
                    python(abi) = 2.7
                    python-dateutil
                    python-pytz
                    python2-mapi
                    
                    tjoen 1 Reply Last reply Reply Quote 0
                    • tjoen
                      tjoen @jengelh last edited by

                      @jengelh

                      17:06 a4:…/core_master/kopano > rpm -qRp binaries/libkcutil0-8.6.80.1317-189.4.x86_64.rpm |grep icu
                      libicudata.so.60()(64bit)

                      I see that has been solved compared to version-8.6.80.1248 of mine.
                      I have used my own icu-61.1 but same MAPI error 80040111

                      2 python2-kopano dependency python-tz doesnt exist. Should be python2-pytz

                      17:06 a4:…/core_master/kopano > rpm -qRp binaries/python2-kopano-8.6.80.1317-189.4.x86_64.rpm
                      python-pytz

                      $ rpm -qf /usr/lib/python2.7/site-packages/pytz
                      python2-pytz-2017.2-7.fc28.noarch
                      

                      I see why it works:

                      $ rpm -q --provides python2-pytz
                      python-pytz = 2017.2-7.fc28
                      python2-pytz = 2017.2-7.fc28
                      python2.7dist(pytz) = 2017.2
                      python2dist(pytz) = 2017.2
                      pytz = 2017.2-7.fc28
                      
                      1 Reply Last reply Reply Quote 0
                      • tjoen
                        tjoen last edited by tjoen

                        kopanocore-8.6.80.1350-1.x86_64 compiled from sources. System LFS-like
                        Steps to reproduce the error

                        MariaDB [(none)]> DROP DATABASE kopano ;
                        MariaDB [(none)]> DROP USER 'kopano'@'localhost';
                        MariaDB [(none)]> CREATE USER 'kopano'@'localhost' IDENTIFIED BY 'kopano';
                        MariaDB [(none)]> GRANT ALL ON kopano.* TO 'kopano'@'localhost';
                        $ diff -uN /usr/share/doc/kopano/example-config/server.cfg /etc/kopano/server.cfg
                        --- /usr/share/doc/kopano/example-config/server.cfg     2018-07-27 13:30:37.000000000 +0200
                        +++ /etc/kopano/server.cfg      2018-07-27 14:02:46.313139693 +0200
                        @@ -128,10 +128,10 @@
                         #mysql_port = 3306
                        
                         # The user under which we connect with MySQL
                        -#mysql_user = root
                        +mysql_user = kopano
                        
                         # The password for the user (leave empty for no password)
                        -#mysql_password =
                        +mysql_password = kopano
                        
                         # Override the default MySQL socket to access mysql locally
                         # Works only if the mysql_host value is empty or 'localhost'
                        
                        root$ systemctl start kopano-server
                        $ systemctl status kopano-server
                           ...
                           Active: active (running) since Fri 2018-07-27 21:42:01 CEST; 18s ago
                           ...
                        root$ kopano-cli --create-store
                        [error  ] virtual HRESULT M4LMAPISession::OpenMsgStore(ULONG_PTR, ULONG, const ENTRYID*, LPCIID, ULONG, IMsgStore**): msp>Logon failed: logon failed (80040111)MAPI error 80040111 (MAPI_E_LOGON_FAILED)
                        

                        In Fedora-28 kopano-server doesn’t start

                        $ systemctl status kopano-server
                        ● kopano-server.service - Kopano Core Storage Server
                           Loaded: loaded (/usr/lib/systemd/system/kopano-server.service; disabled; vendor preset: disabled)
                           Active: failed (Result: exit-code) since Fri 2018-07-27 12:27:33 CEST; 1min 23s ago
                             Docs: man:kopano-server(8)
                                   man:kopano-server.cfg(5)
                                   man:kopano-admin(8)
                          Process: 2547 ExecStart=/usr/sbin/kopano-server -F (code=exited, status=203/EXEC)
                         Main PID: 2547 (code=exited, status=203/EXEC)
                        
                        Jul 27 12:27:33 localhost.localdomain systemd[1]: Started Kopano Core Storage Server.
                        Jul 27 12:27:33 localhost.localdomain systemd[1]: kopano-server.service: Main process exited, code=exited, status=203/EXEC
                        Jul 27 12:27:33 localhost.localdomain systemd[1]: kopano-server.service: Failed with result 'exit-code'.
                        

                        Installed packages:
                        kopano-client-8.6.80.1350-212.1.x86_64
                        kopano-common-8.6.80.1350-212.1.x86_64
                        kopano-lang-8.6.80.1350-212.1.x86_64
                        kopano-server-8.6.80.1350-212.1.x86_64
                        kopano-utils-8.6.80.1350-212.1.x86_64
                        libkcarchiver0-8.6.80.1350-212.1.x86_64
                        libkcfreebusy0-8.6.80.1350-212.1.x86_64
                        libkcicalmapi0-8.6.80.1350-212.1.x86_64
                        libkcinetmapi0-8.6.80.1350-212.1.x86_64
                        libkcoidc0-0.3.0-17.1.x86_64
                        libkcrosie0-8.6.80.1350-212.1.x86_64
                        libkcserver0-8.6.80.1350-212.1.x86_64
                        libkcsoap0-8.6.80.1350-212.1.x86_64
                        libkcutil0-8.6.80.1350-212.1.x86_64
                        libmapi1-8.6.80.1350-212.1.x86_64
                        libs3-4-4.1.git257-2.2.x86_64
                        libtidy5-5.1.9-3.1.x86_64
                        libvmime-kopano1-0.9.2.50-10.1.x86_64
                        python2-kopano-8.6.80.1350-212.1.x86_64
                        python2-mapi-8.6.80.1350-212.1.x86_64

                        1 Reply Last reply Reply Quote 0
                        • tjoen
                          tjoen last edited by

                          [SOLVED] in kopanocore-8.6.80.1420-1.x86_64 built from sources

                          $ kopano-cli --list-users
                          User list for Default (1):
                                      User           Full Name          Homeserver                                   Store
                          ------------------------------------------------------------------------------------------------
                                    SYSTEM              SYSTEM             Unknown        8962FFEFFB7B4D639BC5967C4BB58234
                          
                          1 Reply Last reply Reply Quote 0
                          • tjoen
                            tjoen last edited by

                            @fbartels
                            How can I add “[SOLVED]” to the subjectline?

                            fbartels 1 Reply Last reply Reply Quote 0
                            • fbartels
                              fbartels Kopano @tjoen last edited by

                              Hi @tjoen ,

                              you would need to edit the first post, from there you should be able to edit the subject. alternatively there is a plugin installed here where you could mark your first post as a question and then select one of the replies as “the answer”

                              Regards Felix

                              Resources:
                              https://kopano.com/blog/how-to-get-kopano/
                              https://documentation.kopano.io/
                              https://kb.kopano.io/

                              Support overview:
                              https://kopano.com/support/

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post