我一直在开发以下代码:
datos = {
"id":"1",
"type":"Car",
"bra":"0",
}
jsonData = json.dumps(datos)
url = 'http://130.456.456.555:1026/v2/entities'
head = {
"Content-Type": "application/json",
"Accept": "application/json",
"X-Auth-Token": token
}
response = requests.post(url, data=jsonData, headers=head)
我的问题是我无法在计算机和Fiware Lab实例之间建立连接。
错误是:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='130.206.113.177', port=1026): Max retries exceeded with url: /v1/entities (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f02c97c1f90>: Failed to establish a new connection: [Errno 110] Connection timed out',))
答案 0 :(得分:1)
似乎是网络连接问题。
假设实际上有一个Orion进程正在监听IP 130.206.113.177上的端口1026(应进行检查,例如,在运行Orion的同一VM中执行curl localhost:1026/version
命令),这是造成Orion连接问题的最可能原因是: