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

nacos v2版本"client not connected, current status:STARTING" #329

Open
xiaocode337317439 opened this issue Nov 11, 2024 · 3 comments
Open

Comments

@xiaocode337317439
Copy link

xiaocode337317439 commented Nov 11, 2024

nacos v2版本中, 阿里代码是判断Ephemeral 来控制 启动grpc服务的,但是您这边的代码已经写死了。

_, err = client.RegisterInstance(vo.RegisterInstanceParam{
		ServiceName: opts.ServiceName,
		Ip:          host,
		Port:        port,
		Weight:      opts.Weight,
		Enable:      true,
		Healthy:     true,
		Ephemeral:   true,
		Metadata:    opts.Metadata,
		ClusterName: opts.Cluster,
		GroupName:   opts.Group,
	})
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


In the nacos v2 version, Alibaba code determines Ephemeral to control starting the grpc service, but the code on your side has been hard-coded.
go _, err = client.RegisterInstance(vo.RegisterInstanceParam{ ServiceName: opts.ServiceName, IP: host, Port: port, Weight: opts.Weight, Enable: true, Healthy: true, Ephemeral: true, Metadata: opts.Metadata, ClusterName: opts.Cluster, GroupName: opts.Group, })

@xiaocode337317439
Copy link
Author

nacos v2版本中, 阿里代码是判断Ephemeral 来控制 启动grpc服务的,但是您这边的代码已经写死了。

_, err = client.RegisterInstance(vo.RegisterInstanceParam{
		ServiceName: opts.ServiceName,
		Ip:          host,
		Port:        port,
		Weight:      opts.Weight,
		Enable:      true,
		Healthy:     true,
		Ephemeral:   true,
		Metadata:    opts.Metadata,
		ClusterName: opts.Cluster,
		GroupName:   opts.Group,
	})

我们公司刚好只开了http服务,没有暴露grpc端口,这样会导致服务注册不了

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


In the nacos v2 version, Alibaba code determines Ephemeral to control starting the grpc service, but the code on your side has been hard-coded.

_, err = client.RegisterInstance(vo.RegisterInstanceParam{
ServiceName: opts.ServiceName,
IP: host,
Port: port,
Weight: opts.Weight,
Enable: true,
Healthy: true,
Ephemeral: true,
Metadata: opts.Metadata,
ClusterName: opts.Cluster,
GroupName: opts.Group,
})

Our company happens to have only opened the http service and has not exposed the grpc port. This will cause the service to fail to be registered.

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