Skip to content
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] unable to convert ip to uint32 net.ParseIP() #8

Closed
evanrolfe opened this issue Aug 5, 2024 · 5 comments
Closed

[Error] unable to convert ip to uint32 net.ParseIP() #8

evanrolfe opened this issue Aug 5, 2024 · 5 comments

Comments

@evanrolfe
Copy link
Owner

Original issue is from @nrjais posted here.

Agent listening...
[GRPC] connecting to server...
[FlowQueue] running...
[GRPC] sent NooP to command stream
[GRPC] received container_ids: []
[GRPC] done setting container_ids
[GRPC] received container_ids: [d80b1ab0c428 ef24cdbe7dcb]
[GRPC] done setting container_ids
[Error] unable to convert ip to uint32 net.ParseIP()
[ERROR] getPidsForContainer() d80b1ab0c428 , err: no index found for CMD from docker.ContainerTop()
[Error] unable to convert ip to uint32 net.ParseIP()
[ERROR] getPidsForContainer() ef24cdbe7dcb , err: no index found for CMD from docker.ContainerTop()

Docker version is new

Client: Docker Engine - Community
 Version:           27.1.1
 API version:       1.45 (downgraded from 1.46)
 Go version:        go1.22.5
 Git commit:        63125853e3
 Built:             Fri Jul 19 17:35:01 2024
 OS/Arch:           darwin/arm64
 Context:           orbstack

Server: Docker Engine - Community
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:29:18 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.7.19
  GitCommit:        2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
 runc:
  Version:          1.1.13
  GitCommit:        58aa9203c123022138b22cf96540c284876a7910
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
@evanrolfe
Copy link
Owner Author

evanrolfe commented Aug 5, 2024

@nrjais could you tell me the output of docker inspect d80b1ab0c428 and docker top d80b1ab0c428 please?

@nrjais
Copy link

nrjais commented Aug 5, 2024

Docker top

PID                 USER                TIME                COMMAND
4097                root                0:00                /bin/bash
4115                root                0:00                {node} npm
4126                root                0:00                sh -c cross-env APP_ENV=local next dev -p 4200
4127                root                0:00                node /app/node_modules/.bin/cross-env APP_ENV=local next dev -p 4200
4134                root                0:43                node /app/node_modules/.bin/next dev -p 4200
4145                root                0:00                /usr/local/bin/node /app/node_modules/jest-worker/build/workers/processChild.js

I think this is checking for CMD, but I am running the process manually without CMD. So the node process is manually started

@evanrolfe
Copy link
Owner Author

@nrjais thanks for that, weirdly docker top gives you a COMMAND while for me it is CMD. Anyway this will be an easy fix.. Could you still post the output of docker inspect d80b1ab0c428 though? Because there are actually two bugs here one relating to CMD and one relating to the IP not being found. Thanks

@nrjais
Copy link

nrjais commented Aug 5, 2024

Top output for new container

PID                 USER                TIME                COMMAND
4865                root                0:00                /bin/bash
5008                root                0:00                npm
5019                root                0:00                sh -c cross-env APP_ENV=local next dev -p 4200
5020                root                0:00                node /app/node_modules/.bin/cross-env APP_ENV=local next dev -p 4200
5027                root                1:06                node /app/node_modules/.bin/next dev -p 4200
5038                root                0:00                /usr/local/bin/node /app/node_modules/jest-worker/build/workers/processChild.js

Inspect output

[
    {
        "Id": "8af1346e9daff9f927aa12e3ce4531dc78b923f3007c92045ca32533fe5d7cae",
        "Created": "2024-08-05T09:27:33.53232841Z",
        "Path": "docker-entrypoint.sh",
        "Args": [
            "/bin/bash"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 4865,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2024-08-05T09:27:33.694385201Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:8951689bc94c5971e4fa0f1b37633bcd9509980e02229a492b1be63c72bf81f8",
        "ResolvConfPath": "/var/lib/docker/containers/8af1346e9daff9f927aa12e3ce4531dc78b923f3007c92045ca32533fe5d7cae/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/8af1346e9daff9f927aa12e3ce4531dc78b923f3007c92045ca32533fe5d7cae/hostname",
        "HostsPath": "/var/lib/docker/containers/8af1346e9daff9f927aa12e3ce4531dc78b923f3007c92045ca32533fe5d7cae/hosts",
        "LogPath": "/var/lib/docker/containers/8af1346e9daff9f927aa12e3ce4531dc78b923f3007c92045ca32533fe5d7cae/8af1346e9daff9f927aa12e3ce4531dc78b923f3007c92045ca32533fe5d7cae-json.log",
        "Name": "/flamboyant_mayer",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/Users/neeraj/rapido/service-config-dashboard:/app"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "host",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                15,
                100
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": [],
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware",
                "/sys/devices/virtual/powercap"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/c6ac4e459c0b8201728cbd723f61492a198d8a34f3813e534e53fc5a95d08672-init/diff:/var/lib/docker/overlay2/beafb191a9dcd3725ee90ad7e6c7657ff441419e82d78288b721b169d6ee3065/diff:/var/lib/docker/overlay2/cc081118a501e9fc1b7867eebc64bd0587c0983abd2b01514ee2e47744d14371/diff:/var/lib/docker/overlay2/83e6a9c6212b82f2aa58c68f758cbf252d343389ba32947facc8e0ed61a90a3c/diff:/var/lib/docker/overlay2/5adcaafb9f620968dd77bc5f8cc575a5d9119cbd6fec09f69cfe20576e135527/diff:/var/lib/docker/overlay2/3943175e765f098f88258ed9406e97ace52042e109465ed539229046c83ca86c/diff:/var/lib/docker/overlay2/222e66f9cc20e6db1c2ec6f81d85f80ce861fe21f7fb3fa06e162c40b46dc4f0/diff:/var/lib/docker/overlay2/e89c3241c27eeb8cde374adc8e22dba301f5646ab3aa3f6cdea2c6006236c324/diff:/var/lib/docker/overlay2/e270ea53f0e2c62428f8b7922c37a5064e58243e2c3f41a15180eed105c0c432/diff:/var/lib/docker/overlay2/c62f57042fede785719f6910156fb7007cf863efb491a68ca40115d2a4ba01d3/diff",
                "MergedDir": "/var/lib/docker/overlay2/c6ac4e459c0b8201728cbd723f61492a198d8a34f3813e534e53fc5a95d08672/merged",
                "UpperDir": "/var/lib/docker/overlay2/c6ac4e459c0b8201728cbd723f61492a198d8a34f3813e534e53fc5a95d08672/diff",
                "WorkDir": "/var/lib/docker/overlay2/c6ac4e459c0b8201728cbd723f61492a198d8a34f3813e534e53fc5a95d08672/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/Users/neeraj/rapido/service-config-dashboard",
                "Destination": "/app",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "orbstack",
            "Domainname": "",
            "User": "",
            "AttachStdin": true,
            "AttachStdout": true,
            "AttachStderr": true,
            "Tty": true,
            "OpenStdin": true,
            "StdinOnce": true,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NODE_VERSION=10.24.1",
                "YARN_VERSION=1.22.5"
            ],
            "Cmd": [
                "/bin/bash"
            ],
            "Image": "node:10",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {}
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "e57f5151539ee98cb8b8fe18e37ac2d18d099285a3becf949973b27abfdbdc9c",
            "SandboxKey": "/var/run/docker/netns/default",
            "Ports": {},
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "host": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "MacAddress": "",
                    "NetworkID": "f2714a584ae30567ab9684ef74f4650aa106cb7fb10ce4107a2c7b541126a686",
                    "EndpointID": "f7f9ab5c8dd099f9608617b624d3ba2456e5d006517b2a1961c227f8fb24dfe7",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "DriverOpts": null,
                    "DNSNames": null
                }
            }
        }
    }
]

@evanrolfe
Copy link
Owner Author

@nrjais thanks for the output. this issue should be resolved now, I've pushed a new version to the latest tag. However I've noticed you're running your container with --network host and that might cause problems, so if you still have problems try running the container without --network host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants