[SOLVED] pve-zsync issue

AxelTwin

Well-Known Member
Oct 10, 2017
133
6
58
39
Hi everybody,

I realized the following issue this morning:

Code:
root@proxmox-5:~# pve-zsync list
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/sbin/pve-zsync line 329.

Everything is working fine, snapshot are processed but I get this message when issuing the command.

Tried to swap the /usr/sbin/pve-zsync file with another one from another proxmox server which is working fine but still get the issue
 
Hi,
could you post /var/lib/pve-zsync/sync_state as an attachment and post the output of dpkg-query -W pve-zsync?
 
Hi,
Thanks for your reply. The file /var/lib/pve-zsync/sync_stateis empty.

Code:
root@proxmox-5:~# dpkg-query -W pve-zsync
pve-zsync       2.0-1
 
Please try deleting /var/lib/pve-zsync/sync_state since it is not expected to be empty. It should be recreated automatically when needed and always contain at least {}, i.e. an empty JSON object.
 
done, here is the output now:

Code:
root@proxmox-5:~# rm /var/lib/pve-zsync/sync_state
root@proxmox-5:~# pve-zsync list
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 473.
Use of uninitialized value in sprintf at /usr/sbin/pve-zsync line 474.
SOURCE                   NAME                     STATE     LAST SYNC           TYPE  CON 
103                      PveZsyncSnap                                           undef ssh 
105                      PveZsyncSnap                                           undef ssh 
106                      PveZsyncSnap                                           undef ssh 
125                      PveZsyncSnap                                           undef ssh 
201                      PveZsyncSnap                                           undef ssh 
206                      PveZsyncSnap                                           undef ssh 
207                      PveZsyncSnap                                           undef ssh 
208                      PveZsyncSnap                                           undef ssh 
214                      PveZsyncSnap                                           undef ssh 
311                      PveZsyncSnap                                           undef ssh 

root@proxmox-5:~# pve-zsync status
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1024.
SOURCE                   NAME                     STATUS   
103                      PveZsyncSnap             
105                      PveZsyncSnap             
106                      PveZsyncSnap             
125                      PveZsyncSnap             
201                      PveZsyncSnap             
206                      PveZsyncSnap             
207                      PveZsyncSnap             
208                      PveZsyncSnap             
214                      PveZsyncSnap             
311                      PveZsyncSnap     

root@proxmox-5:~# cat /var/lib/pve-zsync/sync_state
{}
 
Turns out that pve-zsync does not automatically repopulate the state file. You can do the following (the rm is not needed if the file already contains {}):
Code:
root@rob0 ~ # rm /var/lib/pve-zsync/sync_state
root@rob0 ~ # pve-zsync status                
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1055.
Use of uninitialized value in concatenation (.) or string at /usr/sbin/pve-zsync line 1055.
SOURCE                   NAME                     STATUS    
100                      test4                    
100                      test5                    
root@rob0 ~ # pve-zsync enable -source 100 -name test4
root@rob0 ~ # pve-zsync enable -source 100 -name test5
root@rob0 ~ # pve-zsync status                        
SOURCE                   NAME                     STATUS    
100                      test4                    ok
100                      test5                    ok
Of course you should use disable instead of enable for the jobs that should be disabled.
 
  • Like
Reactions: AxelTwin
looking better after enabling and then launching the jobs manually.
I guess just launching the jobs might populate /var/lib/pve-zsync/sync_state automaticaly

Code:
root@proxmox-5:~# pve-zsync list
SOURCE                   NAME                     STATE     LAST SYNC           TYPE  CON
103                      PveZsyncSnap             ok        2020-01-13_16:46:29 lxc   ssh
105                      PveZsyncSnap             ok        2020-01-13_16:47:12 lxc   ssh
106                      PveZsyncSnap             ok        2020-01-13_16:47:26 lxc   ssh
125                      PveZsyncSnap             ok        2020-01-13_16:47:48 lxc   ssh
201                      PveZsyncSnap             ok        2020-01-13_16:56:15 qemu  ssh
206                      PveZsyncSnap             ok        2020-01-13_16:56:40 qemu  ssh
207                      PveZsyncSnap             ok        2020-01-13_16:56:48 qemu  ssh
208                      PveZsyncSnap             ok        2020-01-13_16:57:36 qemu  ssh
214                      PveZsyncSnap             ok        2020-01-13_16:57:47 qemu  ssh
311                      PveZsyncSnap             ok        2020-01-13_16:58:01 lxc   ssh

Thanks for your help
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!