Gradle Wrapper throws FileNotFoundException

From time to time, Gradle Wrapper fails with exception:

Exception in thread “main” /home/teamcity/.gradle/wrapper/dists/gradle-2.14-bin/76oc0mnc3ieqtsukq90mp0rxk/ (No such file or directory)
[01:33:30][Step 1/1] at Method)
[01:33:30][Step 1/1] at
[01:33:30][Step 1/1] at
[01:33:30][Step 1/1] at org.gradle.wrapper.ExclusiveFileAccessManager.access(
[01:33:30][Step 1/1] at org.gradle.wrapper.Install.createDist(
[01:33:30][Step 1/1] at org.gradle.wrapper.WrapperExecutor.execute(
[01:33:30][Step 1/1] at org.gradle.wrapper.GradleWrapperMain.main(
[01:33:30][Step 1/1] Process exited with code 1

What this is for, and what can cause the issue?

Gradle Version: 2.14
Operating System: Ubuntu 14.04

Link to CI build
Project sources:


thank you for your Bug report.

After looking into this I suppose this happens when the user running Gradle does not have write access to the Gradle home directory (/home/teamcity/.gradle in your case).

Have you been able to fix the problem, yet?


Hello Stefan,

This problem appears from time to time on TeamCity’s cloud agent. Next time I see the erorr, I will check the permissions and come back with more information.