Z-Push 2.5.0 fixstates



  • Hi Kopano community.

    I upgraded z-push to 2.5.0.
    Now i wan’t to run z-push-admin -a fixstates but get the following error:

    root@srv:/etc/z-push# z-push-admin -a fixstates
    
    Validating and fixing states (this can take some time):
    	11:39:29 Checking username casings: Processed: 5 - Converted: 0 - Removed: 0
    	11:39:29 Checking available devicedata & user linking: PHP Fatal error:  Declaration of IpcSharedMemoryProvider::__construct($type, $allocate, $class) must be compatible with IIpcProvider::__construct($type, $allocate, $class, $serverKey) in /usr/share/z-push/backend/ipcsharedmemory/ipcsharedmemoryprovider.php on line 44
    

    My versions are:
    Debian 9
    KC: 8.6.9
    Z-Push: 2.5.0

    I also have a NextCloud server running on this machine and configured the IPC Shared Memory for PHP.

    My mobiles are also not syncing.

    Any hint for this problem?

    Cheers Basti


  • Kopano

    Hi Basti,

    it looks like the ipcsharedmemoryprovider.php on your system wasn’t updated correctly. It already has the correct constructor since 2.5.0 beta1.

    What versions exactly of z-push-* packages are installed on your system? Did you try to force re-install?

    Manfred



  • Hi @Manfred

    I have the following versions:

    root@srv:~# dpkg -l z-push*
    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name                                            Version                      Architecture                 Description
    +++-===============================================-============================-============================-===================================================================================================
    un  z-push                                          <none>                       <none>                       (no description available)
    ii  z-push-backend-kopano                           2.5.0+0-0                    all                          Z-Push Kopano backend
    ii  z-push-common                                   2.5.0+0-0                    all                          open source implementation of the ActiveSync protocol
    

    No i didn’t reinstall. But when i give it a try i get the following message:

    root@srv:/usr/share/z-push# apt-get install --reinstall z-push-common z-push-backend-kopano
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      libgsoap-kopano-2.8.62 linux-image-4.9.0-7-amd64 python-acme python-augeas python-certbot python-configargparse python-configobj python-funcsigs python-josepy python-mock python-parsedatetime python-pbr
      python-psutil python-pyicu python-requests python-requests-toolbelt python-rfc3339 python-tz python-urllib3 python-zope.component python-zope.event python-zope.hookable python-zope.interface
    Use 'apt autoremove' to remove them.
    0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
    Need to get 0 B/435 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    N: Ignoring file 'php.list.old' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
    (Reading database ... 78002 files and directories currently installed.)
    Preparing to unpack .../z-push-backend-kopano_2.5.0+0-0_all.deb ...
    Unpacking z-push-backend-kopano (2.5.0+0-0) over (2.5.0+0-0) ...
    Preparing to unpack .../z-push-common_2.5.0+0-0_all.deb ...
    Unpacking z-push-common (2.5.0+0-0) over (2.5.0+0-0) ...
    Setting up z-push-common (2.5.0+0-0) ...
    -su: 29: /usr/share/bash-completion/bash_completion: [[: not found
    -su: 35: /usr/share/bash-completion/bash_completion: [[: not found
    -su: 51: /usr/share/bash-completion/bash_completion: shopt: not found
    -su: 57: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 62: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 65: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 68: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 71: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 74: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 77: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 80: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 83: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 86: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 89: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 92: /usr/share/bash-completion/bash_completion: complete: not found
    -su: 101: /usr/share/bash-completion/bash_completion: Syntax error: "(" unexpected (expecting "}")
    -e When upgrading from an earlier version you need to run 'z-push-admin -a fixstates'.
    
    It seems the execution on setup has failed (see error above). Please fix the issue and run the command manually.
    
    More information at https://wiki.z-hub.io/x/R4Ea
    
    Setting up z-push-backend-kopano (2.5.0+0-0) ...
    Processing triggers for man-db (2.7.6.1-2) ...
    

    Maybe the bash-completion is the cause of the problem?

    Cheers Basti


  • Kopano

    Hi Basti,

    yes, bash-completion might be causing the problem, but I’ve never seen something like this.

    However if you’re upgrading from Z-Push 2.4.X, you don’t necessarily need to run fix-states. Add the following to /etc/z-push/z-push.conf.php (e.g. at the end of the file):

    // Don't perform fixstates on upgrade
    define('IGNORE_FIXSTATES_ON_UPGRADE', true);
    

    and try to reinstall z-push again.

    Manfred



  • Hi @Manfred

    I just added the code in the z-push.conf.php of z-push and reinstalled the packages.
    But I get the same error messages.
    My mobiles are still not syncing.

    Any other hint?

    Cheers Basti


  • Kopano

    Hi Basti,

    did you get the same error messages during the upgrade?

    Manfred



  • Hi @Manfred

    Yes i got the same messages during upgrade/reinstall.

    Cheers Basti


  • Kopano

    Hi Basti,

    so I guess you’ll have to solve the bash-completion issue first.

    Manfred



  • Hi @Manfred

    I got rid of the bash-completion errors, but that was not the problem.

    I simply installed the package z-push-ipc-sharedmemory and that solve my problem.

    Is this a new required package?

    Cheers Basti


  • Kopano

    Hi Basti,

    a shared memory provider (ipc or memcached) is required. It’s mentioned on the installation page: https://wiki.z-hub.io/display/ZP/Installation#Installation-Installpackagesfromrepository.1

    It’s a bit strange that z-push-ipc-sharedmemory wasn’t installed on your system, but that might be the case if you installed Z-Push from sources and switched to packages at some point.

    Manfred



  • Hi @Manfred

    OK. I can’t remember what the installation page said, when i installed z-push.
    No i never installed z-push from source. I installed everything with apt trough the repos.

    Can you add a requirement to z-push? Either z-push-ipc-sharedmemory or z-push-ipc-memcached are required.

    Cheers Basti


  • Kopano

    Hi @sebschremser,

    @sebschremser said in Z-Push 2.5.0 fixstates:

    Can you add a requirement to z-push?

    that requirement is already there if you install Z-Push like it is explained in the install instructions. You have manually installed the individual z-push packages instead of using the Kopano meta package, which would have pulled the ipc package onto your system.



  • Hi @fbartels

    I just install z-push-common but not z-push-kopano.
    In z-push-kopano there is the dependency.
    I will install that package too.

    Thanks for your help.

    Cheers Basti


Log in to reply