Jenkins Docker Swarm插件 配置的坑


配置 Docker Host URI

注意,这里要用 http://!!!如果按照提示里用了 tcp:// 则会报错,异常信息如下:

bash 复制代码
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.NullPointerException
	at 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)
bash 复制代码
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/create
	at 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)
bash 复制代码
[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%7D
	at 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)
相关推荐
_.Switch24 分钟前
高级Python自动化运维:容器安全与网络策略的深度解析
运维·网络·python·安全·自动化·devops
2401_8504108325 分钟前
文件系统和日志管理
linux·运维·服务器
JokerSZ.29 分钟前
【基于LSM的ELF文件安全模块设计】参考
运维·网络·安全
芯盾时代1 小时前
数字身份发展趋势前瞻:身份韧性与安全
运维·安全·网络安全·密码学·信息与通信
心灵彼岸-诗和远方2 小时前
DevOps业务价值流:架构设计最佳实践
运维·产品经理·devops
一只哒布刘2 小时前
NFS服务器
运维·服务器
南猿北者3 小时前
docker容器
docker·容器
苹果醋33 小时前
Java8->Java19的初步探索
java·运维·spring boot·mysql·nginx
二十雨辰3 小时前
[linux]docker基础
linux·运维·docker
time never ceases4 小时前
使用docker方式进行Oracle数据库的物理迁移(helowin/oracle_11g)
数据库·docker·oracle