tabeyti / jenkins-jack

Jack into your Jenkins to execute Pipeline scripts, provide Pipeline step autocompletions, pull Shared Library step documenation, run console groovy scripts across multiple nodes, and more! Honestly, not that much more.
Other
98 stars 31 forks source link

URI-encode API calls which were being rejected on some servers #66

Open solvingj opened 2 years ago

solvingj commented 2 years ago

Tested locally and this fix makes the JOBS and PIPELINES view populate lists properly. However, I'm still getting the random "could not connect to server error" in https://github.com/tabeyti/jenkins-jack/issues/59

Of note, there are three other calls to request.get(url) which you may want to consider URI encoding.

solvingj commented 2 years ago

Update, while debugging and stepping through, I did get this:

RequestError: Error: Client network socket disconnected before secure TLS connection was established

A quick search and this seems to be a pretty generic message.

solvingj commented 2 years ago

It seems to happen when refreshing Jenkins Host Connections view. The error seems to alternate between the one above, or:

RequestError: Error: write EPROTO 37469128:error:10000438:SSL routines:OPENSSL_internal:TLSV1_ALERT_INTERNAL_ERROR:../../third_party/boringssl/src/ssl/tls_record.cc:594:SSL alert number 80****
solvingj commented 2 years ago

Honestly, it seems intermittent and fairly random that, while iterating through various URL's, one of these two errors causes one to fail, Jenkins-jack issues a warning, but continues on to try it's other work. Perhaps these two errors could be caught and the requests re-issued twice before logging the warning/etc.