2.4.0升级到2.5.1后,打包和推送镜像存在问题

Blade 未结 1 1028
ivan_lee
ivan_lee 剑圣 2020-08-03 16:55

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

  1. BladeX 从2.4.0升级到2.5.1后,打包时Process terminated

    图片.png

2. 推送镜像时,harbor 镜像仓库在升级之前一直正常使用的

图片.png

图片.png

图片.png

图片.png

图片.png

3.


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


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


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


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

1条回答
  • 2.5.0版本开始将推送插件更换成了dockerfile-plugin,具体可以看手册

    image.png

    作者追问:2020-08-05 11:14

    目前2.4.0版本打包还能正常构建并上传到harbor 镜像库,但升级到2.5.0的版本就是推不上去了

      如下的错


    [INFO] [Warning] One or more build-args [JAR_FILE] were not consumed
    [INFO] Successfully built f02f16f8e903
    [INFO] Successfully tagged 192.168.20.7/blade/blade-auth:2.5.1.RELEASE
    [INFO]
    [INFO] Detected build of image with id f02f16f8e903
    [INFO] Successfully built 192.168.20.7/blade/blade-auth:2.5.1.RELEASE
    [INFO]
    [INFO] --- dockerfile-maven-plugin:1.4.13:push (default-cli) @ blade-auth ---
    [INFO] The push refers to repository [192.168.20.7/blade/blade-auth]
    [ERROR] Get https://192.168.20.7/v2/: dial tcp 192.168.20.7: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:134)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
            at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
            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:289)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: com.spotify.docker.client.exceptions.DockerException: Get https://192.168.20.7/v2/: dial tcp 192.168.20.7:443: connect: connection refused
            at com.spotify.plugin.dockerfile.LoggingProgressHandler.handleError(LoggingProgressHandler.java:105)
            at com.spotify.plugin.dockerfile.LoggingProgressHandler.progress(LoggingProgressHandler.java:63)
            at com.spotify.docker.client.ProgressStream.tail(ProgressStream.java:77)
            at com.spotify.docker.client.DefaultDockerClient$ResponseTailReader.call(DefaultDockerClient.java:2754)
            at com.spotify.docker.client.DefaultDockerClient$ResponseTailReader.call(DefaultDockerClient.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 [192.168.20.7/blade/blade-auth]
    [ERROR] Get https://192.168.20.7/v2/: dial tcp 192.168.20.7:443: connect: connection refused



    回答: 2020-08-05 11:28

    先不用原工程升级的版本,用git私服的原版,下载下来后进行推送试试

    老版和新版的maven配置,pom配置都有变化,要确认完整升级,具体变化可以看这个commit:https://center.bladex.cn/blade/BladeX/commit/b610399038bf77ab068d0bda98a29f01956ec9bb

    6.2.3.5与6.2.3.6两章节也重写了,针对新版本的教程,你要对比一下,另外新版的插件需要本机安装docker服务才可以。

    如果这些你都试了不行,那么推荐针对commit,去掉新版的docker插件配置,使用老版的配置。

    新版有好多人都推送部署成功了,所以肯定是没问题的,一般都会是升级期间的小细节遗漏才会导致错误,需要仔细对比。

    0 讨论(0)
提交回复