环境 :
Jenkins Server (Linux(
Senkins slave agent (Windows (
构建版本:格拉德尔
项目 : 易B,硒,时髦
我在尝试编译我的 easyB + 硒项目时遇到编译错误。我们使用 gradle 来管理项目。
这些项目在本地桌面上编译得很好,但是当我们尝试通过 Jenkins 作业编译它时会失败 - 使用 Windows 从属代理,它会抛出编译错误。错误有点神秘 - java.net.SocketException: Unrecognized Windows Sockets error: 10106: socket
Grails用户报告了类似的问题 - 他们将其归因于过度使用端口。但在这种情况下,情况就不能这样吗?
我想知道 Gradle 是否正在尝试下载东西?但这也没有太大意义 - 因为编译运行良好 - 如果我在直接登录到 Windows 从属代理机器时运行它。
编译错误
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileGroovy'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:68)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)
at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$1.run(CacheLockHandlingTaskExecuter.java:34)
at org.gradle.cache.internal.DefaultCacheAccess$2.create(DefaultCacheAccess.java:200)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:172)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:198)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:137)
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83)
at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter.execute(CacheLockHandlingTaskExecuter.java:32)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:247)
at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:192)
at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:177)
at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:83)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:36)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:111)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:109)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:129)
at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:25)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30)
at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:200)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:173)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138)
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:48)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.Main.main(Main.java:39)
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:26)
Caused by: org.gradle.internal.UncheckedException: java.net.SocketException: Unrecognized Windows Sockets error: 10106: socket
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:39)
at org.gradle.messaging.remote.internal.inet.TcpIncomingConnector.accept(TcpIncomingConnector.java:66)
at org.gradle.messaging.remote.internal.HandshakeIncomingConnector.accept(HandshakeIncomingConnector.java:45)
at org.gradle.messaging.remote.internal.DefaultMultiChannelConnector.accept(DefaultMultiChannelConnector.java:57)
at org.gradle.messaging.remote.internal.DefaultMessagingServer.accept(DefaultMessagingServer.java:43)
at org.gradle.process.internal.DefaultWorkerProcessFactory$DefaultWorkerProcessBuilder.build(DefaultWorkerProcessFactory.java:77)
at org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager.startDaemon(CompilerDaemonManager.java:92)
at org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager.getDaemon(CompilerDaemonManager.java:52)
at org.gradle.api.internal.tasks.compile.daemon.DaemonGroovyCompiler.execute(DaemonGroovyCompiler.java:47)
at org.gradle.api.internal.tasks.compile.daemon.DaemonGroovyCompiler.execute(DaemonGroovyCompiler.java:34)
at org.gradle.api.internal.tasks.compile.NormalizingGroovyCompiler.delegateAndHandleErrors(NormalizingGroovyCompiler.java:99)
at org.gradle.api.internal.tasks.compile.NormalizingGroovyCompiler.execute(NormalizingGroovyCompiler.java:48)
at org.gradle.api.internal.tasks.compile.NormalizingGroovyCompiler.execute(NormalizingGroovyCompiler.java:34)
at org.gradle.api.internal.tasks.compile.DelegatingGroovyCompiler.execute(DelegatingGroovyCompiler.java:29)
at org.gradle.api.internal.tasks.compile.DelegatingGroovyCompiler.execute(DelegatingGroovyCompiler.java:20)
at org.gradle.api.internal.tasks.compile.IncrementalJavaCompilerSupport.execute(IncrementalJavaCompilerSupport.java:33)
at org.gradle.api.internal.tasks.compile.IncrementalJavaCompilerSupport.execute(IncrementalJavaCompilerSupport.java:23)
at org.gradle.api.tasks.compile.GroovyCompile.compile(GroovyCompile.java:77)
at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:196)
at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:102)
at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:99)
at org.gradle.api.tasks.compile.GroovyCompile_Decorated.invokeMethod(Unknown Source)
at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$4.execute(AnnotationProcessingTaskFactory.java:150)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$4.execute(AnnotationProcessingTaskFactory.java:145)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:472)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:461)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:60)
... 57 more
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 10106: socket
at org.gradle.messaging.remote.internal.inet.TcpIncomingConnector.accept(TcpIncomingConnector.java:61)
... 83 more
看起来该错误是WSAEPROVIDERFAILEDINIT错误。 从链接:
服务提供程序初始化失败。
无法加载或初始化请求的服务提供程序。如果无法加载服务提供程序的 DLL(加载库失败(或提供程序的 WSPStartup 或 NSPStartup 函数失败,则会返回此错误。
这可能是由于 Java 由包装器启动,但没有收到所有正确的环境变量:
在Sun的Java站点("10106"(上快速搜索,发现了这个线程:"java.net.SocketException:无法识别的Windows套接字错误:10106:创建"在 http://forum.java.sun.com/thread.jsp...hreadID=329241
该线程似乎表明"系统根目录"的环境变量可能不正确,需要重置。或者,作为替代方案,您可以设置/选择"将环境附加到本机环境">
(注意,该链接已失效,此链接有效:无法识别的Windows套接字错误:10106:创建(
所以,我想看看 Jenkins 是如何推出的。