Page 1 of 1

[RESOLVED] SYNC_ERROR secondary repository

Published: September 25, 2024 - 01:19
by ddcorazon
Hello everyone,

I just started creating a secondary repository on a Linux agent and I'm getting a sync error.

Regarding what has been done
Installation of the Ubuntu Linux agent version 22.04 and then addition to the WAPT server
Install the remote-repo-conf package (version 2.10) and the remote-repo-nginx package (version 1.3.2.25)

Once done, I launched the index update and then the synchronization; it progressed to 99% and then went into sync_error, and I have no further information, so I am stuck.
Could you help me troubleshoot this, or failing that, provide me with the log file under Linux so I can take a closer look (I have nothing in /var/log/waptservice.log or in /var/log/wapt-get/)?
Thanks in advance

Below is my wapt-get.ini file

Code: Select all

[global]
repo_url=https://wapt.urldemonserveur.net/wapt
wapt_server=https://wapt.urldemonserveur.net
verify_cert=0
use_repo_rules=1
include_dmi_inventory=1
allow_remote_reboot=1
wol_relay=1
allow_remote_shutdown=1
use_fqdn_as_uuid=1
host_organizational_unit_dn=OU=serveurs,DC=fake,DC=local
maturities=PROD,PREPROD,DEV


[repo-sync]
enable_remote_repo = True
  • WAPT Server version: 2.5.5.15697 Enterprise (installed on Ubuntu 20.04)
  • WAPT Agent version: 2.5.5.15697
Screenshot 2024-09-25 012112.png
Screenshot 2024-09-25 012112.png (15.24 KB) Viewed 3054 times
Screenshot 2024-09-25 012243.png
Screenshot 2024-09-25 012243.png (33.04 KB) Viewed 3053 times

Re: SYNC_ERROR secondary repository-

Published: September 25, 2024 - 11:49 PM
by ddcorazon
Good news,

My repository is synced, I saw that there was an error with wads (I don't do any so I unchecked it in the list of repo to sync).

However, a new problem has arisen. I added a rule to force the local repository on one of my machines for testing purposes. The machine's console correctly shows that it's on the local repository, but when I add a package as a dependency, nothing happens. I've tried rebooting the WAPT service, but it doesn't do anything; it's as if I hadn't added any software as a dependency.
When I go to the dependency addition level, I can see the latest ones added, however, when I launch the installations, it does absolutely nothing.
PS:
When I remove the option to force the secondary repo, everything works again.
I have errors in the nginx logs

Code: Select all

192.168.33.39 - - [25/Sep/2024:21:27:15 +0000] "GET /wapt/packages HTTP/1.1" 404 564 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0"
192.168.33.95 - - [25/Sep/2024:21:27:36 +0000] "HEAD /wapt/Packages HTTP/1.1" 200 0 "-" "wapt/2.5.5"
192.168.33.95 - - [25/Sep/2024:21:27:36 +0000] "HEAD /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1" 404 0 "-" "wapt/2.5.5"
192.168.33.95 - - [25/Sep/2024:21:27:36 +0000] "GET /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1" 404 162 "-" "wapt/2.5.5"
192.168.33.95 - - [25/Sep/2024:21:27:41 +0000] "HEAD /wapt/Packages HTTP/1.1" 200 0 "-" "wapt/2.5.5"
192.168.33.95 - - [25/Sep/2024:21:27:41 +0000] "HEAD /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1" 404 0 "-" "wapt/2.5.5"
192.168.33.95 - - [25/Sep/2024:21:27:41 +0000] "GET /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1" 404 162 "-" "wapt/2.5.5"
192.168.33.95 - - [25/Sep/2024:21:29:50 +0000] "HEAD /wapt/Packages HTTP/1.1" 200 0 "-" "wapt/2.5.5"
192.168.33.95 - - [25/Sep/2024:21:29:50 +0000] "HEAD /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1" 404 0 "-" "wapt/2.5.5"
192.168.33.95 - - [25/Sep/2024:21:29:50 +0000] "GET /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1" 404 162 "-" "wapt/2.5.5"









root@repo-client:/opt/wapt/repository# tail -f /var/log/nginx/error.log
2024/09/25 21:27:15 [error] 2081#2081: *72 open() "/opt/wapt/repository/wapt/packages" failed (2: No such file or directory), client: 192.168.33.39, server: _, request: "GET /wapt/packages HTTP/1.1", host: "repo-client.wapt.urldemonserveur.net"
2024/09/25 21:27:36 [error] 2081#2081: *74 open() "/opt/wapt/repository/wapt-host/pctest24.mondomaine.local.wapt" failed (2: No such file or directory), client: 192.168.33.95, server: _, request: "HEAD /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1", host: "repo-client.wapt.urldemonserveur.net"
2024/09/25 21:27:36 [error] 2081#2081: *75 open() "/opt/wapt/repository/wapt-host/pctest24.mondomaine.local.wapt" failed (2: No such file or directory), client: 192.168.33.95, server: _, request: "GET /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1", host: "repo-client.wapt.urldemonserveur.net"
2024/09/25 21:27:41 [error] 2081#2081: *77 open() "/opt/wapt/repository/wapt-host/pctest24.mondomaine.local.wapt" failed (2: No such file or directory), client: 192.168.33.95, server: _, request: "HEAD /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1", host: "repo-client.wapt.urldemonserveur.net"
2024/09/25 21:27:41 [error] 2081#2081: *78 open() "/opt/wapt/repository/wapt-host/pctest24.mondomaine.local.wapt" failed (2: No such file or directory), client: 192.168.33.95, server: _, request: "GET /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1", host: "repo-client.wapt.urldemonserveur.net"
2024/09/25 21:29:12 [warn] 2906#2906: "ssl_stapling" ignored, issuer certificate not found for certificate "/opt/wapt/waptservice/nginx/ssl/cert.pem"
2024/09/25 21:29:13 [warn] 3041#3041: "ssl_stapling" ignored, issuer certificate not found for certificate "/opt/wapt/waptservice/nginx/ssl/cert.pem"
2024/09/25 21:29:13 [warn] 3045#3045: "ssl_stapling" ignored, issuer certificate not found for certificate "/opt/wapt/waptservice/nginx/ssl/cert.pem"
2024/09/25 21:29:50 [error] 3049#3049: *2 open() "/opt/wapt/repository/wapt-host/pctest24.mondomaine.local.wapt" failed (2: No such file or directory), client: 192.168.33.95, server: _, request: "HEAD /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1", host: "repo-client.wapt.urldemonserveur.net"
2024/09/25 21:29:50 [error] 3049#3049: *3 open() "/opt/wapt/repository/wapt-host/pctest24.mondomaine.local.wapt" failed (2: No such file or directory), client: 192.168.33.95, server: _, request: "GET /wapt-host/pctest24.mondomaine.local.wapt HTTP/1.1", host: "repo-client.wapt.urldemonserveur.net"

I see that it's trying to access a directory called /opt/wapt/repository/wapt-host, but I don't have that directory on my server, so I assume that's the source of the problem? Should it have been created manually? Did I miss something in the configuration?

Code: Select all

root@repo-client:/opt/wapt/repository# ls -la
total 168
drwxr-xr-x  4 root www-data   4096 sept. 25 20:02 .
drwxr-xr-x 17 root root       4096 sept. 25 21:37 ..
-rw-r--r--  1 root root     114831 sept. 25 21:27 sync.json
drwxr-xr-x  5 root www-data   4096 sept. 25 21:04 wapt
drwxr-xr-x  2 root www-data  40960 sept. 25 20:02 waptwua
root@repo-client:/opt/wapt/repository#

Re: SYNC_ERROR secondary repository-

Published: November 27, 2024 - 09:10
by fschelfaut
Hello,

In the agent configuration, `use_repo_rules` should not be set to 1 , otherwise the repository will point to itself and therefore will not synchronize directly with your master WAPT server.

For secondary repositories, this parameter should be set to 0 (false). Remember to restart the service afterward for the change to take effect!

Flavien,