Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Exception when publishing, exception message [Could not write file. Server message: [534 Policy requires SSL. 22:28:03 ]] #115

Open
mhakimi2 opened this issue Mar 6, 2024 · 0 comments

Comments

@mhakimi2
Copy link

mhakimi2 commented Mar 6, 2024

Jenkins and plugins versions report

Environment
Jenkins: 2.289.3
OS: Windows Server 2016 - 10.0
Java: 1.8.0_171 - Oracle Corporation (Java HotSpot(TM) 64-Bit Server VM)
Salve Node which is doing FTP has the Windows Server 2019 (amd64)
publish-over-ftp:1.16
--

---
JDK_Parameter_Plugin:1.0
ace-editor:1.1
active-directory:2.24
ant:1.11
antisamy-markup-formatter:2.1
apache-httpcomponents-client-4-api:4.5.13-1.0
artifactdeployer:1.2
atlassian-jira-software-cloud:1.4.4
audit-trail:3.10
authentication-tokens:1.4
authorize-project:1.4.0
aws-credentials:1.30
aws-java-sdk:1.11.995
batch-task:1.19
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.0-1
bouncycastle-api:2.22
branch-api:2.6.5
build-blocker-plugin:1.7.7
build-monitor-plugin:1.12+build.201809061734
build-name-setter:2.2.0
build-pipeline-plugin:1.5.8
build-publisher:1.22
build-timeout:1.20
build-user-vars-plugin:1.7
build-with-parameters:1.5.1
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-credentials:3.3
cloudbees-disk-usage-simple:0.10
cloudbees-folder:6.16
command-launcher:1.6
conditional-buildstep:1.4.1
config-file-provider:3.8.1
configurationslicing:1.52
copyartifact:1.46.1
credentials:2.5
credentials-binding:1.27
dashboard-view:2.17
date-parameter:0.0.4
deploy:1.16
display-console-output:1.0.5
display-url-api:2.3.5
docker-commons:1.17
docker-workflow:1.26
dotnet-sdk:1.1.2
durable-task:1.39
echarts-api:5.1.2-9
email-ext:2.83
emailext-template:1.2
envfile:1.2
envinject:2.4.0
envinject-api:1.7
extended-read-permission:3.2
external-monitor-job:1.7
file-operations:1.11
folder-auth:1.3
folder-properties:1.2.1
font-awesome-api:5.15.3-4
ftppublisher:1.2
git:4.8.1
git-client:3.9.0
git-server:1.10
github:1.33.1
github-api:1.123
github-branch-source:2.11.2
github-pullrequest:0.3.0
gradle:1.37.1
handlebars:3.0.8
htmlpublisher:1.25
hudson-wsclean-plugin:1.0.8
icon-shim:3.0.0
jackson2-api:2.12.4
javadoc:1.6
jdk-tool:1.5
jira:3.5
jjwt-api:0.11.2-9.c8b45b8bb173
job-log-logger-plugin:1.0
jobConfigHistory:2.28.1
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.52
ldap:2.7
lockable-resources:2.11
mailer:1.34
mapdb-api:1.0.9.0
mask-passwords:3.0
matrix-auth:2.6.8
matrix-project:1.19
maven-plugin:3.12
momentjs:1.1.1
monitoring:1.88.0
msbuild:1.30
multiple-scms:0.8
nodejs:1.4.0
nuget:1.1
octopusdeploy:3.1.3
okhttp-api:3.14.9
pam-auth:1.6
parameterized-trigger:2.41
pipeline-build-step:2.15
pipeline-github-lib:1.0
pipeline-graph-analysis:1.11
pipeline-input-step:2.12
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.1
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:1.9.1
pipeline-model-extensions:1.9.1
pipeline-rest-api:2.19
pipeline-stage-step:2.5
pipeline-stage-tags-metadata:1.9.1
pipeline-stage-view:2.19
plain-credentials:1.7
plugin-usage-plugin:1.2
plugin-util-api:2.4.0
popper-api:1.16.1-2
popper2-api:2.9.3-1
powershell:1.5
preSCMbuildstep:0.3
publish-over:0.22
publish-over-ftp:1.16
publish-over-ssh:1.22
purge-build-queue-plugin:1.0
purge-job-history:1.6
resource-disposer:0.16
run-condition:1.5
saml:2.0.7
scm-api:2.6.5
script-security:1.78
simple-theme-plugin:0.7
snakeyaml-api:1.29.1
ssh:2.6.1
ssh-agent:1.23
ssh-credentials:1.19
ssh-slaves:1.32.0
ssh2easy:1.4
sshd:3.1.0
structs:1.23
subversion:2.14.4
thinBackup:1.10
timestamper:1.13
token-macro:266.v44a80cf277fd
trilead-api:1.0.13
variant:1.4
was-builder:1.6.1
websphere-deployer:1.6.1
windows-slaves:1.8
workflow-aggregator:2.6
workflow-api:2.46
workflow-basic-steps:2.23
workflow-cps:2.93
workflow-cps-global-lib:2.21
workflow-durable-task-step:2.39
workflow-job:2.41
workflow-multibranch:2.26
workflow-scm-step:2.13
workflow-step-api:2.24
workflow-support:3.8
ws-cleanup:0.39

What Operating System are you using (both controller, and any agents involved in the problem)?

Master which is doing the slave node is having the "Windows Server 2016 - 10.0"
Salve Node which is doing FTP has the Windows Server 2019 (amd64)

Reproduction steps

Using the Jenkins 2.289.3 version.
Using the "Publish Over FTP" plugin version 1.17,
Under "Manage Jenkins"->"Configure System" in the "Publish over FTP" section use the "Use FTP over TLS" option is checked and provided the certificate in the "Trusted Certificate" which copied from the certificate file present on the client machine, on testing the connection using the "Test Configuration" get the Success messsage.

In the freestyle Jenkins job, under the "Post-build Actions", configure the "Send build artifacts over the FTP".
On running the Jenkins job, on remote server where FTP is setup in the IIS it is able to create the directory 'SRE_DEV_J311' and subfolder in it.
Unable to transfer the srepointapi.war to subfolder under the 'SRE_DEV_J311' folder.

Generate the following output in Jenkins console:

22:28:03 FTP: Connecting from host [AWSCMNJNKBSL41]
22:28:03 FTP: Connecting with configuration [AssurePolicy QAT APP - SREQATASPAPP] ...
22:28:03 220 Microsoft FTP Service
22:28:03 AUTH TLS
22:28:03 234 AUTH command ok. Expecting TLS Negotiation.
22:28:03 FTP: Logging in, command printing disabled
22:28:03 FTP: Logged in, command printing enabled
22:28:03 CWD upload
22:28:03 250 CWD command successful.
22:28:03 FTP: Remote root is not absolute, getting absolute directory from PWD
22:28:03 PWD
22:28:03 257 "/upload" is current directory.
22:28:03 TYPE I
22:28:03 200 Type set to I.
22:28:03 CWD /upload
22:28:03 250 CWD command successful.
22:28:03 CWD SRE_DEV_J311/SRE_DEV_20240306
22:28:03 250 CWD command successful.
22:28:03 PASV
22:28:03 227 Entering Passive Mode (10,7,240,136,222,189).
22:28:03 STOR srepointapi.war
22:28:03 534 Policy requires SSL.
22:28:03 FTP: Disconnecting configuration [AssurePolicy QAT APP - SREQATASPAPP] ...
22:28:03 ERROR: Exception when publishing, exception message [Could not write file. Server message: [534 Policy requires SSL.
22:28:03 ]]
22:28:03 Build step 'Send build artifacts over FTP' changed build result to UNSTABLE

Manualy using the WINSCP tool on the AWSCMNJNKBSL41 server, able to create a file in the subfolder under the folder 'SRE_DEV_J311' using the FTP protocol,
"TLS/SSL Explicit encryption" with same credentials without the certifiacte file in picture that is used on Jenkins.
2024_03_07_01_01_36_Mailing_Lists
2024_03_06_22_30_06_SRE_DEV_J311_API_FTP_Config_Jenkins_
IIS7_Remote_Desktop_Connection
IIS6_Remote_Desktop_Connection
2024_03_07_01_15_32_10 7 240 136_Remote_Desktop_Connection
IIS5_Remote_Desktop_Connection
IIS4_Remote_Desktop_Connection
IIS3_Remote_Desktop_Connection
IIS2_Remote_Desktop_Connection
IIS1_Remote_Desktop_Connection
IIS1_

Expected Results

Similar Kind of Output.
06:01:48 Total time: 24 seconds
06:02:27 FTP: Connecting from host [AWSCMNJNKBSL3]
06:02:28 FTP: Connecting with configuration [New AWS DEV/QAT - SREQATPIJX] ...
06:02:28 FTP: Disconnecting configuration [New AWS DEV/QAT - SREQATPIJX] ...
06:02:28 FTP: Transferred 2 ( 1 + 1 ) file(s)
06:02:28 Finished: SUCCESS

Actual Results

22:28:03 FTP: Connecting from host [AWSCMNJNKBSL41]
22:28:03 FTP: Connecting with configuration [AssurePolicy QAT APP - SREQATASPAPP] ...
22:28:03 220 Microsoft FTP Service
22:28:03 AUTH TLS
22:28:03 234 AUTH command ok. Expecting TLS Negotiation.
22:28:03 FTP: Logging in, command printing disabled
22:28:03 FTP: Logged in, command printing enabled
22:28:03 CWD upload
22:28:03 250 CWD command successful.
22:28:03 FTP: Remote root is not absolute, getting absolute directory from PWD
22:28:03 PWD
22:28:03 257 "/upload" is current directory.
22:28:03 TYPE I
22:28:03 200 Type set to I.
22:28:03 CWD /upload
22:28:03 250 CWD command successful.
22:28:03 CWD SRE_DEV_J311/SRE_DEV_20240306
22:28:03 250 CWD command successful.
22:28:03 PASV
22:28:03 227 Entering Passive Mode (10,7,240,136,222,189).
22:28:03 STOR srepointapi.war
22:28:03 534 Policy requires SSL.
22:28:03 FTP: Disconnecting configuration [AssurePolicy QAT APP - SREQATASPAPP] ...
22:28:03 ERROR: Exception when publishing, exception message [Could not write file. Server message: [534 Policy requires SSL.
22:28:03 ]]
22:28:03 Build step 'Send build artifacts over FTP' changed build result to UNSTABLE

Anything else?

No response

Are you interested in contributing a fix?

Not have code insight, can test the suggested solution at my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant