SkyAPM / go2sky

Distributed tracing and monitor SDK in Go for Apache SkyWalking APM
https://skywalking.apache.org/
Apache License 2.0
448 stars 122 forks source link

fetch dynamic configuration error rpc error: code = PermissionDenied desc = #158

Closed hzms closed 2 years ago

hzms commented 2 years ago

As I use ssl config for grpc, it will pop error: fetch dynamic configuration error rpc error: code = PermissionDenied desc =, my code:

    creds := credentials.NewTLS(&tls.Config{
        ServerName:         "localhost",
        RootCAs:            cp,
        InsecureSkipVerify: true,
    })
    if rp, err := reporter.NewGRPCReporter(
        "localhost:11801",
        reporter.WithCheckInterval(time.Duration(option.ReporterCheckInterval)*time.Second),
        reporter.WithTransportCredentials(creds),
        reporter.WithAuthentication("DuFhKnzQASpbGRcAWUkYMhBWgvPaMBzm"),
    ); err != nil {
        return err
    } else {
        if t, err := go2sky.NewTracer(option.AppName, go2sky.WithReporter(rp)); err != nil {
            return err
        } else {
            Tracer = t
        }
    }

I'm sure my Auth token is correct Does the feature: fetch dynamic configuration work with ssl and authentication in current version? or what do I have to do ?

wu-sheng commented 2 years ago

The maintainer is on vacation. This will be held longer. It is better you could debug on your own.

arugal commented 2 years ago

@hzms Please provide your version of skywalking-oap :)

hzms commented 2 years ago

@arugal skywalking: image: apache/skywalking-oap-server:8.9.1 github.com/SkyAPM/go2sky v1.4.0

arugal commented 2 years ago

@arugal skywalking: image: apache/skywalking-oap-server:8.9.1 github.com/SkyAPM/go2sky v1.4.0

Dynamic Configuration is disabled by default, you can enable it on the skywalking-oap, and go2sky can also disable this feature by setting SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL=0.

arugal commented 2 years ago

@wu-sheng This feature is disabled by default in OAP, should go2sky also be disabled by default?

wu-sheng commented 2 years ago

I think this is a misread about the document. configuration-discovery module is open default for agents. configuration module is disabled as we don't have a configuration server to connect if user doesn't assign one.