执行mvn clean package dockerfile:build dockerfile:push失败

Blade 未结 1 869
无所谓
无所谓 剑圣 2021-02-04 15:11

一、该问题的重现步骤是什么?

1. 执行mvn clean package dockerfile:build dockerfile:push失败

2. 

3.


二、你期待的结果是什么?实际看到的又是什么?

想要能够mvn打包成功镜像并推送到服务器


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

BladeX   在win10的idea执行上述命令

四、请提供详细的错误堆栈信息,这很重要。

image.png


网页端可以访问

image.png


阿里云服务器上也可以登录成功

image.png


但是如果在win10上登录就失败(找了网上的解决方案都不可以)

image.png


idea错误详情

[ERROR] Get https://121.4.142.12/v2/: dial tcp 121.4.142.12:443: connect: connection refused

[WARNING] An attempt failed, will retry 1 more times

org.apache.maven.plugin.MojoExecutionException: Could not push image

    at com.spotify.plugin.dockerfile.PushMojo.execute (PushMojo.java:90)

    at com.spotify.plugin.dockerfile.AbstractDockerMojo.tryExecute (AbstractDockerMojo.java:265

)

    at com.spotify.plugin.dockerfile.AbstractDockerMojo.execute (AbstractDockerMojo.java:254)

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager

.java:137)

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)

    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModule

Builder.java:117)

    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModule

Builder.java:81)

    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (

SingleThreadedBuilder.java:56)

    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)


    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)

    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)

    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)

    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)

    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)

    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke (Method.java:498)

    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)

    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)

    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)

    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Caused by: com.spotify.docker.client.exceptions.DockerException: Get https://121.4.142.12/v2/:

dial tcp 121.4.142.12:443: connect: connection refused

    at com.spotify.plugin.dockerfile.LoggingProgressHandler.handleError (LoggingProgressHandler

.java:105)

    at com.spotify.plugin.dockerfile.LoggingProgressHandler.progress (LoggingProgressHandler.ja

va:63)

    at com.spotify.docker.client.ProgressStream.tail (ProgressStream.java:77)

    at com.spotify.docker.client.DefaultDockerClient$ResponseTailReader.call (DefaultDockerClie

nt.java:2754)

    at com.spotify.docker.client.DefaultDockerClient$ResponseTailReader.call (DefaultDockerClie

nt.java:2738)

    at java.util.concurrent.FutureTask.run (FutureTask.java:266)

    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)

    at java.lang.Thread.run (Thread.java:748)

[INFO] The push refers to repository [121.4.142.12/blade/blade-auth]

[ERROR] Get https://121.4.142.12/v2/: dial tcp 121.4.142.12:443: connect: connection refused

[INFO] ------------------------------------------------------------------------

[INFO] Reactor Summary for BladeX 2.7.2.RELEASE:

[INFO]

[INFO] BladeX ............................................. SUCCESS [  2.108 s]

[INFO] blade-common ....................................... SUCCESS [  3.943 s]

[INFO] blade-service-api .................................. SUCCESS [  0.525 s]

[INFO] blade-user-api ..................................... SUCCESS [  3.388 s]

[INFO] blade-system-api ................................... SUCCESS [  4.083 s]

[INFO] blade-auth ......................................... FAILURE [03:43 min]

[INFO] blade-gateway ...................................... SKIPPED

[INFO] blade-ops .......................................... SKIPPED

[INFO] blade-admin ........................................ SKIPPED

[INFO] blade-dict-api ..................................... SKIPPED

[INFO] blade-develop ...................................... SKIPPED

[INFO] blade-scope-api .................................... SKIPPED

[INFO] blade-ops-api ...................................... SKIPPED

[INFO] blade-flow-api ..................................... SKIPPED

[INFO] blade-flow ......................................... SKIPPED

[INFO] blade-flow-design .................................. SKIPPED

[INFO] blade-log .......................................... SKIPPED

[INFO] blade-report ....................................... SKIPPED

[INFO] blade-resource-api ................................. SKIPPED

[INFO] blade-resource ..................................... SKIPPED

[INFO] blade-swagger ...................................... SKIPPED

[INFO] blade-turbine ...................................... SKIPPED

[INFO] blade-xxljob ....................................... SKIPPED

[INFO] blade-xxljob-admin ................................. SKIPPED

[INFO] blade-desk-api ..................................... SKIPPED

[INFO] blade-service ...................................... SKIPPED

[INFO] blade-desk ......................................... SKIPPED

[INFO] blade-system ....................................... SKIPPED

[INFO] blade-user ......................................... SKIPPED

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  03:59 min

[INFO] Finished at: 2021-02-04T15:03:10+08:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:push (default-cli) on

 project blade-auth: Could not push image: Get https://121.4.142.12/v2/: dial tcp 121.4.142.12:

443: connect: connection refused -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following

 articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

[ERROR]

[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <args> -rf :blade-auth

五、若有更多详细信息,请在下面提供。


五、若有更多详细信息,请在下面提供。

1条回答
  • 2021-02-05 14:50

    看问题所在是win无法登录,导致无法推送。不过我们也没有遇到过这种情况,只能这么先操作下:

    用多台linux服务器或者mac系统进行docker login,再用多台win进行docker login。

    如果linux和mac均可以登录,只有个别win不能登录,则说明是win本身配置问题

    如果win全不能登录,则说明是harbor也许会有遗漏的配置。

    如果linux或者mac也出现了不能登录,则说明是harbor服务本身的问题,需要进一步排查

    0 讨论(0)
提交回复