Results 1 to 8 of 8

Thread: Problems with a specific user and device

  1. #1
    Senior Member robertwbrandt's Avatar
    Join Date
    Feb 2012
    Location
    Dublin, Ireland
    Posts
    114

    Problems with a specific user and device

    We are still using Z-Push version (althought we are upgrading very soon)

    I have a user that can't setup her account, when I try to look at her account I get:
    Code:
    activesync:/var/lib/z-push# z-push-admin -a list -u zpushuser
    
    Synchronized devices of user: zpushuser
    Folder resync failed: ZPushAdmin::GetDeviceDetails(): device 'sec19e47bc96f3ea' of user 'zpushuser' can not be found
    Just for reference if I try a user that doesn't have a device I get:
    Code:
    activesync:/var/lib/z-push# z-push-admin -a list -u nonzpushuser
    
    	no devices found
    Knowing that she only has one device, I ran the following commands:
    Code:
    activesync:/var/lib/z-push# z-push-admin -a remove -u zpushuser -d sec19e47bc96f3ea
    
    State data of device 'sec19e47bc96f3ea' of user 'kellaghc' removed: ZPushAdmin::RemoveDevice(): device 'sec19e47bc96f3ea' of user 'zpushuser' can not be found
    
    activesync:/var/lib/z-push# z-push-admin -a remove -u zpushuser                    
    
    State data of all devices of user 'kellaghc' removed: ZPushAdmin::RemoveDevice(): removing devices failed for device 'sec19e47bc96f3ea' of user 'zpushuser'. Aborting
    
    activesync:/var/lib/z-push# z-push-admin -a remove -d sec19e47bc96f3ea
    
    State data of device 'sec19e47bc96f3ea' removed: OK
    
    activesync:/var/lib/z-push# z-push-admin -a list -u zpushuser -d sec19e47bc96f3ea
    
    	no user data synchronized to device
    
    activesync:/var/lib/z-push# z-push-admin -a list -u zpushuser                    
    
    Synchronized devices of user: kellaghc
    Folder resync failed: ZPushAdmin::GetDeviceDetails(): device 'sec19e47bc96f3ea' of user 'zpushuser' can not be found
    Still the device won't sync and I get an error when looking up the user...

    thinking there might be "hidden" state data for this user or device I ran these commands:
    Code:
    activesync:/var/lib/z-push# find ./ -iname "*-devicedata" -exec grep -iH "zpushuser" "{}" \;
    activesync:/var/lib/z-push# find ./ -iname "sec19e47bc96f3ea"                  
    activesync:/var/lib/z-push#
    Nothing!!!

    Any ideas?
    Thanks, Bob

    ---------- Post added ----------

    So I think I found the problem...

    There is a file called "users" with a weird format...
    Code:
    a:261:{s:7:"user1";a:1:{s:16:"sec10df1c10a7596";i:1;}s:7:"user2";a:1:{s:18:"androidc1602445527";i:1;}s:8:"user3";a:1:{s:16:"sec1d95118a7a155";i:1;}s:8:"user4";a:1:{s:16:"sec1b735e33b6df4";i:1;}....
    I think it can be expanded like this...
    Code:
    a:261:{s:7:"user1";a:1:{s:16:"sec10df1c10a7596";i:1;}
    s:7:"user2";a:1:{s:18:"androidc1602445527";i:1;}
    s:8:"user3";a:1:{s:16:"sec1d95118a7a155";i:1;}
    s:8:"user4";a:1:{s:16:"sec1b735e33b6df4";i:1;}
    ....
    I'm also assuming the 261 at the beginning is the number of users.

    I did find zpushuser in this list, and I removed that entry, compacted the file and restarted Apache... But the z-push-admin commands showed that NO ONE had any devices after that. I had to quickly return to a backup of the file and after that everythign worked...

    I think this file is the problem but I'm wondering how best to fix it.

    Bob

  2. #2
    Zarafa

    Join Date
    Jan 2009
    Location
    Hanover, Germany
    Posts
    1,890
    Hi Bob,

    are you maybe looking for "z-push-admin -a fixstates"? What kind of a problem do you see with the users file? That he user in question is listed there?

    I think a wbxml of the user could be interesting to see why the devices does not want to sync. As well as the actual version and device you are using (you only write "still using Z-Push version" without the actual version).
    Regards Felix

    How to get Kopano

    Zarafa ALPHA/BETA/RC feedback in BETA forum please.
    Zarafa IRC chat: irc.freenode.com > #zarafa
    Zarafa documentation: http://documentation.zarafa.com/

    No support via PM! Please contact our sales team for an offer if you want my full attention.

  3. #3
    Senior Member robertwbrandt's Avatar
    Join Date
    Feb 2012
    Location
    Dublin, Ireland
    Posts
    114
    I tried "fixstates" and that didn't do anything...

    The problem is I can see the problem user in question and the device it is complaining about in the users file. But there is no state file for that device anywhere in the states folder structure.

    Is there a way to "fix" the users file?

    Thanks
    Bob

  4. #4
    Zarafa

    Join Date
    Jan 2009
    Location
    Hanover, Germany
    Posts
    1,890
    If there is something to fix, then fixstates should fix it. While it may be true that the user is already in the users file, I am not really sure that is is also why it does not synchronise. This bit of information should be in the wbxml of that user.
    Regards Felix

    How to get Kopano

    Zarafa ALPHA/BETA/RC feedback in BETA forum please.
    Zarafa IRC chat: irc.freenode.com > #zarafa
    Zarafa documentation: http://documentation.zarafa.com/

    No support via PM! Please contact our sales team for an offer if you want my full attention.

  5. #5
    Senior Member
    Join Date
    Sep 2007
    Location
    Aka SebastianBrasil
    Posts
    1,467
    Let me try put some light in this. The format of the users file is php's serialization format. The first number is not the amount of users, but the amount of elements in the array this file holds (which you could define as almost the same). Still, if you remove one line you need to adjust the number here. In general I wouldn't advise manipulating these files manually!

    A few questions:
    - Which version of Z-Push are you using? I think you wanted to say it in the first post, but the number is actually not there.
    - What is the exact problem the user is having? What means "can't setup her account" exactly?
    - What Android version is installed on this samsung device?

    From the device id, the states should be located in /usr/lib/z-push/a/e/ and the filename starts with sec19e47bc96f3ea-*. If there is nothing there, then the states were already deleted (or never created). You can manually delete these files. This is btw exactly what "z-push-admin -a remove" does. It just removes these files.

    The line in the 'users' file does not influence anything. It's just a mapping and you can leave it there.

    In general, account setup is not related to any states. You should always be able to setup the account. This should not be blocked by any state, unless perhaps you have some permissions issue on your state directory.

    I guess there is some issue on the OPTIONS request or in the provisioning.

    Try creating a special log (add the username to $specialLogUsers in the config) for the user. This way the log is only created for the specified user and others are not affected.
    I really think this is not state related at all, probably some other issue which we can probably figure out by looking at the log.
    Feel free to send me/post this log.

    Cheers,
    Sebastian

  6. #6
    Senior Member robertwbrandt's Avatar
    Join Date
    Feb 2012
    Location
    Dublin, Ireland
    Posts
    114
    You mentioned WBXML a couple times, but I can't find how to get the WBXML of a specific user.

    Bob

  7. #7
    Senior Member
    Join Date
    Sep 2007
    Location
    Aka SebastianBrasil
    Posts
    1,467
    Edit your config file. There is this block there. Put the username in the setting, so it looks like this:

    Code:
        // To save e.g. WBXML data only for selected users, add the usernames to the array
        // The data will be saved into a dedicated file per user in the LOGFILEDIR
        // Users have to be encapusulated in quotes, several users are comma separated, like:
        //   $specialLogUsers = array('[email protected]', 'myusername');
        define('LOGUSERLEVEL', LOGLEVEL_DEVICEID);
        $specialLogUsers = array('zpushuser');
    If the user uses an email address as login, fill that one in.

    Tell the user to try again. In your /var/log/z-push there will be a file named zpushuser.log.

    Cheers,
    Sebastian

  8. #8
    Senior Member robertwbrandt's Avatar
    Join Date
    Feb 2012
    Location
    Dublin, Ireland
    Posts
    114
    Quote Originally Posted by Sebastian View Post
    Edit your config file. There is this block there. Put the username in the setting, so it looks like this:
    Code:
    $specialLogUsers = array('zpushuser');
    If the user uses an email address as login, fill that one in.
    Tell the user to try again. In your /var/log/z-push there will be a file named zpushuser.log.
    This was spot on! Once I got ahold of the phone and could perform the tests we found that the FATAL error in the log was:
    Code:
    4/01/2017 13:11:20 [20935] [FATAL] [zpushuser] [RANDOMDEVICEIDea] FatalMisconfigurationException: FileStateMachine->SetState(): Could not write state '/var/lib/z-push/a/e/RANDOMDEVICEIDea-devicedata' - code: 0 - file: /usr/share/z-push/lib/default/filestatemachine.php:158
    zarafa-activesync:~# l /var/lib/z-push/a/e/RANDOMDEVICEIDea-devicedata
    ls: cannot access /var/lib/z-push/a/e/RANDOMDEVICEIDea-devicedata: No such file or directory
    I later found that the directory /var/lib/z-push/a/e was owned by root, the www-data user had no access! How this happened is beyond me, but changing the permissions for the directory back fixed the problem immediately!

Similar Threads

  1. Problem opening Inbox for one specific user
    By robertwbrandt in forum WebApp
    Replies: 3
    Last Post: 04-03-2016, 07:45 AM
  2. caldav authentication fails for 1 specific user
    By eskobaba in forum Other mail/calendar clients
    Replies: 2
    Last Post: 02-02-2015, 02:32 PM
  3. disable Z-Üush for specific user?
    By thomas1977 in forum Z-Push when using Kopano/Zarafa
    Replies: 1
    Last Post: 25-05-2014, 03:09 AM
  4. Replies: 3
    Last Post: 03-12-2012, 01:41 PM
  5. Shared mail, not addressed to a specific user
    By froggie in forum Installation and Configuration Archives
    Replies: 1
    Last Post: 01-03-2008, 11:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •