com.spotify:docker-maven-plugin 报localhost:2375 Connection refused 错误

当用maven build项目时出现了如下错误:

Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default-cli) on project config: 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

多方查找资料,最后发现,原来是自己的docker没装,也是醉了。

所以以后大家也出现了这种错误,原因可能:

1.没安装docker

2.如果安装了docker的话,可能docker的daemon没有运行

解决办法:

1.安装docker,docker官网有详细步骤

2.开启docker的守护进程,在linux上,运行

 systemctl start docker.service

再查资料的过程中找到与我类似的错误的一篇博客:http://blog.csdn.net/chinamcafee/article/details/66974686

其报错是:

Failed to execute goal com.spotify:docker-maven-plugin:0.2.9:build (default-cli) on project config: 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

解决办法:

把docker-maven-plugin版本更新成0.4.13即可

上一篇:挂载时出现mount: RPC: Unable to receive; errno = Connection refused错误的解决方法


下一篇:8种排序算法的C#实现