I am facing an issue with this error : SSH: FAILED: Message [Bad message] and i have no idea what casued it or what it is doing and goes wrong, the “Bad message” also is not very informative, so I need have to understand what actually is this so that I can fix it… here is the log
SSH: Connecting from host [jenkins]
SSH: Connecting with configuration [abc-dev-dev] …
SSH: Creating session: username [jenkins], hostname [192.168.1.2], port [22]
SSH: Connecting session …
SSH: Connected
SSH: Opening SFTP channel …
SSH: SFTP channel open
SSH: Connecting SFTP channel …
SSH: Connected
SSH: Remote root is not absolute, getting absolute directory from PWD
SSH: cd [/C:/Users/jenkins]
SSH: OK
SSH: mkdir [C:]
SSH: FAILED: Message [Bad message]
SSH: Disconnecting configuration [abc-dev-dev] …
ERROR: Exception when publishing, exception message [Could not create or change to directory. Directory [C:]]
Build step ‘Send build artifacts over SSH’ changed build result to UNSTABLE
Email was triggered for: Always
Sending email for trigger: Always
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: UNSTABLE
the target server is a windows 2022 server with ssh server installed by running powershell commands
Tested the target server can be ssh from jenkins server successfully without any problem…
I am also not sure why it is trying to make “c:” , now i cannot find out any setting related to this…
It looks like I am having problem here… for the Remote directory here:
If I use Remote directory as:
C:/Users/jenkins
c:\Users\jenkins
(empty)
It still have this error
20:06:53 SSH: Connecting from host [jenkins]
20:06:53 SSH: Connecting with configuration [abc-dev-dev] …
20:06:53 SSH: Disconnecting configuration [abc-dev-dev] …
20:06:53 ERROR: Exception when publishing, exception message [Could not create change to directory. Directory [C:]]
20:06:53 Build step ‘Send build artifacts over SSH’ changed build result to UNSTABLE
OK, eventually i fixed it…I fixed it by copy the same jenkin’s job to another one with different name…then it works instantly…
The setting have no problems at all, just because there was an invalid path setting in the old job…it showhow cached it no matter how I input it…not sure how to fix it, can only use stupid copy way to solve it, now with the remote directory as empty, it works as it should.
Jesus…there must be a bug of the cache or showwhat… if i rename the jobname back to the old one, the problem comes back again…I must rename the job to another one, it instantly works…
This is hell, if I don’t have programming sense, i wont be able to solve it…