[JIRA] (JENKINS-40474) Failed to change to remote directory after updating from 1.0.5 to 1.1.2

5 views
Skip to first unread message

florinracila+jenkins@gmail.com (JIRA)

unread,
Dec 15, 2016, 6:55:01 AM12/15/16
to jenkinsc...@googlegroups.com
Florin Racila created an issue
 
Jenkins / Bug JENKINS-40474
Failed to change to remote directory after updating from 1.0.5 to 1.1.2
Issue Type: Bug Bug
Assignee: René de Groot
Attachments: installed_plugins_list.txt
Components: publish-over-dropbox-plugin
Created: 2016/Dec/15 11:54 AM
Environment: * Operating System: Windows 7 x64
* JRE: 1.8.0_66-b18
* Jenkins ver. 2.36 (upgraded from 2.35)
* Running as service, installed using standard windows installation,
* no reverse proxy
* Browser: Chrome 55.0.2883.87 m (64-bit)
* Direct internet issue, no proxy, no firewall, no connection issues
Priority: Major Major
Reporter: Florin Racila

1. What I did
I've upgraded Jenkins from 2.35 to 2.36 including all plugins.
Publish Over Dropbox was updated from 1.0.5 to 1.1.2.
After this update the Send build artifacts to Dropbox failed.

The build output is:

Dropbox:Connecting from host [DELF]
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
Dropbox:Caught exception [Failed to change to remote directory [/App/Releases/]] Sleeping for [1,000]ms before trying again
Dropbox:Connecting with configuration [App releases] ...
ERROR: Exception when publishing, exception message [Failed to change to remote directory [/App/Releases/]]
Build step 'Send build artifacts over Dropbox' changed build result to UNSTABLE

2. What I tried
I've tested the connection using Manage Jenkins -> Configure System -> Dropbox locations -> Test connection button. The output was the same (Failed to change to remote directory).

I've generated another API token. Still nothing changed and the build fails.

3. How I made it work
Downgrading only the 'Publish Over Dropbox' plugin to 1.0.5 made the upload work again. The 'Publish Over Dropbox' is the only item in the Plugin Manager -> Updates list.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

rcgroot@gmail.com (JIRA)

unread,
Dec 15, 2016, 7:46:01 AM12/15/16
to jenkinsc...@googlegroups.com
René de Groot commented on Bug JENKINS-40474
 
Re: Failed to change to remote directory after updating from 1.0.5 to 1.1.2

Would it be possible to share the exception stacktrace of these messages? It should be located in the Jenkins log file.

florinracila+jenkins@gmail.com (JIRA)

unread,
Dec 15, 2016, 8:45:01 AM12/15/16
to jenkinsc...@googlegroups.com

I upgraded again to 1.1.2 and the issue is reproducing again.
Manage Jenkins -> Log Recorders -> All Jenkins Logs does not contain any related exception. I even changed the log level for all names to ALL in Logger Configuration.

I see only one exception but it's not tied to issur nor to the moment of clicking the 'Test connection button':

Failed to update hudson.model.FreeStyleProject@1059f0[my-job] lastSuccessfulBuild permalink for my-job #18
java.io.IOException: Unable to delete 'c:\Program Files (x86)\Jenkins\jobs\my-job\builds\lastSuccessfulBuild'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
	at hudson.Util.deleteFile(Util.java:248)
	at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:113)
	at jenkins.model.PeepholePermalink.writeSymlink(PeepholePermalink.java:200)
	at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:150)
	at jenkins.model.PeepholePermalink.resolve(PeepholePermalink.java:122)
	at hudson.model.Job.getLastSuccessfulBuild(Job.java:912)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	...

I can see only the message in UI (near the test button):

Failed to connect or change directory
jenkins.plugins.publish_over.BapPublisherException: Failed to change to remote directory [/Medsoft/Releases/]

How can I do to provide more info?

rcgroot@gmail.com (JIRA)

unread,
Dec 18, 2016, 5:15:02 AM12/18/16
to jenkinsc...@googlegroups.com

I've reproduced the issue and was able to fix it by removing the trailing / from the 'Remote Directory'. So '/Medsoft/Releases' instead of '/Medsoft/Releases/'. I hope that works for you too.

Seems the that in the newer Dropbox API (the one I've started using in 1.1+ plugin version) the last '/' in the directory name is taken as part of the folder name. So the error is that the folder called 'Releases/' doesn't exit. Which makes sense because there would likely only be a folder called 'Releases' without the slash.

I'll keep this ticket open to update the plugin to automaticly trim the '/' before communicating with Dropbox so this can't bother other users.

Many thanks for reporting!

florinracila+jenkins@gmail.com (JIRA)

unread,
Dec 18, 2016, 5:39:01 AM12/18/16
to jenkinsc...@googlegroups.com

I just tested the quick fix and I can confirm it works on my environment with 1.1.2.

Thank you for all your hard work.

rcgroot@gmail.com (JIRA)

unread,
Feb 15, 2017, 2:57:01 PM2/15/17
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages