Issues with Upgrading Jenkins 2.313 to 2.440 (PKIX path building failed)

Jenkins setup:

  1. Jenkins 2.313, Java 8, 1 linux agent + 1 windows agent
    100+ plugins
    Integrated with Bitbucket as scm

Context: Before upgrading, all pipelines are running fine.

Trying to upgrade to
2) Jenkins controller: 2.440, Java 17 + Linux agent (to Java 17)

First of all, i have successfully upgraded Jenkins controller and the agent (Connected to controller) as well as the Java 17 as runtime and Java 8 for running the pipelines.
This upgrade come also with core plugins that gave warning on the dependency to jenkins core:

  1. Cloudbees-folder** plugin: v6.15 to 6.815.v0dd5a_cb_40e0e
  2. Credentials** plugin: v2.3.19 to 1319.v7eb_51b_3a_c97b_
  3. Mina SSHD API** Core: v2.10.0-69.v28e3e36d18eb_ to v2.12.0-90.v9f7fb_9fa_3d3b_
  4. Mina SSHD API Common** : v2.10.0-69.v28e3e36d18eb_ to v2.12.0-90.v9f7fb_9fa_3d3b_
  5. SSH Credentials** Plugin: v1.18.1 to v308.ve4497b_ccd8f4
  6. SSH server** : v3.303.vefc7119b_ec23 to v3.322.v159e91f6a_550

Pipelines for Windows agent is running and building successfully with no issue.
Also called to Bitbucket SCM to build. But is using pipeline configuration to set the SCM as seen in the first screenshot in this link

However, the pipeline for Linux agent is not running successfully. The pipeline logs hit the error “git repository url 1 is an empty string in job definition checkout requires a valid path” which is not conclusive.
For this, we use pipeline method to define the SCM. (We filled in the variables with correct values)
checkout BbS(branches: [[name: ‘/${branch}']], credentialsId: '', extensions: [], id: '*’, mirrorName: ‘’, projectName: ‘<Project_name>’, repositoryName: ‘<Repo_name>’, serverId: ‘<Server_ID>’, sshCredentialsId: ‘’)
Since the error was not conclusive, we have searched for the system logs at the jenkins GUI. The error is shown below.

Please let me know if i missed out on anything or what could be the root cause of this issue

I have tried the below:

  1. In linux agent, replace cacert of java 8 to java 17 and restart agent. but to no avail with same error.
  2. In linux agent, tried to git clone https to bitbucket as the jenkins user, it is responding. But running pipeline it will hit the error above.