jotta / jotta-cli-issues

45 stars 1 forks source link

Error: rpc error: code = Unknown desc = token: Stale token. #110

Open AngryBalloon opened 4 years ago

AngryBalloon commented 4 years ago

I'm having issues with Jottacloud CLI client for Linux on one of my Ubuntu servers running 18.04.4.

jotta-cli release (jotta-cli version): version command not working but running latest version from repo "https://repo.jotta.us/debian debian InRelease"

Description of problem: Client has been running smoothly for some time but i noticed that last successful backup from this server was on feb-10. Any command to jotta-cli (even version command) returns

Error: rpc error: code = Unknown desc = token: Stale token.

Login/logout command does not work wither. The only command working is jotta-cli --help

Service is confirmed running with systemctl and I have also restarted it.

Expected: Commands to be responding as per the documentation

jotta-cli status (jotta-cli status): Command not working

Relevant logs for the issue (cat ~/.jottad/jottabackup.log) Same two errors repeating over and over again.

pid:45408 2020/03/09 09:33:32 waiting for remote session confirmation
pid:45408 2020/03/09 09:33:43 jottad.auth.err => Stale token
pid:45408 2020/03/09 09:34:02 waiting for remote session confirmation
pid:45408 2020/03/09 09:34:13 jottad.auth.err => Stale token

Additional info: Ubuntu 18.04.4 Only having this issue on one of my two Ubuntu servers running Jottacloud CLI

Kimbsen commented 4 years ago

Not sure what the problem is but if you delete /var/lib/jottad or whatever your application data folder is you can login again and start over.

If you send the logfile /var/lib/jottad/jottabackup.log and /var/lib/jottad/nstore to support@jottacloud.com i'll take a look at it and figure out whats going wrong.

AngryBalloon commented 4 years ago

I removed the data folder /var/lib/jottad but after that the service won't start. Recreated an empty /var/lib/jottad folder but did not help. Also removed the apt package and installed it again, still no success in starting the service. Anyhow, sent the files you requested before I did the above mentioned. Please let me know if there is anything else I can provide.

Kimbsen commented 4 years ago

Right, I forgot to mention that you need jottad to be able to read and write in the /var/lib/jottad folder to be able to start. Sorry about that. So if you are running jottad as the jottad user you can "sudo chown jottad:jottad /var/lib/jottad" and it should start.

I'll take a look at the files you sent me next week.

AngryBalloon commented 4 years ago

It's working again after removing the config folder and creating a new with correct permissions. Let's see if you find anything from the logs what caused this.

eljejer commented 4 years ago

Same problem with me: Stale token

eljejer commented 3 years ago

Today, after some distro hopping, I experience this problem again. I have deleted /var/lib/jottad and rebooted. The jottad service is started and I log in again and add the backup folders. Right now jottad is checksumming the previously backed up files and this will take some time. Is this really the only work around for this stale token problem at the moment?

Kimbsen commented 3 years ago

We are still looking into this. We have been able to force this error but we are still not able to reproduce it under normal conditions.

We assume this has something to do with the way we persist the tokendata.

What would be very useful for further investigation is to get a logfile from a current client that has encountered this. The one logfile we have did not have enough information to determine if the persisted data has been rolled back or otherwise corrupted. The current clients logfile should provide this information. So if anyone encounters this again please send the logfile to support@jottacloud.com before resetting the appdata folder.

eljejer commented 3 years ago

We are still looking into this. We have been able to force this error but we are still not able to reproduce it under normal conditions.

We assume this has something to do with the way we persist the tokendata.

What would be very useful for further investigation is to get a logfile from a current client that has encountered this. The one logfile we have did not have enough information to determine if the persisted data has been rolled back or otherwise corrupted. The current clients logfile should provide this information. So if anyone encounters this again please send the logfile to support@jottacloud.com before resetting the appdata folder.

I will keep an eye on this and provide log when the error re-occurs