-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error deploy stack with external network #267
Comments
@alex-labuta thanks for the bug report! If I read correctly, we're looking at the following issues here:
For the first issue and since you mentioned Groovy 2.5.16: could you try upgrading to Groovy 3.x? I suppose the AbtractMethodError stems from an incompatibility between a Groovy 2.5 environment using a library compiled with Groovy 3.x. For the second issue, I'll have to reproduce it first. This would fit better in the dedicated docker-client/docker-compose-v3 repository, so I'd like to ask if you could file an issue there, maybe even with a more detailed log/stack trace. Thanks! |
@gesellix, yes, you understood correctly about issues, just to clarify, not reading but deployment. First, i tried with a groovy-3.0.10, and stack start correctly, so error is version related. For groovy-2.5.16 got the following output with debug: [main] INFO de.gesellix.docker.client.stack.DeployConfigReader - service network names: [xmnet-zh, ingress-routing] But the alias keeps failing with 3.0.10 (it no so critical), below stacktrace for alias issue: [main] INFO de.gesellix.docker.client.network.ManageNetworkClient - docker network inspect |
Exception when trying to deploy stack from exists compose file (correctly started from console command docker stack deploy)
from groovy with command:
def deployConfig = new DeployConfigReader(dockerClient).loadCompose(stackName, new FileInputStream(composerPath), workingDir,System.getenv());
Output messages:
[main] INFO de.gesellix.docker.client.DockerClientImpl - using docker at 'unix:///var/run/docker.sock'
[main] INFO de.gesellix.docker.compose.ComposeFileReader - composeContent: {version=3.9, services={xmdb={image=xmdb, environment={POSTGRES_USER=postgres, POSTGRES_PASSWORD=secret, PGDATA=/var/lib/postgresql/data/pgdata}, ports=[6012:5432], networks=[xmnet-zh], volumes=[/opt/containers/xm/zh:/var/lib/postgresql/data], deploy={replicas=1}}, xmapp={depends_on=[xmdb], image=xmapp, ports=[9012:8080], networks=[xmnet-zh, ingress-routing], deploy={replicas=1, labels={ingress.host=zh.xm.local, ingress.port=8080}}}}, networks={xmnet-zh=null, ingress-routing={external=true}}}}
[main] INFO de.gesellix.docker.client.stack.DeployConfigReader - composeContent: ComposeConfig(version=3.9, services={xmapp=StackService(build=null, capAdd=null, capDrop=null, cgroupParent=null, command=null, configs=null, containerName=null, dependsOn=[xmdb], deploy=Deploy(mode=null, replicas=1, labels=Labels(entries={ingress.host=zh.xm.local, ingress.port=8080}), updateConfig=null, resources=null, restartPolicy=null, placement=null, endpointMode=null, maxReplicasPerNode=null), devices=null, dns=null, dnsSearch=null, domainname=null, entrypoint=Entrypoint(parts=[]), envFile=null, environment=Environment(entries={}), expose=null, externalLinks=null, extraHosts=null, healthcheck=null, hostname=null, image=xmapp, ipc=null, labels=null, links=null, logging=null, macAddress=null, networkMode=null, networks={xmnet-zh=null, ingress-routing=null}, pid=null, ports=PortConfigs(portConfigs=[PortConfig(mode=ingress, target=8080, published=9012, protocol=tcp)]), privileged=null, readOnly=null, restart=null, securityOpt=null, shmSize=null, secrets=null, sysctls=null, stdinOpen=null, stopGracePeriod=null, stopSignal=null, tmpfs=null, tty=null, ulimits=null, user=null, usernsMode=null, volumes=null, workingDir=null), xmdb=StackService(build=null, capAdd=null, capDrop=null, cgroupParent=null, command=null, configs=null, containerName=null, dependsOn=null, deploy=Deploy(mode=null, replicas=1, labels=null, updateConfig=null, resources=null, restartPolicy=null, placement=null, endpointMode=null, maxReplicasPerNode=null), devices=null, dns=null, dnsSearch=null, domainname=null, entrypoint=Entrypoint(parts=[]), envFile=null, environment=Environment(entries={POSTGRES_USER=postgres, POSTGRES_PASSWORD=GhbdtnVbh, PGDATA=/var/lib/postgresql/data/pgdata}), expose=null, externalLinks=null, extraHosts=null, healthcheck=null, hostname=null, image=xmdb, ipc=null, labels=null, links=null, logging=null, macAddress=null, networkMode=null, networks={xmnet-zh=null}, pid=null, ports=PortConfigs(portConfigs=[PortConfig(mode=ingress, target=5432, published=6012, protocol=tcp)]), privileged=null, readOnly=null, restart=null, securityOpt=null, shmSize=null, secrets=null, sysctls=null, stdinOpen=null, stopGracePeriod=null, stopSignal=null, tmpfs=null, tty=null, ulimits=null, user=null, usernsMode=null, volumes=[ServiceVolume(type=bind, source=/opt/containers/xm/zh, target=/var/lib/postgresql/data, readOnly=false, consistency=, bind=null, volume=null)], workingDir=null)}, networks={xmnet-zh=null, ingress-routing=StackNetwork(driver=null, driverOpts=DriverOpts(options={}), ipam=null, external=External(external=true, name=), internal=null, attachable=false, labels=null)}, volumes=null, secrets=null, configs=null)}
[main] INFO de.gesellix.docker.client.stack.DeployConfigReader - service network names: [xmnet-zh, ingress-routing]
[main] INFO de.gesellix.docker.client.stack.DeployConfigReader - network configs: [xmnet-zh:NetworkCreateRequest(name=xmnet-zh, checkDuplicate=true, driver=overlay, internal=null, attachable=null, ingress=null, IPAM=null, enableIPv6=null, options=null, labels={com.docker.stack.namespace=zh})]
[main] INFO de.gesellix.docker.client.stack.DeployConfigReader - external networks: [ingress-routing]
[main] INFO de.gesellix.docker.client.system.ManageSystemClient - docker version
[main] INFO de.gesellix.docker.client.system.ManageSystemClient - docker version
Caught: java.lang.AbstractMethodError: de.gesellix.docker.client.stack.DeployConfigReader.getProperty(Ljava/lang/String;)Ljava/lang/Object;
java.lang.AbstractMethodError: de.gesellix.docker.client.stack.DeployConfigReader.getProperty(Ljava/lang/String;)Ljava/lang/Object;
at de.gesellix.docker.client.stack.DeployConfigReader$_validateExternalNetworks_closure20.doCall(DeployConfigReader.groovy:824)
at de.gesellix.docker.client.stack.DeployConfigReader.validateExternalNetworks(DeployConfigReader.groovy:817)
at de.gesellix.docker.client.stack.DeployConfigReader$validateExternalNetworks$1.callCurrent(Unknown Source)
at de.gesellix.docker.client.stack.DeployConfigReader.networks(DeployConfigReader.groovy:773)
at de.gesellix.docker.client.stack.DeployConfigReader$networks$0.callCurrent(Unknown Source)
at de.gesellix.docker.client.stack.DeployConfigReader.loadCompose(DeployConfigReader.groovy:107)
at de.gesellix.docker.client.stack.DeployConfigReader$loadCompose.call(Unknown Source)
Groovy 2.5.16
JDK8
Libraries file list:
docker-client-2022-02-01T12-00-00.jar
docker-filesocket-2022-02-22T19-32-00.jar
junixsocket-common-2.4.0.jar
kotlin-logging-jvm-2.1.21.jar
kotlin-stdlib-common-1.6.10.jar
moshi-kotlin-1.12.0.jar
okio-jvm-3.0.0.jar
slf4j-api-1.7.32.jar
docker-compose-2022-02-23T22-16-00.jar
docker-remote-api-client-2022-02-23T13-45-00.jar
junixsocket-native-common-2.4.0.jar
kotlin-reflect-1.6.10.jar
kotlin-stdlib-jdk8-1.6.10.jar
okhttp-4.9.3.jar
postgresql-42.2.18.jar
slf4j-simple-1.7.32.jar
docker-engine-2022-02-22T23-12-00.jar
docker-remote-api-model-1-41-2022-02-23T11-47-00.jar
kotlin-logging-2.1.21.jar
kotlin-stdlib-1.6.10.jar
moshi-1.12.0.jar
okio-3.0.0.jar
re2j-1.6.jar
snakeyaml-1.30.jar
Also docker-client cant parse external network alias like:
only direct naming as:
The text was updated successfully, but these errors were encountered: