Jenkins和Artifactory之间的互连错误

时间:2022-08-05 23:07:55

I recently got an interconnection errors between Jenkins and Artifactory upon deployment of the job, the error re-appears frequently.

我最近在部署作业时出现了Jenkins和Artifactory之间的互连错误,错误经常重新出现。

I would like to know from where the problem comes, and what’s the cause of the outbreak of the error.

我想知道问题出在哪里,以及错误爆发的原因是什么。

We use the plugin version of Artifactory: Artifactory Plugin : 2.1.8

我们使用Artifactory:Artifactory Plugin:2.1.8的插件版本

Stack trace in Jenkins log :

Jenkins日志中的堆栈跟踪:

[ERROR] Internal error: java.lang.RuntimeException: Error occurred while publishing Build Info to Artifactory. Failed to send build info: HTTP response code: 403. HTTP response message: Interdit -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Error occurred while publishing Build Info to Artifactory.
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
     at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:117)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
     at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:178)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
     at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
     at hudson.remoting.UserRequest.perform(UserRequest.java:118)
     at hudson.remoting.UserRequest.perform(UserRequest.java:48)
     at hudson.remoting.Request$2.run(Request.java:328)
     at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Error occurred while publishing Build Info to Artifactory.
     at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:87)
     at org.jfrog.build.extractor.maven.BuildInfoRecorder.sessionEnded(BuildInfoRecorder.java:132)
     at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:64)
     at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:170)
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
     ... 23 more
 Caused by: java.io.IOException: Failed to send build info: HTTP response code: 403. HTTP response message: Interdit
     at org.jfrog.build.client.ArtifactoryBuildInfoClient.throwHttpIOException(ArtifactoryBuildInfoClient.java:642)
     at org.jfrog.build.client.ArtifactoryBuildInfoClient.sendBuildInfo(ArtifactoryBuildInfoClient.java:240)
     at org.jfrog.build.extractor.maven.BuildDeploymentHelper.deploy(BuildDeploymentHelper.java:85)
     ... 29 more

1 个解决方案

#1


1  

Firstly, you're using a very old version of the plugin, released in August 2013 — the current newest version was released in April 2015. So you should ideally upgrade and check if you have the same issue.

首先,您使用的是2013年8月发布的插件的旧版本 - 当前最新版本于2015年4月发布。因此,您应该理想地升级并检查是否存在相同的问题。

But as the HTTP status code and message say, you're being forbidden from accessing the server. So most likely you have the wrong credentials, or your account has been blocked, or similar.

但是,当HTTP状态代码和消息说,您被禁止访问服务器。因此,您很可能拥有错误的凭据,或者您的帐户已被屏蔽或类似。

Make sure that the correct URL and credentials for the relevant server are entered in the Jenkins system config under Manage Jenkins → Configure System → Artifactory.

确保在管理Jenkins→配置系统→Artifactory下的Jenkins系统配置中输入相关服务器的正确URL和凭据。

For each server configured, there is (since version 2.2.0) a Test Connection button which you can click to verify whether your server credentials are correct.

对于配置的每个服务器,(从2.2.0版开始)都有一个“测试连接”按钮,您可以单击该按钮以验证服务器凭据是否正确。

#1


1  

Firstly, you're using a very old version of the plugin, released in August 2013 — the current newest version was released in April 2015. So you should ideally upgrade and check if you have the same issue.

首先,您使用的是2013年8月发布的插件的旧版本 - 当前最新版本于2015年4月发布。因此,您应该理想地升级并检查是否存在相同的问题。

But as the HTTP status code and message say, you're being forbidden from accessing the server. So most likely you have the wrong credentials, or your account has been blocked, or similar.

但是,当HTTP状态代码和消息说,您被禁止访问服务器。因此,您很可能拥有错误的凭据,或者您的帐户已被屏蔽或类似。

Make sure that the correct URL and credentials for the relevant server are entered in the Jenkins system config under Manage Jenkins → Configure System → Artifactory.

确保在管理Jenkins→配置系统→Artifactory下的Jenkins系统配置中输入相关服务器的正确URL和凭据。

For each server configured, there is (since version 2.2.0) a Test Connection button which you can click to verify whether your server credentials are correct.

对于配置的每个服务器,(从2.2.0版开始)都有一个“测试连接”按钮,您可以单击该按钮以验证服务器凭据是否正确。