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

    Unable to load php-mapi

    Kopano Groupware Core
    4
    21
    7147
    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.
    • thctlo
      thctlo last edited by

      Make sure you use the default php version of ubuntu (7.2) is set.

      check that with:
      update-alternatives --config php
      update-alternatives --config php-cgi
      update-alternatives --config php-fpm

      Any others check that with : ls -al /etc/alternatives/|grep php

      ModuleNotFoundError: No module named ‘tzlocal’
      apt install python3-tzlocal wil fix that.

      mapi.so in /usr/lib/php/20170718
      then there is most probely still a package related to that one.

      run : dpkg -S Path_to/That/Mapi.ile

      That will show from which package its coming. and htat is most probely : php-smbclient
      You need that is you use the file plugin and you want smb access.
      I have these:

       dpkg -S /usr/lib/php/20170718/smbclient.so
       php-smbclient: /usr/lib/php/20170718/smbclient.so
       dpkg -S /usr/lib/php/20180731/mapi.so
       php7-mapi: /usr/lib/php/20180731/mapi.so
      
      verify it :  dpkg -s php7-mapi
      

      And if its not installed install it again.
      and thanks i now also noticed on debian Buster that kopano-smime is still using php7.2, where debian buster is on 7.3. :-/

      noise 1 Reply Last reply Reply Quote 0
      • noise
        noise @thctlo last edited by

        @thctlo

        Great this resolve the mapi and search problem many thanks 👍
        but still not be able to login at webapp and z-push also not working

        06/09/2019 14:04:20 [ 3037] [FATAL] [test@domain.com] Exception: (ServiceUnavailableException) - Error connecting to KC (login)
        06/09/2019 14:04:22 [ 3143] [WARN] [test@domain.com] /usr/share/z-push/backend/kopano/kopano.php:168 mapi_logon_zarafa(): Unable to setup service for provider (2)
        06/09/2019 14:04:22 [ 3143] [ERROR] [test@domain.com] KopanoBackend->Logon(): login failed with error code: 0xFFFFFFFF80040115
        
        06/09/2019 14:04:27 [ 3039] [WARN] [test@domain.com] /usr/share/z-push/backend/kopano/kopano.php:168 mapi_logon_zarafa(): Unable to setup service for provider (2)
        06/09/2019 14:04:27 [ 3039] [ERROR] [test@domain.com] KopanoBackend->Logon(): login failed with error code: 0xFFFFFFFF80040115
        06/09/2019 14:04:27 [ 3039] [ INFO] [test@domain.com] ServiceUnavailableException: Error connecting to KC (login) - code: 0 - file: /usr/share/z-push/backend/kopano/kopano.php:184
        06/09/2019 14:04:27 [ 3039] [ INFO] [test@domain.com] User-agent: 'Apple-iPhone9C3/1607.77'
        06/09/2019 14:04:27 [ 3039] [FATAL] [test@domain.com] Exception: (ServiceUnavailableException) - Error connecting to KC (login)
        06/09/2019 14:04:27 [ 3039] [ INFO] [test@domain.com] cmd='' memory='1.66 MiB/2.00 MiB' time='0.01s' devType='' devId='' getUser='test@domain.com' from='xxx.xxx.xxx.xxx' idle='0s' version='2.5.1+0-0' method='OPTIONS' httpcode='503'
        
        ==> /var/log/kopano/spooler.log <==
        Fri Sep  6 14:16:15 2019: [ 1062] [error  ] Unable to open admin session: network error (80040115)
        Fri Sep  6 14:16:18 2019: [ 1062] [error  ] gsoap connect: ()
        Fri Sep  6 14:16:18 2019: [ 1062] [error  ] HrLogon server "default:" user "SYSTEM": network error
        Fri Sep  6 14:16:18 2019: [ 1062] [error  ] Unable to open admin session: network error (80040115)
        Fri Sep  6 14:20:54 2019: [ 1062] [warning] Table reload requested, breaking server connection
        Fri Sep  6 14:20:54 2019: [ 1062] [warning] Server connection lost. Reconnecting in 3 seconds...
        Fri Sep  6 14:29:52 2019: [=======] Starting kopano-spooler version 8.7.82 (pid 5758 uid 0)
        Fri Sep  6 14:29:52 2019: [error  ] Use of Python (plugin_enabled=yes) forces process_model=fork
        Fri Sep  6 14:29:52 2019: [=======] Starting kopano-spooler version 8.7.82 (pid 5758 uid 999)
        Fri Sep  6 14:29:52 2019: [error  ] Use of Python (plugin_enabled=yes) forces process_model=fork
        
        
        ==> /var/log/php7.2-fpm.log <==
        [06-Sep-2019 14:16:23] NOTICE: fpm is running, pid 963
        [06-Sep-2019 14:16:24] NOTICE: ready to handle connections
        [06-Sep-2019 14:16:24] NOTICE: systemd monitor interval set to 10000ms
        [06-Sep-2019 14:21:02] NOTICE: Terminating ...
        [06-Sep-2019 14:21:02] ERROR: unable to read what child say: Bad file descriptor (9)
        [06-Sep-2019 14:21:02] ERROR: unable to read what child say: Bad file descriptor (9)
        [06-Sep-2019 14:21:02] NOTICE: exiting, bye-bye!
        [06-Sep-2019 14:21:03] NOTICE: fpm is running, pid 4360
        [06-Sep-2019 14:21:03] NOTICE: ready to handle connections
        [06-Sep-2019 14:21:03] NOTICE: systemd monitor interval set to 10000ms
        

        the connection lost since the update i do yesterday. Before that it runs. but this is now another problem…

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

          Now i dont know much about nginx.
          but this looks very good. https://kb.kopano.io/display/WIKI/Nginx
          Follow that and review the setup.

          Your almost there. ;-)

          Side note.
          i presonaly disable all webapp z-push modules etc.
          I include these from the “available” folders in my apache setup.
          then i create an empty the file and put that one in the “enabled” folder.
          so my /etc/apache2/sites-enabled/webapp.conf is totaly empty.
          Why i do this? Its just there so webapp wont get enabled as “sites” config after an upgrade, because that sometimes happens.

          noise 1 Reply Last reply Reply Quote 0
          • noise
            noise @thctlo last edited by noise

            @thctlo

            could somehow never really make friends with apache :-) and since I’ve dealt with the nginx I only use this.

            i think is not a nginx problem, webapp login page are showing, only no connection if you want to login. perhaps i go back to the last snapshot reconfigure mapi and search and trying the update again. is not a productive machine.

            could also almost bet that my umaluts problem, which was still not really solved) is also related with mapi relative php

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

              Everyone there own cookie… i never tried nginx…

              but if you follow the steps i showed, you will find you problem.

              My first guesss…

              kopano.ini is not loaded for php-fpm.
              Sorry i can only show the apache examples, but for nginx its the same on debian/ubuntu… :-)

              ls -al
              total 28
              drwxr-xr-x 7 root root 4096 Jul 22 10:47 .
              drwxr-xr-x 3 root root 4096 Jul 22 10:47 ..
              drwxr-xr-x 3 root root 4096 Jul 22 10:48 apache2
              drwxr-xr-x 3 root root 4096 Jul 22 10:48 cgi
              drwxr-xr-x 3 root root 4096 Jul 22 10:48 cli
              drwxr-xr-x 4 root root 4096 Jul 22 10:48 fpm
              drwxr-xr-x 2 root root 4096 Aug 17 22:13 mods-available
              

              Verify that kopano.ini is loaded where its needed.

              /etc/php/7.3/apache2/conf.d/20-kopano.ini
              /etc/php/7.3/cli/conf.d/20-kopano.ini
              

              i my guest is that you need this.
              phpenmod -s ALL kopano

              You can change the ALL also per SAPI…
              like this :

              phpenmod -s cli kopano
              phpenmod -s nginx kopano
              phpenmod -s fpm kopano
              
              noise 1 Reply Last reply Reply Quote 1
              • noise
                noise @thctlo last edited by noise

                @thctlo

                ok i take a look here.
                but look on php are kopano ini is loaded
                screenshot.png

                i not really shure, but phpenmod is only for apache

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

                  yeah… your not sure…
                  I am… :-p

                  phpenmod -s nginx kopano ;-) will work.

                  noise 1 Reply Last reply Reply Quote 1
                  • noise
                    noise @thctlo last edited by noise

                    @thctlo
                    ok great :-) i try… many thanks for your support 👍

                    edit: you totally right

                    root@smtp:~# phpenmod -s cli kopano
                    WARNING: Module kopano ini file doesn't exist under /etc/php/7.1/mods-available
                    
                    root@smtp:~# phpenmod -s nginx kopano
                    WARNING: Invalid SAPI (nginx) specified
                    usage: phpquery [ -d ] [ -q ] -v version_name -s sapi_name [ -m module_name ] [ -M ] [ -S ] [ -V ]
                    WARNING: Directory /etc/php/7.3/nginx/conf.d doesn't exist, not enabling the module
                    WARNING: Invalid SAPI (nginx) specified
                    usage: phpquery [ -d ] [ -q ] -v version_name -s sapi_name [ -m module_name ] [ -M ] [ -S ] [ -V ]
                    WARNING: Directory /etc/php/7.2/nginx/conf.d doesn't exist, not enabling the module
                    WARNING: Module kopano ini file doesn't exist under /etc/php/7.1/mods-available
                    WARNING: Invalid SAPI (nginx) specified
                    usage: phpquery [ -d ] [ -q ] -v version_name -s sapi_name [ -m module_name ] [ -M ] [ -S ] [ -V ]
                    WARNING: Directory /etc/php/7.0/nginx/conf.d doesn't exist, not enabling the module
                    
                    root@smtp:~# phpenmod -s fpm kopano
                    WARNING: Invalid SAPI (fpm) specified
                    usage: phpquery [ -d ] [ -q ] -v version_name -s sapi_name [ -m module_name ] [ -M ] [ -S ] [ -V ]
                    WARNING: Directory /etc/php/7.3/fpm/conf.d doesn't exist, not enabling the module
                    WARNING: Module kopano ini file doesn't exist under /etc/php/7.1/mods-available
                    WARNING: Invalid SAPI (fpm) specified
                    usage: phpquery [ -d ] [ -q ] -v version_name -s sapi_name [ -m module_name ] [ -M ] [ -S ] [ -V ]
                    WARNING: Directory /etc/php/7.0/fpm/conf.d doesn't exist, not enabling the module
                    
                    1 Reply Last reply Reply Quote 0
                    • thctlo
                      thctlo last edited by

                      Your welkom, and i suggest, use the ALL then your sure you dont miss one.
                      If you run from php from CLI, then you need the kopano.ini also in php/cli …

                      If everything works, you can remove one for one, and keep only you really need.

                      Have a great weekend i hope i helped you.

                      noise 1 Reply Last reply Reply Quote 0
                      • noise
                        noise @thctlo last edited by noise

                        @thctlo

                        All is working now with the newest update. but with the above state i was not be able to run, so i go back to the last running state, resolve all mapi problems and search. Removed and reinstalled the kopano server packages with your workaround.

                        and the update runs…

                        one thing i notice about sql, but perhaps is only a warning:

                        ==> /var/log/syslog <==
                        Sep  8 05:13:03 smtp mysqld[1452]: 2019-09-08  5:13:03 139972050552576 [Warning] Aborted connection 76 to db: 'kopano' user: 'kopano' host: 'localhost' (Got timeout reading communication packets)
                        
                        ==> /var/log/syslog <==
                        Sep  8 06:01:24 smtp mysqld[1452]: 2019-09-08  6:01:24 139972049938176 [Warning] Aborted connection 318 to db: 'kopano' user: 'kopano' host: 'localhost' (Got timeout reading communication packets)
                        Sep  8 06:05:23 smtp kernel: [  157.543450] nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based  firewall rule not found. Use the iptables CT target to attach helpers instead.
                        

                        the umlauts problem is not really solved, but for this i go back to the other topic.

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