Skip to Content
Menu
This question has been flagged
1 Reply
1855 Views

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.

Avatar
Discard
Author Best Answer

We were using the incorrect config

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 22
2491
2
Aug 24
7039
0
Jul 23
826
0
Jun 21
3384
0
Aug 18
3453