香的掉渣菇

香的掉渣菇

暂无个人简介
知识星球
Java后端
2026
东南大学

该用户非会员

会员专享项目教程/ 答疑等服务

浅浅记录下自己解决的java操作docker出现的问题,代码是图一,运行一直报错: Exception in thread "main" java.lang.RuntimeException: org.apache.hc.client5.http.HttpHostConnectException: Connect to unix://localhost:2375 [localhost/127.0.0.1] failed: 连接被拒绝 at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:210) at com.github.dockerjava.httpclient5.ApacheDockerHttpClient.execute(ApacheDockerHttpClient.java:9) at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:228) at com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202) at com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74) at com.github.dockerjava.core.exec.InfoCmdExec.exec(InfoCmdExec.java:24) at com.github.dockerjava.core.exec.InfoCmdExec.exec(InfoCmdExec.java:14) at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:33) at com.seu.edu.codesandbox.docker.DockerDemo.main(DockerDemo.java:46) Caused by: org.apache.hc.client5.http.HttpHostConnectException: Connect to unix://localhost:2375 [localhost/127.0.0.1] failed: 连接被拒绝 at java.base/sun.nio.ch.Net.pollConnect(Native Method) at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682) at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:542) at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) at java.base/java.net.Socket.connect(Socket.java:751) at org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:216) at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:490) at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:164) at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:174) at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:144) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:150) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:113) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:110) at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51) at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:174) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:87) at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:206) ... 8 more 模仿鱼总重启了好几次,ai我也是换着问了好几个,折腾了一个下午,终于看到知乎的一篇文章(https://zhuanlan.zhihu.com/p/424941132),最关键的一步就是“修改docker信息,实现远程访问”,最后控制台终于打印镜像拉取成功了! 解决完bug肚子也饿了,先去吃完饭,回来继续做项目

最近在看面试鸭java的集合面试题,想问一下源码是看java8的,还是17的,因为springboot3要17以上,还是说代码实现思路都差不多,看哪个都一样

这里是rpc框架项目教程中读取配置文件的工具类,在消费者模块下运行正常读取resources目录下的配置文件,但是服务提供者就会读取他自己目录下的配置文件,但是由于不存在所以使用默认的rpc配置(按我的理解服务提供者应该也要读取消费者的配置才对吧),是不是我理解出错了

问一下大家实习都去哪里找,哪几个招聘软件比较合适,以及大三什么时候要开始找实习,如果寒假/暑假要实习的话一般提前几个月开始找实习投简历,看到朋友圈有同学大二暑假就拿大厂实习了有点焦虑。

下载 APP