{"record":{"id":"90568c6144e7ed74","repo":"nektos/act","slug":"conflicting-options-cannot-specify-both-mac-add","errorCode":null,"errorMessage":"conflicting options: cannot specify both --mac-address and per-network MAC address","messagePattern":"conflicting options: cannot specify both --mac-address and per-network MAC address","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/container/docker_cli.go","lineNumber":832,"sourceCode":"\treturn endpoints, nil\n}\n\nfunc applyContainerOptions(n *opts.NetworkAttachmentOpts, copts *containerOptions) error { //nolint:gocyclo\n\t// TODO should we error if _any_ advanced option is used? (i.e. forbid to combine advanced notation with the \"old\" flags (`--network-alias`, `--link`, `--ip`, `--ip6`)?\n\tif len(n.Aliases) > 0 && copts.aliases.Len() > 0 {\n\t\treturn errors.New(\"conflicting options: cannot specify both --network-alias and per-network alias\")\n\t}\n\tif len(n.Links) > 0 && copts.links.Len() > 0 {\n\t\treturn errors.New(\"conflicting options: cannot specify both --link and per-network links\")\n\t}\n\tif n.IPv4Address.IsValid() && copts.ipv4Address != nil {\n\t\treturn errors.New(\"conflicting options: cannot specify both --ip and per-network IPv4 address\")\n\t}\n\tif n.IPv6Address.IsValid() && copts.ipv6Address != nil {\n\t\treturn errors.New(\"conflicting options: cannot specify both --ip6 and per-network IPv6 address\")\n\t}\n\tif n.MacAddress != \"\" && copts.macAddress != \"\" {\n\t\treturn errors.New(\"conflicting options: cannot specify both --mac-address and per-network MAC address\")\n\t}\n\tif len(n.LinkLocalIPs) > 0 && copts.linkLocalIPs.Len() > 0 {\n\t\treturn errors.New(\"conflicting options: cannot specify both --link-local-ip and per-network link-local IP addresses\")\n\t}\n\tif copts.aliases.Len() > 0 {\n\t\tn.Aliases = make([]string, copts.aliases.Len())\n\t\tcopy(n.Aliases, copts.aliases.GetSlice())\n\t}\n\t// For a user-defined network, \"--link\" is an endpoint option, it creates an alias. But,\n\t// for the default bridge it defines a legacy-link.\n\tif container.NetworkMode(n.Target).IsUserDefined() && copts.links.Len() > 0 {\n\t\tn.Links = make([]string, copts.links.Len())\n\t\tcopy(n.Links, copts.links.GetSlice())\n\t}\n\tif copts.ipv4Address != nil {\n\t\tif ipv4, ok := netip.AddrFromSlice(copts.ipv4Address.To4()); ok {\n\t\t\tn.IPv4Address = ipv4\n\t\t}","sourceCodeStart":814,"sourceCodeEnd":850,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/container/docker_cli.go#L814-L850","documentation":"Error [97]: While blocking on ContainerWait (condition: not-running) for the job container, the daemon's error channel delivered an error. This is a wait-API transport failure — the container may still be running, but act lost the wait stream. Distinct from exit-code failures (those produce 'exit with FAILURE').","triggerScenarios":"cr.cli.ContainerWait's Error channel firing: daemon connection dropped during a long job, daemon restarted, API incompatibility on wait endpoint, or container removed externally while being waited on.","commonSituations":"Long jobs over remote/tcp DOCKER_HOST where proxies close idle connections; docker daemon OOM/restart mid-job; someone runs docker rm on the act container concurrently; CI runner networking hiccups.","solutions":["Keepalive the docker connection (ssh -o ServerAliveInterval=..., or use unix socket)","Ensure no concurrent docker rm/prune runs against act containers during a job","Check dockerd logs/restarts: systemctl status docker\nFor long jobs on flaky links, run act on the docker host itself"],"exampleFix":"# before: idle tunnel dies during wait\n$ ssh -L /tmp/d.sock:/var/run/docker.sock host & act\n# after\n$ ssh -o ServerAliveInterval=30 -L /tmp/d.sock:/var/run/docker.sock host & act","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"failed to wait for container\") {\n\t// transport-level failure: verify daemon, then retry wait once via ContainerInspect loop\n\tfor i := 0; i < 5; i++ {\n\t\tc, ierr := cli.ContainerInspect(ctx, id)\n\t\tif ierr == nil && c.State.Status == \"exited\" { return fmt.Errorf(\"exit %d\", c.State.ExitCode) }\n\t\ttime.Sleep(2 * time.Second)\n\t}\n}","preventionTips":["Use keepalives on tunneled docker sockets","Never docker rm/prune act containers mid-job","Run act on the docker host for long jobs instead of remote DOCKER_HOST"],"tags":["docker","container-wait","network","long-running"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}