Python 2.7 Python Orion上下文代理令牌问题
我一直在开发以下代码:Python 2.7 Python Orion上下文代理令牌问题,python-2.7,token,fiware,fiware-orion,Python 2.7,Token,Fiware,Fiware Orion,我一直在开发以下代码: 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
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实验室实例之间建立连接
错误是:
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',))
requests.exceptions.ConnectionError:HTTPConnectionPool(host='130.206.113.177',port=1026):url:/v1/实体超过了最大重试次数(由NewConnectionError引起(':未能建立新连接:[Errno 110]连接超时',))
似乎是网络连接问题
假设实际上有一个Orion进程监听IP 130.206.113.177上的端口1026(应该检查,例如在Orion运行的同一个VM中执行的curl localhost:1026/version
命令),Orion连接问题的最可能原因是:
- Orion主机中的某些东西(例如防火墙或安全组)正在阻止传入连接
- 客户端主机(如防火墙)中的某些东西正在阻止输出连接
- 连接问题是由其他网络问题引起的