Jenkins agent issue code created with no secret passphrase to connect to controller

My question is this: When running Jenkins in our Stage environment I can get the controller running just fine, but when I try to generate the agent the script to connect is created with no secret
Here is an example: curl -sO http://stage-jnkn001:8443/jnlpJars/agent.jar
java -jar agent.jar -jnlpUrl http://stage-jnkn001:8443/manage/computer/stage.jnkn002.corp.work.com/jenkins-agent.jnlp -workDir “D:\Jenkins”
the agent won’t connect to the controller and I am at a loss why the secret passphrase is not there, what would cause that to happen. Is there aproblem in the agent setup, or in the controller setup?

Here is the jenkins setup info:
Jenkins: 2.387.3
OS: Windows Server 2022 - 10.0
Java: 11.0.27 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
ace-editor:1.1
active-directory:2.30.1
ant:487.vd79d090d4ea_e
antisamy-markup-formatter:159.v25b_c67cd35fb_
apache-httpcomponents-client-4-api:4.5.14-208.v438351942757
apache-httpcomponents-client-5-api:5.2.1-1.0
authorize-project:1.6.0
aws-credentials:191.vcb_f183ce58b_9
aws-java-sdk-ec2:1.12.447-382.vda_68e2007233
aws-java-sdk-minimal:1.12.447-382.vda_68e2007233
azure-ad:442.v355cca_6b_c169
azure-sdk:157.v855da_0b_eb_dc2
bootstrap4-api:4.6.0-5
bootstrap5-api:5.3.2-3
bouncycastle-api:2.27
branch-api:2.1092.vda_3c2a_a_f0c11
build-timeout:1.30
caffeine-api:3.1.8-133.v17b_1ff2e0599
calendar-view:0.3.3
checks-api:2.0.2
cloudbees-folder:6.858.v898218f3609d
command-launcher:100.v2f6722292ee8
commons-httpclient3-api:3.1-3
commons-lang3-api:3.13.0-62.v7d18e55f51e2
commons-text-api:1.11.0-94.v3e1f4a_926e49
credentials:1319.v7eb_51b_3a_c97b_
credentials-binding:642.v737c34dea_6c2
data-tables-api:1.13.3-3
display-url-api:2.200.vb_9327d658781
durable-task:506.v1b_3e14b_6f5da_
echarts-api:5.4.0-7
email-ext:2.97
email-ext-recipients-column:27.vb_9404db_b_018d
font-awesome-api:6.5.1-1
git:5.2.1
git-client:4.6.0
git-parameter:0.9.18
git-server:99.va_0826a_b_cdfa_d
github:1.37.3.1
github-api:1.314-431.v78d72a_3fe4c3
github-branch-source:1703.vd5a_2b_29c6cdc
gitlab-merge-request-jenkins:2.0.0
gitlab-plugin:1.7.13
global-build-stats:269.v214f74360b_3a_
gradle:2.7
handlebars:3.0.8
instance-identity:185.v303dc7c645f9
ionicons-api:56.v1b_1c8c49374e
jackson2-api:2.15.3-363.v82c51b_de9f60
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javadoc:243.vb_b_503b_b_45537
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.8-1
jdk-tool:66.vd8fa_64ee91b_d
jersey2-api:2.39.1-1
jjwt-api:0.11.5-77.v646c772fddb_0
jnr-posix-api:3.1.16-2
jquery:1.12.4-1
jquery3-api:3.7.1-1
jsch:0.2.8-65.v052c39de79b_2
junit:1252.vfc2e5efa_294f
ldap:676.vfa_64cf6b_b_002
lockable-resources:1156.v5e9f897ece02
mailer:463.vedf8358e006b_
matrix-auth:3.2.1
matrix-project:818.v7eb_e657db_924
maven-plugin:3.23
mina-sshd-api-common:2.12.0-90.v9f7fb_9fa_3d3b_
mina-sshd-api-core:2.12.0-90.v9f7fb_9fa_3d3b_
miniorange-saml-sp:2.2.0
momentjs:1.1.1
nodelabelparameter:1.12.0
okhttp-api:4.11.0-157.v6852a_a_fa_ec11
opentelemetry:2.19.0
pam-auth:1.10
periodicbackup:2.0
pipeline-build-step:491.v1fec530da_858
pipeline-github-lib:42.v0739460cda_c4
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-groovy-lib:656.va_a_ceeb_6ffb_f7
pipeline-input-step:468.va_5db_051498a_4
pipeline-milestone-step:111.v449306f708b_7
pipeline-model-api:2.2131.vb_9788088fdb_5
pipeline-model-definition:2.2131.vb_9788088fdb_5
pipeline-model-extensions:2.2131.vb_9788088fdb_5
pipeline-rest-api:2.32
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2131.vb_9788088fdb_5
pipeline-stage-view:2.32
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.8.0
popper-api:1.16.1-3
popper2-api:2.11.6-2
resource-disposer:0.22
role-strategy:633.v836e5b_3e80a_5
saferestart:0.7
saml:4.403.v423b_3195a_9ec
scm-api:676.v886669a_199a_a_
script-security:1294.v99333c047434
snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
ssh-credentials:308.ve4497b_ccd8f4
ssh-slaves:2.877.v365f5eb_a_b_eec
sshd:3.275.v9e17c10f2571
structs:325.vcb_307d2a_2782
thycotic-secret-server:1.0.4
timestamper:1.25
token-macro:384.vf35b_f26814ec
trilead-api:2.84.v72119de229b_7
variant:59.vf075fe829ccb
windows-slaves:1.8.1
workflow-aggregator:596.v8c21c963d92d
workflow-api:1283.v99c10937efcb_
workflow-basic-steps:1017.vb_45b_302f0cea_
workflow-cps:3659.v582dc37621d8
workflow-cps-global-lib:609.vd95673f149b_b
workflow-durable-task-step:1246.v5524618ea_097
workflow-job:1326.ve643e00e9220
workflow-multibranch:746.v05814d19c001
workflow-scm-step:415.v434365564324
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:865.v43e78cc44e0d
ws-cleanup:0.45

Hard to tell. But I doubt anyone is willing to investigate when you use 2.387.3 which is over 2 years old.
Current LTS Jenkins properly shows me commands that include the secret.

I do see this error:

INFO: Locating server among [http://stage-jnkn001:8443/]
May 05, 2025 8:33:31 PM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Unexpected end of file from server
java.net.SocketException: Unexpected end of file from server
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:917)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:724)
at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:914)
at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:724)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1652)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1557)
at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:219)
at hudson.remoting.Engine.innerRun(Engine.java:755)
at hudson.remoting.Engine.run(Engine.java:543)

Figured out issue system was not fully configured and it was causing the issue, once set it all ran correctly.