-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
bert 客户端无法远程访问到server #846
Labels
serving
Issues of hub serving
Comments
那你得监测防火墙端口开了没?能不能telnet通,排除下
…---原始邮件---
发件人: "rickyhuw"<[email protected]>
发送时间: 2020年8月25日(周二) 下午4:19
收件人: "PaddlePaddle/PaddleHub"<[email protected]>;
抄送: "Subscribed"<[email protected]>;
主题: [PaddlePaddle/PaddleHub] bert 客户端无法远程访问到server (#846)
使用127.0.0.1这个IP是可以访问的,切换到本机IP就无法访问了。
报错日志:
Traceback (most recent call last):
File "1.py", line 6, in
bc = bs_client.BSClient(module_name="ernie_tiny", server="10.19.141.148:8866")
File "/home/work/.local/lib/python3.6/site-packages/paddlehub/serving/bert_serving/bs_client.py", line 18, in init
self.bs.add_server(server=server)
File "/home/work/.local/lib/python3.6/site-packages/paddlehub/serving/bert_serving/bert_service.py", line 76, in add_server
self.check_server()
File "/home/work/.local/lib/python3.6/site-packages/paddlehub/serving/bert_serving/bert_service.py", line 88, in check_server
client.connect((server_ip, server_port))
ConnectionRefusedError: [Errno 111] Connection refused
demo 代码:
coding: utf8
from paddlehub.serving.bert_serving import bs_client
if name == "main":
# 初始化bert_service客户端BSClient
bc = bs_client.BSClient(module_name="ernie_tiny", server="10.19.141.148:8866")
# 输入要做embedding的文本 # 文本格式为[["文本1"], ["文本2"], ] input_text = [ ["西风吹老洞庭波"], ["一夜湘君白发多"], ["醉后不知天在水"], ["满船清梦压星河"], ] # BSClient.get_result()获取结果 result = bc.get_result(input_text=input_text) # 打印输入文本的embedding结果 for item in result: print(item)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
在启动的时候增加参数 |
兄弟你解决了没有哇 ubuntu18.04 按照教程客户端访问不了 报错list index out of range 浏览器可以访问 |
没有解决,是他服务监听的问题,而且服务并没有提供相应的参数配置监听 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用127.0.0.1这个IP是可以访问的,切换到本机IP就无法访问了。
报错日志:
Traceback (most recent call last):
File "1.py", line 6, in
bc = bs_client.BSClient(module_name="ernie_tiny", server="10.19.141.148:8866")
File "/home/work/.local/lib/python3.6/site-packages/paddlehub/serving/bert_serving/bs_client.py", line 18, in init
self.bs.add_server(server=server)
File "/home/work/.local/lib/python3.6/site-packages/paddlehub/serving/bert_serving/bert_service.py", line 76, in add_server
self.check_server()
File "/home/work/.local/lib/python3.6/site-packages/paddlehub/serving/bert_serving/bert_service.py", line 88, in check_server
client.connect((server_ip, server_port))
ConnectionRefusedError: [Errno 111] Connection refused
demo 代码:
coding: utf8
from paddlehub.serving.bert_serving import bs_client
if name == "main":
# 初始化bert_service客户端BSClient
bc = bs_client.BSClient(module_name="ernie_tiny", server="10.19.141.148:8866")
The text was updated successfully, but these errors were encountered: