Cryptography will be significantly faster if you switch to using a 64-bit Python

Beim registrieren von neu installierten Agenten auf Server 2016/19 erhalte ich folgende Meldung.
Eine TLS Registrierung nutzen wir nicht aber was ist hier mit “64-bit Python” gemeint bzw. wo kann ich festlegen das dieses “64-bit Python” genutzt wird?
Es gibt ja eh nur noch 64Bit Windows Systeme bei uns.

C:\ProgramData\checkmk\agent\modules\python-3\.venv\lib\site-packages\OpenSSL\_util.py:6: UserWarning: You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python.
  from cryptography.hazmat.bindings.openssl.binding import Binding
Updated the certificate store "C:\ProgramData\checkmk\agent\config\cas\all_certs.pem" with 1 certificate(s)
Going to register agent at deployment server

MfG Paul

1 Like

Interessanter Punkt. Der Python Interpreter wird mit dem Agenten mitgeschickt. In der Bakery lässt sich da auch nur Python 3.4 oder 3.8 auswählen.
Evtl. schicken die Jungs von Tribe29 den 32bit Interpreter wegen compatibilität zu alten 32 bit Systemen?
Muss ich mir mal nächste Woche genauer ansehen.

1 Like

Mir ist das auch schon auf einem meiner Systeme aufgefallen. Allerdings als ich das Agenten Update manuell getriggert hab

I can confirm that the python interpreter in Windows is 32bit:

image

The question now, WHY?
32bit Windows is no longer supported since 2.0.0

@Checkmk_tribe Can you explain why 32bit Python is shipped with the Windows Agent?

1 Like

Ich hatte letztens auch in der Entwicklung nachgefragt: Ja, das 32 Bit Zeug ist aus Kompatibilitätsgründen da, weil es noch einige zahlende Kunden einsetzen. In dem Fall sollte der Performance-Nachteil zu vernachlässigen sein, weil die primäre Stelle, an der das Crypto-Modul genutzt wird, Signatur-Checks sind, bspw. beim Agent Updater. Das sähe anders aus, wenn bei jedem Agentenaufruf viel Crypto involviert wäre (Prüfsummen mitschicken oder so).

Naja, Crypto ist ja nicht der einzige Grund dafür dass Python mitausgeliefert wird.
Kann halt auch nach hinten losgehen wenn ein Library für ein Agent Plugin benötigt wird das nur in 64bit vorliegt.
Wenn jemand noch den 32bit Agenten benutzen muss, dann soller sich halt den 1.6er ohne Python instalieren.

2 Likes

We supply only Python-32 for Windows with checkmk. The reasons are mostly to simplify build, testing and deployment. For example, delivering 64 bit Python to Windows 32 bit could be quite annoying for a customer.
32-bit python can handle any monitoring task just as well as the 64-bit one. The mentioned here problem in this particular case (encryption) does not play any significant role if we are talking about performance.

Dieses Verhalten sollte adressiert werden. Ich bin gerade dabei das Deployment des Agents mit Powershell zu automatisieren. Powershell interpretiert dieses Verhalten als einen Fehler. Das macht das automatische Deployment deutlich umständlicher. So kann das Verhalten nachgestellt werden:

$session = New-PSSession -ComputerName $hostname
...
#Register Host for automatic updates
Invoke-Command -Session $session {& "C:\Program Files (x86)\checkmk\service\check_mk_agent.exe" updater register --server $Using:cmk_server --site $Using:cmk_site --protocol "https" --hostname $Using:hostname --user $Using:user --secret $Using:secret

Output:

C:\ProgramData\checkmk\agent\modules\python-3\.venv\lib\site-packages\OpenSSL\_util.py:6: UserWarning: You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. 
Cryptography will be significantly faster if you switch to using a 64-bit Python.
    + CategoryInfo          : NotSpecified: (C:\ProgramData\... 64-bit Python.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
    + PSComputerName        : ***
 
  from cryptography.hazmat.bindings.openssl.binding import Binding
Successfully registered agent of host "***" for deployment.

Powershell wirft einen Fehler obwohl der Host erfolgreich registriert wurde.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.