Jump to content

Gradle not building properly


Aroma1997

Recommended Posts

It took me a while to setup gradle so it build my mod. After getting it to work, I wanted to run the script on my Jenkins, which didn't work.

After googeling about an hour, I decided to ask for help here.

 

That's the StackTrace:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'SOMETHING'.
> Could not open buildscript class cache for build file 'PATH_TO_DIR/build.gradle' (GRADLE_USER_HOME/caches/1.8/scripts/build_q863hgvhlvpfienrm8dsb9hpl/ProjectScript/buildscript).
   > java.net.BindException: Permission denied

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'SOMETHING'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:57)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:468)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:76)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:64)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:46)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:37)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:58)
Caused by: org.gradle.cache.CacheOpenException: Could not open buildscript class cache for build file 'PATH_TO_DIR/build.gradle' (GRADLE_USER_HOME/caches/1.8/scripts/build_q863hgvhlvpfienrm8dsb9hpl/ProjectScript/buildscript).
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:55)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:27)
at org.gradle.cache.internal.DefaultCacheFactory$CacheFactoryImpl.doOpenDir(DefaultCacheFactory.java:72)
at org.gradle.cache.internal.DefaultCacheFactory$CacheFactoryImpl.open(DefaultCacheFactory.java:111)
at org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:184)
at org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:134)
at org.gradle.cache.internal.DefaultCacheRepository$AbstractCacheBuilder.open(DefaultCacheRepository.java:121)
at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler.compile(FileCacheBackedScriptClassCompiler.java:51)
at org.gradle.groovy.scripts.internal.ShortCircuitEmptyScriptCompiler.compile(ShortCircuitEmptyScriptCompiler.java:35)
at org.gradle.groovy.scripts.internal.CachingScriptClassCompiler.compile(CachingScriptClassCompiler.java:36)
at org.gradle.groovy.scripts.DefaultScriptCompilerFactory$ScriptCompilerImpl.compile(DefaultScriptCompilerFactory.java:57)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:119)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
... 28 more
Caused by: org.gradle.internal.UncheckedException: java.net.BindException: Permission denied
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39)
at org.gradle.cache.internal.FileLockCommunicator.<init>(FileLockCommunicator.java:39)
at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.getCommunicator(DefaultFileLockContentionHandler.java:153)
at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.reservePort(DefaultFileLockContentionHandler.java:145)
at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:90)
at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:78)
at org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:88)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:45)
... 43 more
Caused by: java.net.BindException: Permission denied
at org.gradle.cache.internal.FileLockCommunicator.<init>(FileLockCommunicator.java:37)
... 49 more


BUILD FAILED

Total time: 7.974 secs
Build step 'Execute shell' marked build as failure
Finished: FAILURE

What I think I know from my research is that Gradle somehow can't bind a port, but how can I change that?

 

Thank you in advance for your help.

- Aroma1997

Link to comment
Share on other sites

It looks like you are trying to manipulate a locked cache through gradle. A locked cache should only be possible if another application opened it and crashed??? Or another application is still using it.

Caused by: java.net.BindException: Permission denied
at org.gradle.cache.internal.FileLockCommunicator.<init>(FileLockCommunicator.java:37)

I'd consider it a gradle bug, but it might just be user error.

 

Have you tried deleting your .gradle folder and rerunning the command?

Link to comment
Share on other sites

The problem is that you don't have write access to your gradle cache folder...

Make sure you have permission for that.

I did that. I have permission to do everything in that folder.

It can download and unzip http://services.gradle.org/distributions/gradle-1.8-bin.zip to there, so that shouldn't be the problem.

 

 

It looks like you are trying to manipulate a locked cache through gradle. A locked cache should only be possible if another application opened it and crashed??? Or another application is still using it.

I'd consider it a gradle bug, but it might just be user error.

 

Have you tried deleting your .gradle folder and rerunning the command?

 

Yes  I tried that, but it's still not working. I also checked, that directory  (or anything inside it) is not being used by another application.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.