Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Valentino-46
Beiträge: 280
Registriert: 05 Aug 2011, 14:24

Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von Valentino-46 »

Hallo zusammen,

ich habe aktuell das Problem, dass ich keine größeren OPSI Pakete mehr ins Repository Uploaden kann:
opsi-package-manager -u paket.opsi

Das Paket ist aktuell 13 Gigabyte groß und läuft in einen Timeout. Dieser ist aktuell voraussichtlich 60 Sekunden und ich weiß nicht, wie ich diesen erhöhen kann und welches timeout das überhaupt betrifft!?

RPC Timeout der Funktion HTTPSConnectionPool.

Code: Alles auswählen

JSONRPC request to https://OPSI-SERVERNAMEN.DOMAIN:4447/rpc: ip_version=auto, id=1, method=backend_getInterface, Content-Type=application/json, Content-Encoding=, timeout=60   (jsonrpc.py:387)

Code: Alles auswählen

[5] [2021-11-24 11:28:42.489] [               ] Processing upload of 'opsipaketname_v1-1.opsi' to depot 'OPSI-SERVERNAMEN.DOMAIN'   (opsipackagemanager.py:925)
[6] [2021-11-24 11:30:01.280] [               ] Getting hosts, filter: {'type': 'OpsiDepotserver', 'id': 'OPSI-SERVERNAMEN.DOMAIN'}   (SQL.py:1197)
[6] [2021-11-24 11:30:01.297] [               ] Depot repository path is '/var/lib/opsi/repository'   (opsipackagemanager.py:945)
[6] [2021-11-24 11:30:01.298] [               ] Using 'webdavs://INTERNE-IP-ADRESSE-DES-OPSI:4447/repository' as repository url   (opsipackagemanager.py:946)
[6] [2021-11-24 11:30:01.298] [               ] Setting bandwidth limits to: max=0.000000 kByte/s, dynamic=False   (Repository.py:360)
[6] [2021-11-24 11:30:01.299] [               ] INTERNE-IP-ADRESSE-DES-OPSI is an ipv4 address, forcing ipv4   (Repository.py:1010)
[6] [2021-11-24 11:30:01.934] [               ] Destination 'opsipaketname_v1-1.opsi' already exists on depot 'OPSI-SERVERNAMEN.DOMAIN'   (opsipackagemanager.py:964)
[6] [2021-11-24 11:30:02.216] [               ] Size of source and destination matches on depot 'OPSI-SERVERNAMEN.DOMAIN'   (opsipackagemanager.py:972)
[6] [2021-11-24 11:30:02.216] [               ] Getting hosts, filter: {'type': 'OpsiDepotserver', 'id': 'OPSI-SERVERNAMEN.DOMAIN'}   (SQL.py:1197)
[6] [2021-11-24 11:30:02.220] [               ] Connecting to service https://OPSI-SERVERNAMEN.DOMAIN:4447/rpc   (jsonrpc.py:495)
[6] [2021-11-24 11:30:02.232] [               ] JSONRPC request to https://OPSI-SERVERNAMEN.DOMAIN:4447/rpc: ip_version=auto, id=1, method=backend_getInterface, Content-Type=application/json, Content-Encoding=, timeout=60   (jsonrpc.py:387)
[6] [2021-11-24 11:30:02.313] [               ] Got response status=200, Content-Type=application/json, Content-Encoding=lz4   (jsonrpc.py:398)
[6] [2021-11-24 11:30:02.552] [               ] JSONRPC request to https://OPSI-SERVERNAMEN.DOMAIN:4447/rpc: ip_version=auto, id=2, method=depot_getMD5Sum, Content-Type=application/msgpack, Content-Encoding=lz4, timeout=60   (jsonrpc.py:387)
[6] [2021-11-24 11:31:02.577] [               ] HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)   (opsipackagemanager.py:1146)
Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 445, in _make_request
  File "<string>", line 3, in raise_from
  File "urllib3/connectionpool.py", line 440, in _make_request
  File "http/client.py", line 1373, in getresponse
  File "http/client.py", line 319, in begin
  File "http/client.py", line 280, in _read_status
  File "socket.py", line 589, in readinto
  File "ssl.py", line 1071, in recv_into
  File "ssl.py", line 929, in read
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests/adapters.py", line 449, in send
  File "urllib3/connectionpool.py", line 756, in urlopen
  File "urllib3/util/retry.py", line 532, in increment
  File "urllib3/packages/six.py", line 770, in reraise
  File "urllib3/connectionpool.py", line 706, in urlopen
  File "urllib3/connectionpool.py", line 447, in _make_request
  File "urllib3/connectionpool.py", line 337, in _raise_timeout
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 974, in uploadToRepository
  File "<string>", line 1, in depot_getMD5Sum
  File "opsicommon/client/jsonrpc.py", line 390, in execute_rpc
  File "requests/sessions.py", line 590, in post
  File "requests/sessions.py", line 542, in request
  File "requests/sessions.py", line 655, in send
  File "opsicommon/client/jsonrpc.py", line 63, in send
  File "requests/adapters.py", line 529, in send
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)
[3] [2021-11-24 11:31:02.579] [               ] HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)   (opsipackagemanager.py:1147)
[3] [2021-11-24 11:31:02.579] [               ] HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)   (opsipackagemanager.py:96)
Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 445, in _make_request
  File "<string>", line 3, in raise_from
  File "urllib3/connectionpool.py", line 440, in _make_request
  File "http/client.py", line 1373, in getresponse
  File "http/client.py", line 319, in begin
  File "http/client.py", line 280, in _read_status
  File "socket.py", line 589, in readinto
  File "ssl.py", line 1071, in recv_into
  File "ssl.py", line 929, in read
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests/adapters.py", line 449, in send
  File "urllib3/connectionpool.py", line 756, in urlopen
  File "urllib3/util/retry.py", line 532, in increment
  File "urllib3/packages/six.py", line 770, in reraise
  File "urllib3/connectionpool.py", line 706, in urlopen
  File "urllib3/connectionpool.py", line 447, in _make_request
  File "urllib3/connectionpool.py", line 337, in _raise_timeout
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 94, in start
  File "opsiutils/opsipackagemanager.py", line 974, in uploadToRepository
  File "<string>", line 1, in depot_getMD5Sum
  File "opsicommon/client/jsonrpc.py", line 390, in execute_rpc
  File "requests/sessions.py", line 590, in post
  File "requests/sessions.py", line 542, in request
  File "requests/sessions.py", line 655, in send
  File "opsicommon/client/jsonrpc.py", line 63, in send
  File "requests/adapters.py", line 529, in send
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)
[3] [2021-11-24 11:31:02.580] [               ] Task 'Upload of package '/opt/pcbin/produkt/paketname/opsipaketname_v1-1.opsi' to repository 'OPSI-SERVERNAMEN.DOMAIN'' failed: HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)   (opsipackagemanager.py:638)
[6] [2021-11-24 11:31:03.642] [               ] Cleaning up   (opsipackagemanager.py:699)
[6] [2021-11-24 11:31:03.642] [               ] Cleaning up   (Product.py:59)
Errors occurred:
[3] [2021-11-24 11:31:03.643] [               ] Failure while processing Upload of package(s) /opt/pcbin/produkt/paketname/opsipaketname_v1-1.opsi to repository 'OPSI-SERVERNAMEN.DOMAIN':   (opsipackagemanager.py:1680)
   Failure while processing Upload of package(s) /opt/pcbin/produkt/paketname/opsipaketname_v1-1.opsi to repository 'OPSI-SERVERNAMEN.DOMAIN':
[3] [2021-11-24 11:31:03.643] [               ]       HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)   (opsipackagemanager.py:1683)
      HTTPSConnectionPool(host='OPSI-SERVERNAMEN.DOMAIN', port=4447): Read timed out. (read timeout=60)
[3] [2021-11-24 11:31:03.643] [               ] 1 errors during the processing of tasks.   (opsipackagemanager.py:1645)
Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 1643, in __init__
  File "opsiutils/opsipackagemanager.py", line 1686, in processCommand
opsiutils.opsipackagemanager.TaskError: 1 errors during the processing of tasks.
[3] [2021-11-24 11:31:03.644] [               ] Failed to process command 'upload': 1 errors during the processing of tasks.   (opsipackagemanager.py:2120)
Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 1643, in __init__
  File "opsiutils/opsipackagemanager.py", line 1686, in processCommand
opsiutils.opsipackagemanager.TaskError: 1 errors during the processing of tasks.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 2116, in main
  File "opsiutils/opsipackagemanager.py", line 1646, in __init__
RuntimeError: Failed to process command 'upload': 1 errors during the processing of tasks.

ERROR: Failed to process command 'upload': 1 errors during the processing of tasks.

Vielen Dank für eure Hilfe.

Mit freundlichen Grüßen,
Valentino
Benutzeravatar
n.doerrer
uib-Team
Beiträge: 267
Registriert: 23 Okt 2020, 16:11

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von n.doerrer »

Hallo,

mit opsi-utils 4.2.0.140 (aktuell in experimental) sollte das Problem gelöst sein.
Bisher war der upload im Gegensatz zur Installation mit einem rpc-timeout von 60 Sekunden eingegrenzt.
Ab jetzt verhalten sich die beiden Befehle diesbezüglich identisch mit einem timeout von einer Stunde.
Benutzeravatar
n.doerrer
uib-Team
Beiträge: 267
Registriert: 23 Okt 2020, 16:11

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von n.doerrer »

Mit opsi-utils 4.2.0.142 ist jetzt auch die MD5-summen-Generierung nicht mehr von dem 60 Sekunden-timeout betroffen.
Valentino-46
Beiträge: 280
Registriert: 05 Aug 2011, 14:24

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von Valentino-46 »

Hallo nochmal,

ich habe ja bereits über mein Support Ticket bei euch meinen Dank ausgerichtet. Hier auch nochmal ein großes Dankeschön für die Hilfe.

Ich habe jetzt leider noch bei manchen Paketen das identische Problem, da selbst 1 Stunde nicht ausreicht.
Aktuell habe ich eine Spezialsoftware im Rollout von über 20 Gigabyte.

Wenn ich das jetzt per script in 5 Niederlassungen inkl USA verteile, dann dauert das mehr als 1 Stunde.
Ich verwende hier -d all also in alle Niederlassungen zu uploaden und installieren. Leider führt das dazu, dass wenn die USA dabei sind und der Upload doch deutlich länger dauert, dass er dann irgendwann für die anderen Niederlassung ins timeout läuft.

Wäre es möglich die Zeit noch einmal zu modifizieren? Mir persönlich wäre ein sehr hoher Wert natürlich sehr recht.
Vielleicht könnt ihr ja 4 oder 6 Stunden als timeout verwenden?
Wenn das für euch zu hoch ist, wäre vielleicht ein Parameter zum selbst definieren möglich?
Denke selbst aber nicht, dass ein so hohes timeout Probleme macht?!

Vielen Dank für eure Rückmeldung,
Mit freundlichen Grüßen,
Valentino
Benutzeravatar
n.doerrer
uib-Team
Beiträge: 267
Registriert: 23 Okt 2020, 16:11

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von n.doerrer »

Hallo,

wir haben jetzt den timeout von depot_librsyncPatchFile auf 24h angepasst. Diese Änderung ist in opsi-utils 4.2.0.152.
Damit sollte der upload auch auf netzwerktechnisch entfernte Depots möglich sein.
Valentino-46
Beiträge: 280
Registriert: 05 Aug 2011, 14:24

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von Valentino-46 »

Guten Tag zusammen,

ich wünsche noch ein gesundes und erfolgreiches Jahr 2023!!

Ich möchte das Ticket gerne noch einmal aufwärmen, da ich glaube noch ein timeout=3600 gefunden zu haben?
Wir haben die opsi-utils in Version 4.2.0.192-1 installiert, allerdings kam heute diese Meldung. Das OPSI Paket muss leider nach Amerika und ist leider auch 16 GB groß.
Da das leider alles remote in einem Script Nachts läuft, bekam ich nur diese beiden Zeilen angezeigt. Reicht euch das oder soll ich das Paket nochmal löschen? Irgendwann (er macht bis zu 5 Neuversuche) hat es dann am Ende geklappt, habe es jetzt aber schon 2 Nächte laufen gelassen.

Code: Alles auswählen

   Failure while processing Install of package(s) /var/lib/opsi/repository/bentleymicrostation_20220201-1.opsi on depot 'opsi-gv.xxxxx.local':
      HTTPSConnectionPool(host='opsi-gv.xxxx.local', port=4447): Read timed out. (read timeout=3600)
Danke euch vielmals!
Viele Grüße,
Valentino
Valentino-46
Beiträge: 280
Registriert: 05 Aug 2011, 14:24

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von Valentino-46 »

Hallo zusammen,

heute ist das Problem leider wieder aufgetreten. Konntet Ihr schonmal schauen, ob ihr wisst wo dieser Timeout steckt?
3600 Sekunden wären ja nur 1 Stunde und ich weiß noch, dass Ihr die Timeouts auf 24h gestellt hattet.

Besten Dank nochmal!
Valentino
Benutzeravatar
n.doerrer
uib-Team
Beiträge: 267
Registriert: 23 Okt 2020, 16:11

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von n.doerrer »

Hallo,

ich kann das nicht nachstellen. Mit stable 4.2 opsi-utils und opsiconfd auf dem depot sollte es möglich sein, ein opsi-package-manager --upload oder --install durchzuführen, was über die 3600s hinausgeht.
Ist eventuell der opsiconfd auf dem depot veraltet?
Bitte stelle uns ein log zur Verfügung.
Valentino-46
Beiträge: 280
Registriert: 05 Aug 2011, 14:24

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von Valentino-46 »

Hallo,
Ich habe jetzt ganz aktuell heute Nacht wieder diesen Fall gehabt. Welche Log muss ich denn nun zur Verfügung stellen? Könnt ihr mich hier kurz unterstützen/aufklären?

Ich habe die vom Master/Depot aus /var/log/opsi/opsi-package-manager.log mal hier eingefügt.
Ich hoffe Ihr könnt darin schon etwas erkennen.

Code: Alles auswählen

Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 2132, in main
  File "opsiutils/opsipackagemanager.py", line 1670, in __init__
RuntimeError: Failed to process command 'install': 1 errors during the processing of tasks.
[4] [2023-03-27 20:20:05.631] [               ] Failed to create md5sum file '/var/lib/opsi/repository/bigSoftwarePackage_20230221-1.opsi.md5': HTTPSConnectionPool(host='opsi-gv.domain.local', port=4447): Read timed out. (read timeout=300)   (opsipackagemanager.py:1151)
[4] [2023-03-27 20:25:06.038] [               ] Failed to create zsync file '/var/lib/opsi/repository/bigSoftwarePackage_20230221-1.opsi.zsync': HTTPSConnectionPool(host='opsi-gv.domain.local', port=4447): Read timed out. (read timeout=300)   (opsipackagemanager.py:1157)
[3] [2023-03-27 21:25:08.411] [               ] HTTPSConnectionPool(host='opsi-gv.domain.local', port=4447): Read timed out. (read timeout=3600)   (opsipackagemanager.py:1441)
[3] [2023-03-27 21:25:08.411] [               ] HTTPSConnectionPool(host='opsi-gv.domain.local', port=4447): Read timed out. (read timeout=3600)   (opsipackagemanager.py:112)
Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 449, in _make_request
  File "<string>", line 3, in raise_from
  File "urllib3/connectionpool.py", line 444, in _make_request
  File "http/client.py", line 1374, in getresponse
  File "http/client.py", line 318, in begin
  File "http/client.py", line 279, in _read_status
  File "socket.py", line 705, in readinto
  File "ssl.py", line 1274, in recv_into
  File "ssl.py", line 1130, in read
TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests/adapters.py", line 489, in send
  File "urllib3/connectionpool.py", line 787, in urlopen
  File "urllib3/util/retry.py", line 550, in increment
  File "urllib3/packages/six.py", line 770, in reraise
  File "urllib3/connectionpool.py", line 703, in urlopen
  File "urllib3/connectionpool.py", line 451, in _make_request
  File "urllib3/connectionpool.py", line 340, in _raise_timeout
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='opsi-gv.domain.local', port=4447): Read timed out. (read timeout=3600)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 110, in start
  File "opsiutils/opsipackagemanager.py", line 1400, in installPackage
  File "<string>", line 1, in depot_installPackage
  File "opsicommon/client/jsonrpc.py", line 389, in execute_rpc
  File "opsicommon/client/jsonrpc.py", line 463, in _execute_rpc
  File "requests/sessions.py", line 635, in post
  File "requests/sessions.py", line 587, in request
  File "requests/sessions.py", line 701, in send
  File "opsicommon/client/jsonrpc.py", line 75, in send
  File "requests/adapters.py", line 578, in send
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='opsi-gv.domain.local', port=4447): Read timed out. (read timeout=3600)
[3] [2023-03-27 21:25:08.447] [               ] Task 'Install of package 'bigSoftwarePackage_20230221-1.opsi' on depot 'opsi-gv.domain.local'' failed: HTTPSConnectionPool(host='opsi-gv.domain.local', port=4447): Read timed out. (read timeout=3600)   (opsipackagemanager.py:645)
[3] [2023-03-27 21:25:12.051] [               ] Failure while processing Install of package(s) /opt/pcbin/produkt/bigSoftwarePackage/bigSoftwarePackage_20230221-1.opsi on depot 'opsi-gv.domain.local':   (opsipackagemanager.py:1704)
[3] [2023-03-27 21:25:12.061] [               ]       HTTPSConnectionPool(host='opsi-gv.domain.local', port=4447): Read timed out. (read timeout=3600)   (opsipackagemanager.py:1707)
[3] [2023-03-27 21:25:12.064] [               ] 1 errors during the processing of tasks.   (opsipackagemanager.py:1669)
Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 1667, in __init__
  File "opsiutils/opsipackagemanager.py", line 1710, in processCommand
opsiutils.opsipackagemanager.TaskError: 1 errors during the processing of tasks.
[3] [2023-03-27 21:25:12.072] [               ] Failed to process command 'install': 1 errors during the processing of tasks.   (opsipackagemanager.py:2136)
Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 1667, in __init__
  File "opsiutils/opsipackagemanager.py", line 1710, in processCommand
opsiutils.opsipackagemanager.TaskError: 1 errors during the processing of tasks.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "opsiutils/opsipackagemanager.py", line 2132, in main
  File "opsiutils/opsipackagemanager.py", line 1670, in __init__
RuntimeError: Failed to process command 'install': 1 errors during the processing of tasks.
Die opsiconfd sind beide identisch. Auch halte ich alle Server immer auf dem gleichen Stand.

Vielen Dank!!
Mit freundlichen Grüßen,
Valentino
Benutzeravatar
j.schneider
uib-Team
Beiträge: 1789
Registriert: 29 Mai 2008, 15:14

Re: Timeout beim Upload ins Repository - HTTPSConnectionPool Read Timed out

Beitrag von j.schneider »

Hallo,

der Auszug ist ausreichend.
Scheinbar dauert das Installieren des Pakets über eine Stunde.
Wir werden den Timeout nochmal erhöhen.

Grüße
Jan Schneider
Antworten