配置 Docker Host URI
注意,这里要用 http://
!!!如果按照提示里用了 tcp:// 则会报错,异常信息如下:
2023-11-13 16:28:42.683+0000 [id=34] WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://10.8.4.57:8080/manage/descriptorByName/org.jenkinsci.plugins.docker.swarm.DockerSwarmCloud/validateTestDockerApiConnection
java.lang.NullPointerExceptionat org.jenkinsci.plugins.docker.swarm.docker.api.request.ApiRequest.<init>(ApiRequest.java:71)at org.jenkinsci.plugins.docker.swarm.docker.api.ping.PingRequest.<init>(PingRequest.java:10)at org.jenkinsci.plugins.docker.swarm.DockerSwarmCloud$DescriptorImpl.doValidateTestDockerApiConnection(DockerSwarmCloud.java:139)at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:397)
2023-11-13 16:44:26.516+0000 [id=275] INFO o.j.p.cloudstats.CloudStatistics#logTypeNotSupported: No support for cloud-stats plugin by class org.jenkinsci.plugins.docker.swarm.DockerSwarmComputer
[ERROR] [11/13/2023 16:44:26.856] [swarm-plugin-akka.actor.default-dispatcher-111] [akka://swarm-plugin/user/agt-_by_dockerswarm-2] unexpected url: tcp://10.8.4.57:2375/services/create
java.lang.IllegalArgumentException: unexpected url: tcp://10.8.4.57:2375/services/createat okhttp3.Request$Builder.url(Request.java:143)at org.jenkinsci.plugins.docker.swarm.docker.api.request.ApiRequest.toOkHttpRequest(ApiRequest.java:156)at org.jenkinsci.plugins.docker.swarm.docker.api.request.ApiRequest.execute(ApiRequest.java:162)at org.jenkinsci.plugins.docker.swarm.DockerSwarmAgentLauncherActor.createService(DockerSwarmAgentLauncherActor.java:79)at org.jenkinsci.plugins.docker.swarm.DockerSwarmAgentLauncherActor.lambda$createReceive$1(DockerSwarmAgentLauncherActor.java:50)at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24)
[ERROR] [11/13/2023 16:46:14.530] [swarm-plugin-akka.actor.default-dispatcher-116] [akka://swarm-plugin/user/dead-agentService-reaper] unexpected url: tcp://10.8.4.57:2375/services?filters=%7B%22label%22%3A%5B%22ROLE%3Djenkins-agent%22%5D%7D
java.lang.IllegalArgumentException: unexpected url: tcp://10.8.4.57:2375/services?filters=%7B%22label%22%3A%5B%22ROLE%3Djenkins-agent%22%5D%7Dat okhttp3.Request$Builder.url(Request.java:143)at org.jenkinsci.plugins.docker.swarm.docker.api.request.ApiRequest.toOkHttpRequest(ApiRequest.java:156)at org.jenkinsci.plugins.docker.swarm.docker.api.request.ApiRequest.execute(ApiRequest.java:162)at org.jenkinsci.plugins.docker.swarm.DeadAgentServiceReaperActor.reapDeadAgentServices(DeadAgentServiceReaperActor.java:41)at org.jenkinsci.plugins.docker.swarm.DeadAgentServiceReaperActor.lambda$createReceive$0(DeadAgentServiceReaperActor.java:28)at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24)