slimtoolkit/slim · error
slim: error => no network info
Error message
slim: error => no network info
What it means
During container inspection in docker-slim's container inspector, the Docker Engine's inspect response came back without a NetworkSettings object. docker-slim requires network metadata to wire probes and expose ports, so it aborts rather than proceed with incomplete container info. This indicates an anomalous or stale inspect result rather than a normal user error.
Source
Thrown at pkg/app/master/inspectors/container/container_inspector.go:747
logger.Fatalf("[SIGMON] received SIGINT, killing container %s", i.ContainerID)
case <-i.dockerEventStopCh:
logger.Debug("[SIGMON] Docker event monitor stopped")
//not killing target because we are going through a graceful shutdown
//where we sent the StopMonitor and ShutdownSensor ipc commands
}
}()
if err := i.APIClient.StartContainer(i.ContainerID, nil); err != nil {
return err
}
inspectContainerOpts := dockerapi.InspectContainerOptions{ID: i.ContainerID, Size: true}
if i.ContainerInfo, err = i.APIClient.InspectContainerWithOptions(inspectContainerOpts); err != nil {
return err
}
if i.ContainerInfo.NetworkSettings == nil {
return fmt.Errorf("slim: error => no network info")
}
if hCfg := i.ContainerInfo.HostConfig; hCfg != nil && !i.isHostNetworked() {
logger.Debugf("container HostConfig.NetworkMode => %s len(ports)=%d",
hCfg.NetworkMode, len(i.ContainerInfo.NetworkSettings.Ports))
if len(i.ContainerInfo.NetworkSettings.Ports) < len(commsExposedPorts) {
return fmt.Errorf("slim: error => missing comms ports")
}
}
logger.Debugf("container NetworkSettings.Ports => %#v", i.ContainerInfo.NetworkSettings.Ports)
i.setAvailablePorts(hostProbePorts)
if i.PrintState {
i.xc.Out.Info("container",
ovars{View on GitHub (pinned to 81940d17fa)
Solutions
- Verify the container exists and was not removed mid-run: docker inspect <container-id>.
- Update Docker Engine and docker-slim to matched, current versions.
- Re-run the slim command; if it recurs, capture daemon logs and file an issue.
- Ensure the Docker API client/server version negotiation is not pinning an incompatible API version.
Example fix
// before: proceeding blindly
info, _ := client.InspectContainerWithOptions(opts)
use(info.NetworkSettings.Ports)
// after: guard like the inspector does
info, err := client.InspectContainerWithOptions(opts)
if err != nil { return err }
if info.NetworkSettings == nil {
return fmt.Errorf("slim: error => no network info")
} Defensive patterns
Strategy: try-catch
Validate before calling
info, err := client.InspectContainerWithOptions(opts)
if err == nil && info.NetworkSettings == nil {
// inspect the container again / verify it exists before proceeding
_, err = client.InspectContainerWithOptions(opts)
} Type guard
func hasNetworkSettings(info *dockertypes.ContainerJSON) bool {
return info != nil && info.NetworkSettings != nil
} Try / catch
if err := runSlimContainer(...); err != nil {
if strings.Contains(err.Error(), "no network info") {
// re-check container exists, then retry once
return retryOrInspectManually(containerID)
}
return err
} Prevention
- Confirm the container is running and not deleted concurrently before running slim.
- Keep Docker Engine and docker-slim versions current and matched.
- Avoid parallel tooling that removes/renames the target container during a slim run.
When it happens
Trigger: Calling RunContainer when the Docker API InspectContainerWithOptions succeeds but returns a ContainerInfo whose NetworkSettings field is nil — e.g. inspecting a container that was just removed, a daemon returning a degraded response, or an unexpected API version quirk.
Common situations: Running slim against a container that was concurrently deleted by another process; very old or very new Docker API versions changing response shape; resource pressure on the daemon producing partial inspect payloads.
Related errors
- slim: error => missing comms ports
- invalid context directory
- no service image
- start monitor timeout
- no docker info
AI-assisted analysis of slimtoolkit/slim@81940d17fa (2026-08-31).
Data as JSON: /api/errors/6187783bfd663352.
Report an issue: GitHub.