在项目中执行 mvn clean package dockerfile:build dockerfile:push 失败

Blade 未结 1 111
半路笙歌
半路笙歌 2024-08-11 20:31

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

1. 在工程中进行打包镜像失败

2. 

3.


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

执行:mvn clean package dockerfile:build dockerfile:push 成功


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

bladex

2.5.1

macos系统


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

[INFO] Image will be built as 121.36.56.226:88/blade/ihp-dict:2.5.1.RELEASE

[INFO] 

八月 11, 2024 8:30:27 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: No such file or directory

八月 11, 2024 8:30:27 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: Retrying request to {}->unix://localhost:80

八月 11, 2024 8:30:27 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: No such file or directory

八月 11, 2024 8:30:27 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: Retrying request to {}->unix://localhost:80

八月 11, 2024 8:30:27 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: No such file or directory

八月 11, 2024 8:30:27 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: Retrying request to {}->unix://localhost:80

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

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

    at com.spotify.plugin.dockerfile.BuildMojo.buildImage (BuildMojo.java:247)

    at com.spotify.plugin.dockerfile.BuildMojo.execute (BuildMojo.java:135)

    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 (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: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:956)

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

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

    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: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: No such file or directory

    at com.spotify.docker.client.DefaultDockerClient.propagate (DefaultDockerClient.java:2848)

    at com.spotify.docker.client.DefaultDockerClient.request (DefaultDockerClient.java:2712)

    at com.spotify.docker.client.DefaultDockerClient.version (DefaultDockerClient.java:600)

    at com.spotify.docker.client.DefaultDockerClient.authRegistryHeader (DefaultDockerClient.java:2891)

    at com.spotify.docker.client.DefaultDockerClient.build (DefaultDockerClient.java:1498)

    at com.spotify.docker.client.DefaultDockerClient.build (DefaultDockerClient.java:1465)

    at com.spotify.plugin.dockerfile.BuildMojo.buildImage (BuildMojo.java:240)

    at com.spotify.plugin.dockerfile.BuildMojo.execute (BuildMojo.java:135)

    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 (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: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:956)

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

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

    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: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: No such file or directory

    at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.getValue (AbstractFuture.java:299)

    at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture$Sync.get (AbstractFuture.java:286)

    at jersey.repackaged.com.google.common.util.concurrent.AbstractFuture.get (AbstractFuture.java:116)

    at com.spotify.docker.client.DefaultDockerClient.request (DefaultDockerClient.java:2710)

    at com.spotify.docker.client.DefaultDockerClient.version (DefaultDockerClient.java:600)

    at com.spotify.docker.client.DefaultDockerClient.authRegistryHeader (DefaultDockerClient.java:2891)

    at com.spotify.docker.client.DefaultDockerClient.build (DefaultDockerClient.java:1498)

    at com.spotify.docker.client.DefaultDockerClient.build (DefaultDockerClient.java:1465)

    at com.spotify.plugin.dockerfile.BuildMojo.buildImage (BuildMojo.java:240)

    at com.spotify.plugin.dockerfile.BuildMojo.execute (BuildMojo.java:135)

    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 (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: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:956)

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

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

    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.shaded.javax.ws.rs.ProcessingException: java.io.IOException: No such file or directory

    at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector.apply (ApacheConnector.java:481)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector$1.run (ApacheConnector.java:491)

    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)

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

    at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute (MoreExecutors.java:299)

    at java.util.concurrent.AbstractExecutorService.submit (AbstractExecutorService.java:112)

    at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit (AbstractListeningExecutorService.java:50)

    at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit (AbstractListeningExecutorService.java:37)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector.apply (ApacheConnector.java:487)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.client.ClientRuntime$2.run (ClientRuntime.java:178)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors$1.call (Errors.java:271)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors$1.call (Errors.java:267)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process (Errors.java:315)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process (Errors.java:297)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process (Errors.java:267)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.process.internal.RequestScope.runInScope (RequestScope.java:340)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.client.ClientRuntime$3.run (ClientRuntime.java:210)

    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)

    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)

Caused by: java.io.IOException: No such file or directory

    at com.spotify.docker.client.shaded.jnr.unixsocket.UnixSocketChannel.doConnect (UnixSocketChannel.java:127)

    at com.spotify.docker.client.shaded.jnr.unixsocket.UnixSocketChannel.connect (UnixSocketChannel.java:136)

    at com.spotify.docker.client.shaded.jnr.unixsocket.UnixSocketChannel.connect (UnixSocketChannel.java:223)

    at com.spotify.docker.client.UnixConnectionSocketFactory.connectSocket (UnixConnectionSocketFactory.java:85)

    at com.spotify.docker.client.shaded.org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect (DefaultHttpClientConnectionOperator.java:134)

    at com.spotify.docker.client.shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect (PoolingHttpClientConnectionManager.java:353)

    at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.MainClientExec.establishRoute (MainClientExec.java:380)

    at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.MainClientExec.execute (MainClientExec.java:236)

    at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.ProtocolExec.execute (ProtocolExec.java:184)

    at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec.execute (RetryExec.java:88)

    at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RedirectExec.execute (RedirectExec.java:110)

    at com.spotify.docker.client.shaded.org.apache.http.impl.client.InternalHttpClient.doExecute (InternalHttpClient.java:184)

    at com.spotify.docker.client.shaded.org.apache.http.impl.client.CloseableHttpClient.execute (CloseableHttpClient.java:71)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector.apply (ApacheConnector.java:435)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector$1.run (ApacheConnector.java:491)

    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)

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

    at jersey.repackaged.com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute (MoreExecutors.java:299)

    at java.util.concurrent.AbstractExecutorService.submit (AbstractExecutorService.java:112)

    at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit (AbstractListeningExecutorService.java:50)

    at jersey.repackaged.com.google.common.util.concurrent.AbstractListeningExecutorService.submit (AbstractListeningExecutorService.java:37)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.apache.connector.ApacheConnector.apply (ApacheConnector.java:487)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.client.ClientRuntime$2.run (ClientRuntime.java:178)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors$1.call (Errors.java:271)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors$1.call (Errors.java:267)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process (Errors.java:315)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process (Errors.java:297)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.internal.Errors.process (Errors.java:267)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.process.internal.RequestScope.runInScope (RequestScope.java:340)

    at com.spotify.docker.client.shaded.org.glassfish.jersey.client.ClientRuntime$3.run (ClientRuntime.java:210)

    at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511)

    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] dockerfile: null

[INFO] contextDirectory: /opt/project/zkml/newCodeup/backend/blade-service/ihp-dict

[INFO] Building Docker context /opt/project/zkml/newCodeup/backend/blade-service/ihp-dict

[INFO] Path(dockerfile): null

[INFO] Path(contextDirectory): /opt/project/zkml/newCodeup/backend/blade-service/ihp-dict

[INFO] 

[INFO] Image will be built as 121.36.56.226:88/blade/ihp-dict:2.5.1.RELEASE

[INFO] 

八月 11, 2024 8:30:33 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: No such file or directory

八月 11, 2024 8:30:33 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: Retrying request to {}->unix://localhost:80

八月 11, 2024 8:30:33 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: No such file or directory

八月 11, 2024 8:30:33 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: Retrying request to {}->unix://localhost:80

八月 11, 2024 8:30:33 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: No such file or directory

八月 11, 2024 8:30:33 下午 com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec execute

信息: Retrying request to {}->unix://localhost:80

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

[INFO] BUILD FAILURE

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

[INFO] Total time:  26.814 s

[INFO] Finished at: 2024-08-11T20:30:33+08:00

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

[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (default-cli) on project ihp-dict: Could not build image: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: No such file or directory -> [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

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

1条回答
  •  半路笙歌
    2024-08-12 11:33

    搞定了,docker版本问题

    0 讨论(0)
提交回复