nektos/act · error
conflicting options: cannot specify both --link-local-ip and
Error message
conflicting options: cannot specify both --link-local-ip and per-network link-local IP addresses
What it means
Error [98]: The job container's main process exited with a non-zero status code (from ContainerWait). This is act's job-level failure signal: the container command itself failed. The number printed is the container's exit status. Equivalent of the job 'failing' in real Actions — fix what the container runs.
Source
Thrown at pkg/container/docker_cli.go:835
func applyContainerOptions(n *opts.NetworkAttachmentOpts, copts *containerOptions) error { //nolint:gocyclo
// 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`)?
if len(n.Aliases) > 0 && copts.aliases.Len() > 0 {
return errors.New("conflicting options: cannot specify both --network-alias and per-network alias")
}
if len(n.Links) > 0 && copts.links.Len() > 0 {
return errors.New("conflicting options: cannot specify both --link and per-network links")
}
if n.IPv4Address.IsValid() && copts.ipv4Address != nil {
return errors.New("conflicting options: cannot specify both --ip and per-network IPv4 address")
}
if n.IPv6Address.IsValid() && copts.ipv6Address != nil {
return errors.New("conflicting options: cannot specify both --ip6 and per-network IPv6 address")
}
if n.MacAddress != "" && copts.macAddress != "" {
return errors.New("conflicting options: cannot specify both --mac-address and per-network MAC address")
}
if len(n.LinkLocalIPs) > 0 && copts.linkLocalIPs.Len() > 0 {
return errors.New("conflicting options: cannot specify both --link-local-ip and per-network link-local IP addresses")
}
if copts.aliases.Len() > 0 {
n.Aliases = make([]string, copts.aliases.Len())
copy(n.Aliases, copts.aliases.GetSlice())
}
// For a user-defined network, "--link" is an endpoint option, it creates an alias. But,
// for the default bridge it defines a legacy-link.
if container.NetworkMode(n.Target).IsUserDefined() && copts.links.Len() > 0 {
n.Links = make([]string, copts.links.Len())
copy(n.Links, copts.links.GetSlice())
}
if copts.ipv4Address != nil {
if ipv4, ok := netip.AddrFromSlice(copts.ipv4Address.To4()); ok {
n.IPv4Address = ipv4
}
}
if copts.ipv6Address != nil {
if ipv6, ok := netip.AddrFromSlice(copts.ipv6Address.To16()); ok {View on GitHub (pinned to 4f41128141)
Solutions
- docker logs <container> for the container's real stderr/stdout — the cause is printed there
- If exit 137: free memory, close other containers, or add swap; check docker stats during run Fix the failing command/entrypoint; test standalone with docker run --rm <image> <cmd> Pass required env via workflow env: block if the container expects it
Example fix
# before: container command fails (exit 1) # after: reproduce to find cause $ docker run --rm -it <job-image> <container-cmd>
Defensive patterns
Strategy: try-catch
Validate before calling
null // exit status is the workload's verdict; pre-validate only resources // e.g. check memory before job: // docker system df; free -m
Try / catch
if err != nil && strings.Contains(err.Error(), "exit with `FAILURE`: 137") {
// OOM: reduce parallelism/memory or add swap, then re-run
} else if err != nil && strings.Contains(err.Error(), "exit with `FAILURE`") {
// inspect docker logs <container> for the real error
} Prevention
- Always check docker logs of the job container on this error
- Watch docker stats for OOM (137) patterns
- Reproduce container commands standalone before blaming act
When it happens
Trigger: ContainerWait returning StatusCode != 0: entrypoint/workflow command failing inside the container (failing build, bad command, missing tool), or the container OOM-killed (137).
Common situations: CI-red builds reproduced locally; containers killed by OOM (exit 137) because act jobs default to no memory limit but host is short; entrypoint scripts exiting on error with set -e; missing env expected by the container's main command.
Related errors
- --no-healthcheck conflicts with --health-* options
- --health-timeout cannot be negative
- --health-retries cannot be negative
- --health-start-period cannot be negative
- --health-start-interval cannot be negative
AI-assisted analysis of nektos/act@4f41128141 (2026-08-15).
Data as JSON: /api/errors/a27dad9a7ba816f9.
Report an issue: GitHub.