-
Notifications
You must be signed in to change notification settings - Fork 78
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
how to get metad servers's address #202
Comments
always get TTransportException error |
Please refer to my post here: https://www.siwei.io/nebula-python-storage-docker-guide/ |
我没有使用Jupyter啊,我用的是anaconda下的spyder,这种方式怎么获取metad地址呢? |
啊,关键的问题在于,docker compose 这个部署方式默认只暴露 graphD 给外边,如果你要从外边能够访问,需要
怎么获取这个地址呢? docker ps | grep metad0
ce5bc829f88c vesoft/nebula-metad:v2.6.0 "/usr/local/nebula/b…" 2 months ago Up 4 weeks (healthy) 9560/tcp, 0.0.0.0:49175->9559/tcp, :::49175->9559/tcp, 0.0.0.0:49174->19559/tcp, :::49174->19559/tcp, 0.0.0.0:49173->19560/tcp, :::49173->19560/tcp nebula-docker-compose_metad0_1
得到 meta_cache = MetaCache([('<主机的非localhost ip>', <meta0的外部端口>),
('如上', 如上),
('如上', 如上)],
50000)
# manually specify the storage address,下边 storaged 的地址方式同上
storage_addrs = [HostAddr(host='172.28.1.4', port=9779),
HostAddr(host='172.28.1.5', port=9779),
HostAddr(host='172.28.1.6', port=9779)]
graph_storage_client = GraphStorageClient(meta_cache, storage_addrs) |
如果不指定 storaged 的地址,client 会从 metaD 里边去获取它服务发现得到的地址,就是域名形式的,这样容器网络之外没法访问得到 storageD |
得到 49175->9559 是metad0外部端口 到这里是看懂的。 |
我这个例子给您参考哈
meta_cache = MetaCache([('192.168.8.127', 49175),
('192.168.8.127', 49172),
('192.168.8.127', 49178)],
50000)
# manually specify the storage address
storage_addrs = [HostAddr(host='192.168.8.127', port=49169),
HostAddr(host='192.168.8.127', port=49163),
HostAddr(host='192.168.8.127', port=49166)]
graph_storage_client = GraphStorageClient(meta_cache, storage_addrs) |
Its bit confusing what IP Address/port combination to use for metad and storage. Thanks
|
For GraphD/Graph Client, any endpoint/ip you can network-wise access is ok to be used for your clients. For MetaD and StorageD, it's similar as we talked in vesoft-inc/nebula#4231 (for spark-connector), that is, the client access MetaD from the endpoint you gave to it, and then it dynamically fetches list of storageD endpoints and access with that, that is, it assumed the same address(that nebula graph internal network) configured in storageD's configuration. |
We have noticed that the issue you created hasn’t been updated for nearly a month, so we have to close it for now. If you have any new updates, you are welcome to reopen this issue anytime. Thanks a lot for your contribution. |
scan vertex and edge code, there is a line MetaCache([('XXX', 9669),('XXX', 9669),('XXX', 9669)], 50000),how to get the three XXX address?
The text was updated successfully, but these errors were encountered: