Page 1 of 2

json.sync

Published: March 13, 2023 - 2:38 PM
by jdziadek
Hello, my server-side json.sync file doesn't match the files I have on it. It lists old packages and not new ones, so naturally, it's failing on my remote repositories. How can I regenerate it properly?
Julien

Re: json.sync

Published: March 13, 2023 - 4:06 PM
by sfonteneau
Hello,

this file is generated server-side by the "wapttasks" service. You can try restarting the wapttasks service.

Then, in the console, you can click on the "Secondary Repositories" tab -> "Update Index".

Simon Fonteneau

Re: json.sync

Published: March 13, 2023 - 4:08 PM
by sfonteneau
Note that sync.json is created from the sum of files (this therefore takes time and CPU temporarily)

Re: json.sync

Published: March 14, 2023 - 08:13
by jdziadek
sfonteneau wrote: March 13, 2023 - 4:06 PM Hello,

This file is generated server-side by the "wapttasks" service. You can try restarting the wapttasks service.

Then, in the console, you can click on the "Secondary Repositories" tab -> "Update Index".

Simon Fonteneau
Hello, thank you for the reply. What I did yesterday was delete the file, I did a
touch json.sync
I assigned the correct permissions. The console indicated that the file was corrupted, displaying a "missing file" message for about an hour. Now, it's been a good 16 hours since I've had "creating JSON" displayed on my console, and the file is still 0 bytes. However, I've never seen the button to recreate the index

Re: json.sync

Published: March 14, 2023 - 09:58
by sfonteneau
Do you have any secondary repositories that appear in the console?


Alternatively, on the server you can run wapttasks in debug mode to see what it says, then click on "update package index"
(Your message doesn't specify the Wapt version or OS, so I'll assume you're using the latest version of Debian Linux (see forum rules))

Code: Select all

[root@srvwapt.mydom ~]# systemctl stop wapttasks
[root@srvwapt.mydom ~]# /opt/wapt/runwapttasks.sh 
[2023-03-14 09:55:45,216] INFO:huey.consumer:MainThread:Huey consumer started with 2 thread, PID 2215287 at 2023-03-14 09:55:45.216402
[2023-03-14 09:55:45,216] INFO:huey.consumer:MainThread:Scheduler runs every 1 second(s).
[2023-03-14 09:55:45,217] INFO:huey.consumer:MainThread:Periodic tasks are enabled.
[2023-03-14 09:55:45,217] INFO:huey.consumer:MainThread:The following commands are available:
+ waptserver.tasks.resign_crl
+ waptserver.repositories_tasks.update_file_tree_of_files_in_huey
+ waptserver.wsus_tasks.download_wsusscan
+ waptserver.wsus_tasks.download_wsusscan_crontab
+ waptserver.wsus_tasks.cleanup_delete_non_assigned_kb
+ waptserver.wsus_tasks.download_windows_update_task
+ waptserver.wsus_tasks.download_missing_cabs
[2023-03-14 09:55:57,126] INFO:huey:Worker-2:Executing waptserver.repositories_tasks.update_file_tree_of_files_in_huey: 2aee79df-f46a-4ef9-b7ef-5570080ae9d0
[2023-03-14 09:55:57,139] INFO:huey:Worker-2:waptserver.repositories_tasks.update_file_tree_of_files_in_huey: 2aee79df-f46a-4ef9-b7ef-5570080ae9d0 executed in 0.013s

Re: json.sync

Published: March 14, 2023 - 11:05 AM
by jdziadek
I'm definitely on Debian 11 with the latest version. Restarting the service didn't change anything, however, the routine started at exactly 9:00 AM (is it a cron job running?)
The button has now appeared in the console and the server is offering me "TO RESYNC" on my secondary repository.
I click the "update index" button, and I see the same thing in the logs:

Code: Select all

2023-03-14 11:01:02,335] INFO:huey.consumer:MainThread:Huey consumer started with 2 thread, PID 880268 at 2023-03-14 11:01:02.335857
[2023-03-14 11:01:02,336] INFO:huey.consumer:MainThread:Scheduler runs every 1 second(s).
[2023-03-14 11:01:02,336] INFO:huey.consumer:MainThread:Periodic tasks are enabled.
[2023-03-14 11:01:02,336] INFO:huey.consumer:MainThread:The following commands are available:
+ waptserver.tasks.resign_crl
+ waptserver.repositories_tasks.update_file_tree_of_files_in_huey
+ waptserver.wsus_tasks.download_wsusscan
+ waptserver.wsus_tasks.download_wsusscan_crontab
+ waptserver.wsus_tasks.cleanup_delete_non_assigned_kb
+ waptserver.wsus_tasks.download_windows_update_task
+ waptserver.wsus_tasks.download_missing_cabs
[2023-03-14 11:02:00,103] INFO:huey:Worker-1:Executing waptserver.repositories_tasks.update_file_tree_of_files_in_huey: 2d76a36a-071f-4755-83ea-0f4b265eafc3
[2023-03-14 11:02:01,084] INFO:huey:Worker-1:waptserver.repositories_tasks.update_file_tree_of_files_in_huey: 2d76a36a-071f-4755-83ea-0f4b265eafc3 executed in 0.980s
However, the sync doesn't seem to trigger when I click the buttons

Edit: Okay, the sync is working fine, but I still don't have control at the console level. I still need to select "To ressync"

Re: json.sync

Published: March 14, 2023 - 12:11
by sfonteneau
So the sync.json file is okay then? (before checking anything else)

Re: json.sync

Published: March 14, 2023 - 1:08 PM
by jdziadek
Yes, the json.sync file is fine, and replication worked correctly on my remote repository. But the console is still not working properly: "TO RESSYNC"
Julien

Re: json.sync

Published: March 14, 2023 - 2:35 PM
by sfonteneau
Have you set a time limit for syncing?

You can use the "Force sync" button in the right-click menu.

Re: json.sync

Published: March 14, 2023 - 7:26 PM
by jdziadek
sfonteneau wrote: March 14, 2023 - 2:35 PM Have you set a time limit for syncing?

You can use the "Force Sync" button in the right-click menu.
I tried both methods; the synchronization works, all my packages are correctly retrieved by the remote repository, BUT the console still shows an error even though everything is working