Skip to content

couldn't get port by PID #74

Open
Open

Description

@weichangdong

gops memstats 27281
couldn't get port by PID: dial tcp 127.0.0.1:0: connect: can't assign requested address
when i use addr,long time no response.
i use go version go1.10 darwin/amd64.
i remember it works before,perhaps i updated the go version.

Activity

  1. ashishchandra2017 commented on Apr 9, 2018

    @ashishchandra2017

    Me too
    $ gops pprof-cpu 6433
    Profiling CPU now, will take 30 secs...
    couldn't get port by PID: dial tcp 127.0.0.1:0: connect: can't assign requested address

  2. 19920716 commented on Jul 7, 2018

    @19920716

    me too!!!

    But no one seems to care!!!

  3. Crazy-Kitty commented on Oct 26, 2018

    @Crazy-Kitty

    me too!!!

    But no one seems to care!!!

    1、golang version
    2、quote "github.com/google/gops/agent" in your code;
    3、add code in you main func, such as:
    if err := agent.Listen(agent.Options{}); err != nil {
    log.Fatal(err)
    }
    4、go build your code
    5、run your binary program
    6、gops option according to gops doc

  4. westwin commented on Nov 27, 2019

    @westwin

    to use gops, you MUST set env of GOPS_CONFIG_DIR, otherwise, it use $HOME/.config for linux system, in case the dir does not exist, gops will mkdir, but for which you might have no permission to mkdir

    func PIDFile(pid int) (string, error) {
    gopsdir, err := ConfigDir()
    if err != nil {
    return "", err
    }
    return fmt.Sprintf("%s/%d", gopsdir, pid), nil
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions