Failed to com.spotify:docker-maven-plugin:HttpHostConnectException:Connect to localhost:2375
2017-11-17 11:07
585 查看
在用docker部署Spring Cloud的时候,pom.xml:
执行命令:mvn package docker:build,报如下错误:
最后发现把docker-maven-plugin的version从0.4.3update到1.0.0就可以了!
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <!-- tag::plugin[] --> <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.4.3</version> <configuration> <imageName>${docker.image.prefix}/${project.artifactId}</imageName> <dockerDirectory>${project.basedir}</dockerDirectory> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>${project.build.finalName}.jar</include> </resource> </resources> </configuration> </plugin> <!-- end::plugin[] --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <skipTests>true</skipTests> </configuration> </plugin> </plugins> </build>
执行命令:mvn package docker:build,报如下错误:
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.3:build (default) on project users-microservice: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: 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
最后发现把docker-maven-plugin的version从0.4.3update到1.0.0就可以了!
相关文章推荐
- 【Exception】[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.14:build (default-cli)
- com.spotify:docker-maven-plugin 报localhost:2375 Connection refused 错误
- com.spotify:docker-maven-plugin 报localhost:2375 Connection refused 错误正确解决方法
- docker maven 出错:Failed to execute goal com.spotify:docker-maven-plugin:...: Request error: POST https://192.168.99.100:2376/build?t=
- Failed to fetch URL https://dl-ssl.google.com/glass/gdk/addon.xml, reason: HttpHostConnect Connectio
- org.apache.http.conn.HttpHostConnectException: Connection to http://localhost refused
- NoHttpResponseException:api.mch.weixin.qq.com:443 failed to respond
- PluginResolutionException( Failed to read artifact descriptor for org.apache.maven.plugins:)
- android 出现org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1 refused的解决方案
- org.apache.http.conn.HttpHostConnectException: Connection to refused
- Call to localhost/127.0.0.1:9001 failed on connection exception: java.net.ConnectException: Connecti
- to localhost:8020 failed on connection exception: java.net.ConnectException: 拒绝连接
- org.apache.http.conn.HttpHostConnectException: Connection to refused
- maven打包的时候报错:Failed to execute goalcom.google.code.maven-svn-revision-number-plugin:svn-revision-num
- maven Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-com
- mac 配置 ssh 到git (Could not resolve hostname github.com, Failed to connect to github.com port 443 Operation timed out)
- org.apache.http.conn.HttpHostConnectException: Connection to refused
- android 中访问localhost:8080 报错org.apache.http.conn.HttpHostConnectException
- tomcat应用org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]异常的根本原因