Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
3070 Lượt xem

Using CookComputing (XML-RPC.net) in C# to connect a Odoo\.sh\ server,\ it\ does\ not\ connect\. \ We\ get\ "Unable\ to\ connect\ to\ the\ remote\ server"\ message\. \ We\ tried\ using\ a\ DB\ in\ production,\ staging\ or\ development\ and\ all\ produce\ same\ message\.  


Then\ tried\ to\ connect\ using\ the\ commands\ for\ Python\ as\ the\ External\ API\ \(https://www\.odoo\.com/documentation/16\.0/developer/api/external_api\.html\)\ indicates,\ it\ also\ fails:

import\ xmlrpc\.client
>>>\ url='https://chamsyspr\-demo2\.odoo\.com/'
>>>\ common\ =\ xmlrpc\.client\.ServerProxy\('\{\}/xmlrpc/2/common'\.format\(url\)\)
>>>\ common\.version\(\)
Traceback\ \(most\ recent\ call\ last\):
\ \ File\ "",\ line\ 1,\ in\
\ \ File\ "/usr/lib64/python3\.6/xmlrpc/client\.py",\ line\ 1112,\ in\ __call__
\ \ \ \ return\ self\.__send\(self\.__name,\ args\)
\ \ File\ "/usr/lib64/python3\.6/xmlrpc/client\.py",\ line\ 1452,\ in\ __request
\ \ \ \ verbose=self\.__verbose
\ \ File\ "/usr/lib64/python3\.6/xmlrpc/client\.py",\ line\ 1154,\ in\ request
\ \ \ \ return\ self\.single_request\(host,\ handler,\ request_body,\ verbose\)
\ \ File\ "/usr/lib64/python3\.6/xmlrpc/client\.py",\ line\ 1166,\ in\ single_request
\ \ \ \ http_conn\ =\ self\.send_request\(host,\ handler,\ request_body,\ verbose\)
\ \ File\ "/usr/lib64/python3\.6/xmlrpc/client\.py",\ line\ 1279,\ in\ send_request
\ \ \ \ self\.send_content\(connection,\ request_body\)
\ \ File\ "/usr/lib64/python3\.6/xmlrpc/client\.py",\ line\ 1309,\ in\ send_content
\ \ \ \ connection\.endheaders\(request_body\)
\ \ File\ "/usr/lib64/python3\.6/http/client\.py",\ line\ 1268,\ in\ endheaders
\ \ \ \ self\._send_output\(message_body,\ encode_chunked=encode_chunked\)
\ \ File\ "/usr/lib64/python3\.6/http/client\.py",\ line\ 1044,\ in\ _send_output
\ \ \ \ self\.send\(msg\)
\ \ File\ "/usr/lib64/python3\.6/http/client\.py",\ line\ 982,\ in\ send
\ \ \ \ self\.connect\(\)
\ \ File\ "/usr/lib64/python3\.6/http/client\.py",\ line\ 1433,\ in\ connect
\ \ \ \ super\(\)\.connect\(\)
\ \ File\ "/usr/lib64/python3\.6/http/client\.py",\ line\ 954,\ in\ connect
\ \ \ \ \(self\.host,self\.port\),\ self\.timeout,\ self\.source_address\)
\ \ File\ "/usr/lib64/python3\.6/socket\.py",\ line\ 704,\ in\ create_connection
\ \ \ \ for\ res\ in\ getaddrinfo\(host,\ port,\ 0,\ SOCK_STREAM\):
\ \ File\ "/usr/lib64/python3\.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

I hope somebody can show me what's wrong.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

We were using the incorrect config

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 22
4173
2
thg 8 24
8361
0
thg 7 23
1852
0
thg 6 21
4592
0
thg 8 18
4400