Hello,
I’m executing “gradle -d -version” inside a docker container (CentOS 5.11 32 bits, Gradle 2.8 and Java 1.7. Docker server running over Ubuntu 16.04). I know Gradle is trying to initialize libnative-platform.so. If I look for native library inside cache directory, I can see “.gradle/native/19/linux-i386/libnative-platform.so.lock”. No more files and no more .so libraries.
I’ve got this error:
[developer@57a868b0953b esigp]$ gradle -d -version 15:39:36.201 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Unable to initialize native-platform. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library 'libnative-platform.so' for Linux i386. caused by: java.lang.ExceptionInInitializerError caused by: java.io.IOException: Operation not permitted 15:39:36.578 [QUIET] [system.out] 15:39:36.582 [QUIET] [system.out] ------------------------------------------------------------ 15:39:36.583 [QUIET] [system.out] Gradle 2.8
I can’t get more detailed information why library load failed.
If I try to execute “gradle -d”:
[developer@57a868b0953b .ssh]$ gradle -d --stacktrace 15:51:06.706 [DEBUG] [org.gradle.internal.nativeintegration.services.NativeServices] Unable to initialize native-platform. Failure: net.rubygrapefruit.platform.NativeException: Failed to load native library 'libnative-platform.so' for Linux i386. caused by: java.lang.ExceptionInInitializerError caused by: java.io.IOException: Operation not permitted 15:51:06.780 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Native-platform file system integration is not available. Continuing with fallback. 15:51:06.783 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Using UnsupportedSymlink implementation. 15:51:06.785 [DEBUG] [org.gradle.internal.nativeintegration.filesystem.services.FileSystemServices] Using JDK 7 file service org.gradle.internal.nativeintegration.filesystem.jdk7.PosixJdk7FilePermissionHandler 15:51:08.040 [INFO] [org.gradle.BuildLogger] Starting Build 15:51:08.041 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /home/developer/workspace/.gradle 15:51:08.041 [DEBUG] [org.gradle.BuildLogger] Current dir: /home/developer/.ssh 15:51:08.042 [DEBUG] [org.gradle.BuildLogger] Settings file: null 15:51:08.043 [DEBUG] [org.gradle.BuildLogger] Build file: null 15:51:08.098 [ERROR] [org.gradle.BuildExceptionReporter] 15:51:08.099 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 15:51:08.100 [ERROR] [org.gradle.BuildExceptionReporter] 15:51:08.100 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 15:51:08.101 [ERROR] [org.gradle.BuildExceptionReporter] Could not open cp_init class cache for initialization script '/home/developer/develop/thirdparty/gradle/gradle/init.d/init.gradle' (/home/developer/workspace/.gradle/caches/2.8/scripts/init_9fzwes3iw44gt0t1fvyj7ybe6/cp_init). 15:51:08.101 [ERROR] [org.gradle.BuildExceptionReporter] > Could not determine a usable local IP for this machine. 15:51:08.102 [ERROR] [org.gradle.BuildExceptionReporter] 15:51:08.102 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is: 15:51:08.104 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.cache.CacheOpenException: Could not open cp_init class cache for initialization script '/home/developer/develop/thirdparty/gradle/gradle/init.d/init.gradle' (/home/developer/workspace/.gradle/caches/2.8/scripts/init_9fzwes3iw44gt0t1fvyj7ybe6/cp_init). 15:51:08.104 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:48) 15:51:08.105 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:28) 15:51:08.105 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory.doOpen(DefaultCacheFactory.java:80) 15:51:08.106 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheFactory.open(DefaultCacheFactory.java:50) 15:51:08.106 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheRepository$PersistentCacheBuilder.doOpen(DefaultCacheRepository.java:138) 15:51:08.107 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheRepository$AbstractCacheBuilder.open(DefaultCacheRepository.java:121) 15:51:08.107 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.FileCacheBackedScriptClassCompiler.compile(FileCacheBackedScriptClassCompiler.java:63) 15:51:08.108 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.ShortCircuitEmptyScriptCompiler.compile(ShortCircuitEmptyScriptCompiler.java:60) 15:51:08.108 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.CachingScriptClassCompiler.compile(CachingScriptClassCompiler.java:41) 15:51:08.109 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.DefaultScriptCompilerFactory$ScriptCompilerImpl.compile(DefaultScriptCompilerFactory.java:50) 15:51:08.109 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:122) 15:51:08.110 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultInitScriptProcessor.process(DefaultInitScriptProcessor.java:49) 15:51:08.110 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.InitScriptHandler$1.run(InitScriptHandler.java:50) 15:51:08.111 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22) 15:51:08.111 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) 15:51:08.112 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:57) 15:51:08.112 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.InitScriptHandler.executeScripts(InitScriptHandler.java:46) 15:51:08.113 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:116) 15:51:08.113 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32) 15:51:08.114 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99) 15:51:08.114 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93) 15:51:08.114 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) 15:51:08.115 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62) 15:51:08.115 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93) 15:51:08.116 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82) 15:51:08.116 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94) 15:51:08.117 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) 15:51:08.117 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) 15:51:08.118 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43) 15:51:08.118 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28) 15:51:08.118 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77) 15:51:08.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47) 15:51:08.119 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51) 15:51:08.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28) 15:51:08.120 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43) 15:51:08.121 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170) 15:51:08.121 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) 15:51:08.122 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) 15:51:08.122 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) 15:51:08.122 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) 15:51:08.123 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) 15:51:08.123 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) 15:51:08.124 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) 15:51:08.124 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) 15:51:08.125 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33) 15:51:08.125 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) 15:51:08.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) 15:51:08.126 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) 15:51:08.127 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23) 15:51:08.127 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.RuntimeException: Could not determine a usable local IP for this machine. 15:51:08.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.messaging.remote.internal.inet.InetAddressFactory.findLocalBindingAddress(InetAddressFactory.java:115) 15:51:08.128 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.FileLockCommunicator.<init>(FileLockCommunicator.java:38) 15:51:08.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.getCommunicator(DefaultFileLockContentionHandler.java:153) 15:51:08.129 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.reservePort(DefaultFileLockContentionHandler.java:145) 15:51:08.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:79) 15:51:08.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:67) 15:51:08.130 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultCacheAccess.open(DefaultCacheAccess.java:86) 15:51:08.131 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.cache.internal.DefaultPersistentDirectoryStore.open(DefaultPersistentDirectoryStore.java:46) 15:51:08.131 [ERROR] [org.gradle.BuildExceptionReporter] ... 48 more 15:51:08.132 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.net.SocketException: Operation not permitted 15:51:08.132 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.messaging.remote.internal.inet.InetAddressFactory.init(InetAddressFactory.java:146)
I have read/write permissions inside GRADLE_USER_HOME directory as “/home/developer/workspace/.gradle/caches/2.8/scripts/init_9fzwes3iw44gt0t1fvyj7ybe6/cp_init” has been generated.
This combination worked for me before (SO, Gradle version, Java version…)!!! The difference is it was working in a docker server over Ubuntu 14.04 (now 16.04). Now I can’t find what’s happening in my environment.
Any suggest?
I really appreciate any help you can provide.
JC