Seite 1 von 1

Connection Timeout for opsi-cli package install

Verfasst: 05 Jun 2025, 18:06
von malte.gerth
If we are trying to install a package to a remote depot using opsi-cli, we are getting nearly instant timeouts.

Code: Alles auswählen

opsi-cli package install --depots ${OPSI_DEPOT} dist/${PRODUCT_NAME}_${PRODUCT_VERSION}-${PACKAGE_VERSION}.opsi

Code: Alles auswählen

Analyzing 1 package... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Uploading 'test_1.0-v1.1.0.opsi'...                                            1% 0:00:51
╭─ Error ──────────────────────────────────────────────────────────────╮
│ Opsi service connection error: ('Connection aborted.', TimeoutError('The write operation timed out')) 
╰─ ───── ──────────────────────────────────────────────────────────────╯
If we try to upload the package to our on-site depot, if is working if the package is not to big.

Code: Alles auswählen

Analyzing 1 package... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Uploading 'test_1.0-v1.1.0.opsi'... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Uploading 'test_1.0-v1.1.0.opsi.md5'... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Uploading 'test_1.0-v1.1.0.opsi.zsync'... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Installing 'test_1.0-v1.1.0.opsi' on depot 'opsi.moll-group.local'... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Requesting the current state from the remote depot is working, despite it is very slow.

Code: Alles auswählen

$ opsi-cli --attributes product_id,product_version,package_version package list --depots ${OPSI_DEPOT} ${PRODUCT_NAME}
╭────────────┬─────────────────┬─────────────────╮
│ product_id │ product_version │ package_version │
├────────────┼─────────────────┼─────────────────┤
│ test       │ 1.0             │ v1.0.7          │
╰────────────┴─────────────────┴─────────────────╯

Re: Connection Timeout for opsi-cli package install

Verfasst: 06 Jun 2025, 08:36
von j.schneider
Hello,

thanks for reporting!
This now fixed with version 4.3.23.2 (experimental repo).
Timeout is now 24 h.
You can use the following command to upgrade:

Code: Alles auswählen

opsi-cli self upgrade --branch=experimental
Best regards,
Jan Schneider

Re: Connection Timeout for opsi-cli package install

Verfasst: 06 Jun 2025, 14:28
von malte.gerth
Thanks for the quick response.
I'm sorry, but the self upgrade didn't solved the write timeout issue.

Code: Alles auswählen

$ opsi-cli self upgrade --branch=experimental
Downloading opsi-cli from 'https://tools.43.opsi.org/experimental/opsi-cli-linux-x64.run'.
Downloading opsi-cli... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Upgrading '/usr/bin/opsi-cli' to 4.3.23.2.
$ echo "install OPSI package:" # collapsed multi-line command
install OPSI package:
id = test
package version = v1.1.3
product version = 1.0
$ echo "current installed version in depot '${OPSI_DEPOT}':" # collapsed multi-line command
current installed version in depot 'opsi-depot-strasbourg.moll-strassbourg.lan':
╭────────────┬─────────────────┬─────────────────╮
│ product_id │ product_version │ package_version │
├────────────┼─────────────────┼─────────────────┤
│ test       │ 1.0             │ v1.1.2          │
╰────────────┴─────────────────┴─────────────────╯
$ echo "Install package to depot '${OPSI_DEPOT}' ..." # collapsed multi-line command
Install package to depot 'opsi-depot-strasbourg.moll-strassbourg.lan' ...
Analyzing 1 package... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Uploading 'test_1.0-v1.1.3.opsi' to depot 'opsi-depot-strasbourg.moll-strassbourg.lan'... ━╸                                         4% 0:00:02
╭─ Error─╮
│ Opsi service connection error: ('Connection aborted.', TimeoutError('The write operation timed out'))│ 
Last log lines with log level set to debug

Code: Alles auswählen

Uploading 'test__test-ci_1.0-dev484466.opsi' to depot 'opsi-depot-strasbourg.moll-strassbourg.lan'... ━╸                                         5% 0:00:02
[7] [2025-06-06 14:48:25.697] [               ] Starting new HTTPS connection (2): 192.168.164.15:4447   (connectionpool.py:1049)
[7] [2025-06-06 14:48:25.766] [               ] https://192.168.164.15:4447 "POST /session/logout HTTP/1.1" 200 17   (connectionpool.py:544)
[3] [2025-06-06 14:48:25.766] [               ] Opsi service connection error: ('Connection aborted.', TimeoutError('The write operation timed out'))   (__main__.py:90)
╭─ Error ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Opsi service connection error: ('Connection aborted.', TimeoutError('The write operation timed out'))                                                                                                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
                                                                                                                                                                                                        
[7] [2025-06-06 14:48:25.767] [               ] Cache exit   (cache.py:37)
Bildschirmfoto 2025-06-06 um 14.24.49.png
Bildschirmfoto 2025-06-06 um 14.24.49.png (106.36 KiB) 550 mal betrachtet

Re: Connection Timeout for opsi-cli package install

Verfasst: 06 Jun 2025, 17:03
von j.schneider
Sorry, more difficult to fix than expected.
Please try version 4.3.23.3 (experimental repo).

Re: Connection Timeout for opsi-cli package install

Verfasst: 06 Jun 2025, 18:26
von malte.gerth
Thank you very much.

The latest version seems to be working.