[RESOLU] Unable to create waptagent
Posté : 02 juin 2024 - 20:39
Hi there,
I am trying to create a custom windows waptagent.exe on linux with the following command:
The output looks like this:
It fails with 20240602 18312743 ! EXC Exception {Message:"2.5.5.15602 -0 is not a valid version string"} [Main] at 78d54d
There is clearly some spacing when adding the build number, this is broken in wapt. Please fix it.
I am trying to create a custom windows waptagent.exe on linux with the following command:
Code : Tout sélectionner
wapt-get build-waptagent --private-key-passwd="pass" --wapt-server-user="admin" --wapt-server-passwd="password" -l debug --config-name=default
The output looks like this:
Code : Tout sélectionner
Logging to /opt/wapt/log/
Building customized waptagent.exe installer
--- Embedded json configuration ----
global:
repo_url: "https://repo.wapt/",
wapt_server: "https://wapt",
verify_cert: "1",
use_kerberos: true,
use_fqdn_as_uuid: true,
include_dmi_inventory: true,
include_wmi_inventory: true
certificates: "moritz"
server_certificates:
------------------------------------
20240602 18312414 ! info SetThreadName 7fdcb2813040 140585864343616=Main
20240602 18312414 ! + mormot.db.raw.sqlite3.TSqlDatabase(7fdcb2743340).DBOpen waptdb.sqlite
20240602 18312414 ! SQL mormot.db.raw.sqlite3.TSqlDatabase(7fdcb2743340) 27us waptdb.sqlite PRAGMA page_size=4096 = true
20240602 18312414 ! SQL mormot.db.raw.sqlite3.TSqlDatabase(7fdcb2743340) 266us waptdb.sqlite PRAGMA cache_size=10000 = true
20240602 18312414 ! SQL mormot.db.raw.sqlite3.TSqlDatabase(7fdcb2743340) 23us waptdb.sqlite select count(*) from sqlite_master = true
20240602 18312414 ! DB mormot.db.raw.sqlite3.TSqlDatabase(7fdcb2743340) "/opt/wapt/db/waptdb.sqlite" database file (92 KB) opened with PageSize=4096 CacheSize=10000 (39 MB)
20240602 18312414 ! - 00.000.522
Server: https://wapt
20240602 18312414 ! + TWaptServer.HttpGetString URL https://wapt/ping?with_version=%s
20240602 18312414 ! debug Get httpclient
20240602 18312414 ! + TWaptServer.GetHttpClient(ping?with_version=%s)
20240602 18312414 ! + InitHttpTlsContext(TLSContext 7fdcb2780d80, Url https://wapt, ServerCABundle 1, ClientCertificatePath , ClientPrivateKeyPath , OnGetPrivateKeyPassword 7ffc690e7330, OnPeerCertValidate 7ffc690e7340)
20240602 18312414 ! + BuildFullPeerCertChainFromServer https://wapt
20240602 18312414 ! + GetSystemCABundlePath
20240602 18312414 ! debug GetSystemCABundlePath: /etc/ssl/certs/ca-certificates.crt
20240602 18312414 ! - 00.000.028
20240602 18312414 ! + AddPemFromFile /etc/ssl/certs/ca-certificates.crt
20240602 18312414 ! + TX509CertificatesChainHelper.InitFromPEM
20240602 18312415 ! trace 141 loaded certificates from pemdata
20240602 18312415 ! - 00.012.889
20240602 18312415 ! + AddCertificates
20240602 18312415 ! - 00.000.380
20240602 18312415 ! - 00.013.395
20240602 18312415 ! + GetPeerCertChainFromServer https://wapt
20240602 18312438 ! - 00.361.697
20240602 18312438 ! + GetCertificatesChainFromFingerprint 94521002032d188630f2c776775672d5fd78797a3b1068ee450d0f5217a68d7d
20240602 18312438 ! - 00.000.073
20240602 18312438 ! - 00.376.497
20240602 18312438 ! - 00.380.396
20240602 18312460 ! - 00.727.630
20240602 18312460 ! debug mormot.net.client.THttpClientSocket(7fdcb2791310) done httpclient
20240602 18312504 ! - 00.838.766
Server UUID: 943f3e6e-e68d-11eb-a5ee-00163effba82
Server CABundle: 1
Server client certificate:
Server client key:
20240602 18312504 ! + uwaptserverconnection.TWaptServer(7fdcb2780a70).Login server:https://wapt user:admin
20240602 18312508 ! + TWaptServer.HttpGetString URL https://wapt/api/v3/login
20240602 18312508 ! debug Get httpclient
20240602 18312508 ! + TWaptServer.GetHttpClient(api/v3/login)
20240602 18312508 ! + InitHttpTlsContext(TLSContext 7fdcb2780d80, Url https://wapt, ServerCABundle 1, ClientCertificatePath , ClientPrivateKeyPath /tmp/tc-961f4fe3ad1f27d76a3acdaad061cc2e.pem, OnGetPrivateKeyPassword 7ffc690e7110, OnPeerCertValidate 7ffc690e7120)
20240602 18312508 ! - 00.000.030
20240602 18312529 ! - 00.337.583
20240602 18312529 ! debug mormot.net.client.THttpClientSocket(7fdcb20f7370) done httpclient
20240602 18312561 ! - 00.853.608
20240602 18312561 ! - 00.918.080
20240602 18312561 ! + TWaptServer.GetHttpClient(api/v3/add_configurations?set_waptagent=%s)
20240602 18312561 ! + InitHttpTlsContext(TLSContext 7fdcb2780d80, Url https://wapt, ServerCABundle 1, ClientCertificatePath /tmp/tc-961f4fe3ad1f27d76a3acdaad061cc2e.crt, ClientPrivateKeyPath /tmp/tc-961f4fe3ad1f27d76a3acdaad061cc2e.pem, OnGetPrivateKeyPassword 7ffc690e7910, OnPeerCertValidate 7ffc690e7920)
20240602 18312561 ! - 00.000.050
20240602 18312621 ! - 00.358.012
20240602 18312635 ! + TWaptServer.JsonGetDV api/v3/get_hash_json_content
20240602 18312635 ! + TWaptServer.HttpGetString URL https://wapt/api/v3/get_hash_json_content
20240602 18312635 ! debug Get httpclient
20240602 18312635 ! + TWaptServer.GetHttpClient(api/v3/get_hash_json_content)
20240602 18312635 ! - 00.000.019
20240602 18312635 ! debug mormot.net.client.THttpClientSocket(7fdcb20f6f70) done httpclient
20240602 18312643 ! - 00.136.144
20240602 18312643 ! - 00.136.237
20240602 18312643 ! + TX509CertificatesChainHelper.InitFromPEM
20240602 18312643 ! trace 1 loaded certificates from pemdata
20240602 18312643 ! - 00.000.320
20240602 18312643 ! + AddCertificates
20240602 18312643 ! - 00.000.025
20240602 18312643 ! + GetCertificatesChainFromFingerprint Tranquil I.T. Systems
20240602 18312643 ! - 00.000.009
20240602 18312643 ! + TWaptServer.GetHttpClient(wapt/waptagent/waptsetup.exe)
20240602 18312643 ! - 00.000.019
Downloading waptsetup.exe: 20240602 18312656 ! EXC EKeyNotFoundException {Message:"Key 'InternalName' not found"} [Main] at 686bdd
20240602 18312656 ! + UpdatePackageIndex 0
20240602 18312656 ! + NeedUpdate https://repo.wapt
20240602 18312656 ! + FileIsNewerOrDifferentOnServer Packages /root/.config/wapt-get/cache/repo.wapt-/Packages
20240602 18312656 ! + WaptWget_Try https://repo.wapt/Packages
20240602 18312656 ! + InitHttpTlsContext(TLSContext 7ffc690e7440, Url https://repo.wapt/Packages, ServerCABundle 1, ClientCertificatePath /tmp/tc-961f4fe3ad1f27d76a3acdaad061cc2e.crt, ClientPrivateKeyPath /tmp/tc-961f4fe3ad1f27d76a3acdaad061cc2e.pem, OnGetPrivateKeyPassword 7ffc690e7250, OnPeerCertValidate 7ffc690e7260)
20240602 18312656 ! + BuildFullPeerCertChainFromServer https://repo.wapt/Packages
20240602 18312656 ! + GetSystemCABundlePath
20240602 18312656 ! debug GetSystemCABundlePath: /etc/ssl/certs/ca-certificates.crt
20240602 18312656 ! - 00.000.077
20240602 18312656 ! + AddPemFromFile /etc/ssl/certs/ca-certificates.crt
20240602 18312656 ! + TX509CertificatesChainHelper.InitFromPEM
20240602 18312657 ! trace 141 loaded certificates from pemdata
20240602 18312657 ! - 00.016.515
20240602 18312657 ! + AddCertificates
20240602 18312657 ! - 00.000.469
20240602 18312657 ! - 00.017.318
20240602 18312657 ! + GetPeerCertChainFromServer https://repo.wapt/Packages
20240602 18312710 ! - 00.245.932
20240602 18312710 ! + GetCertificatesChainFromFingerprint 94521002032d188630f2c776775672d5fd78797a3b1068ee450d0f5217a68d7d
20240602 18312710 ! - 00.000.059
20240602 18312710 ! - 00.264.804
20240602 18312710 ! - 00.270.457
20240602 18312734 ! - 00.647.862
20240602 18312734 ! - 00.647.938
20240602 18312734 ! debug https://repo.wapt needs update: 0
20240602 18312734 ! - 00.647.980
20240602 18312735 ! - 00.661.799
20240602 18312735 ! + ReadAndParsePackagesIndex
20240602 18312736 ! - 00.022.695
20240602 18312741 ! + TX509CertificatesChainHelper.InitFromPEM
20240602 18312741 ! trace 1 loaded certificates from pemdata
20240602 18312741 ! - 00.000.105
20240602 18312743 ! EXC Exception {Message:"2.5.5.15602 -0 is not a valid version string"} [Main] at 78d54d
Exception at 000000000078D54D: Exception:
2.5.5.15602 -0 is not a valid version string.
20240602 18312743 ! + TWaptServer.HttpGetString URL https://wapt/api/v3/logout
20240602 18312743 ! debug Get httpclient
20240602 18312743 ! + TWaptServer.GetHttpClient(api/v3/logout)
20240602 18312743 ! - 00.000.016
20240602 18312743 ! debug mormot.net.client.THttpClientSocket(7fdcb20f6f70) done httpclient
20240602 18312751 ! - 00.124.705
20240602 18312751 ! + mormot.db.raw.sqlite3.TSqlDatabase(7fdcb2743340).Destroy waptdb.sqlite
20240602 18312751 ! + mormot.db.raw.sqlite3.TSqlDatabase(7fdcb2743340).DBClose
20240602 18312751 ! DB mormot.db.raw.sqlite3.TSqlDatabase(7fdcb2743340) closing [/opt/wapt/db/waptdb.sqlite] 92 KB
20240602 18312751 ! - 00.000.150
20240602 18312751 ! - 00.000.177
It fails with 20240602 18312743 ! EXC Exception {Message:"2.5.5.15602 -0 is not a valid version string"} [Main] at 78d54d
There is clearly some spacing when adding the build number, this is broken in wapt. Please fix it.