FILAB VM和Cosmos全局实例之间的连接问题 [英] Connectivity problems between FILAB VMs and Cosmos global instance

查看:94
本文介绍了FILAB VM和Cosmos全局实例之间的连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在问题"Cygnus无法在Cosmos全局实例上保留数据" .但是,看完之后我没有找到解决方法.

I have the same kind of connectivity problem discussed in the question "Cygnus can not persist data on Cosmos global instance". However, I have found no solution after read it.

如今,我最近在FILAB中部署了两个虚拟机(两个VM都包含Orion ContextBroker 0.26.1和Cygnus 0.11.0).

Nowadays, I have recently deployed two virtual machines in FILAB (both VMs contain Orion ContextBroker 0.26.1 and Cygnus 0.11.0).

当我尝试通过天鹅座将数据持久存储在Cosmos上时,出现以下错误消息(在两个VM中相同):

When I try to persist data on Cosmos via Cygnus, I get the following error message (the same in both VMs) :

2015-12-17 19:03:00,221 (SinkRunner-PollingRunner-DefaultSinkProcessor)     
[ERROR - com.telefonica.iot.cygnus.sinks.OrionSink.process(OrionSink.java:305)]
 Persistence error (The /user/rmartinezcarreras/def_serv/def_serv_path/room1_room     
directory could not be created in HDFS. Server response: 503 Service unavailable)

另一方面,当我尝试从任何VM的命令行触发请求时,都会得到下一个响应:

On the other hand, when I try to fire a request from the command line of whatever VM, I get the next response:

[root@orionlarge centos]# curl -v -X GET "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/rmartinezcarreras/?       
op=liststatus&user.name=rmartinezcarreras" -H "X-Auth-Token: XXXXXXX"
* About to connect() to cosmos.lab.fiware.org port 14000 (#0)
*   Trying 130.206.80.46... connected
* Connected to cosmos.lab.fiware.org (130.206.80.46) port 14000 (#0)
> GET /webhdfs/v1/user/rmartinezcarreras/?    
op=liststatus&user.name=rmartinezcarreras HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7     
NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: cosmos.lab.fiware.org:14000
> Accept: */*
> X-Auth-Token: XXXXX
>
* Closing connection #0
* Failure when receiving data from the peer
curl: (56) Failure when receiving data from the peer

但是,从外部VM(FILAB外部):

Nevertheless, from an external VM (outside FILAB):

[root@dsieBroker orion]# curl -v -X GET     
"http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/rmartinezcarreras/?   
op=liststatus&user.name=rmartinezcarreras" -H "X-Auth-Token: XXXXX"
* About to connect() to cosmos.lab.fiware.org port 14000 (#0)
*   Trying 130.206.80.46... connected
* Connected to cosmos.lab.fiware.org (130.206.80.46) port 14000 (#0)
> GET /webhdfs/v1/user/rmartinezcarreras/?   
op=liststatus&user.name=rmartinezcarreras HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7    
NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: cosmos.lab.fiware.org:14000
> Accept: */*
> X-Auth-Token: XXXXXX
> 
< HTTP/1.1 200 OK
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: HEAD, POST, GET, OPTIONS, DELETE
< Access-Control-Allow-Headers: origin, content-type, X-Auth-Token, Tenant-    
ID, Authorization
< server: Apache-Coyote/1.1
< set-cookie:
hadoop.auth="u=rmartinezcarreras&p=rmartinezcarreras&t=simple&e=XXXXXX&s=
XXXXhD    8="; Version=1; Path=/
< Content-Type: application/json; charset=utf-8
< transfer-encoding: chunked
< date: Thu, 17 Dec 2015 18:52:46 GMT
< connection: close
< Content-Length: 243
< ETag: W/"f3-NL9+bYJLweyFpoJfNgjQrg"
< 
{"FileStatuses":{"FileStatus":       
[{"pathSuffix":"def_serv","type":"DIRECTORY","length":0,"owner":
"rmartinezcarreras","group":"rmartinezcarreras","permission":"740",
"accessTime":0,"modificationTime":1450349251833,"blockSize":0,
"replication":0}]}}
* Closing connection #0

我的Cosmos帐户也获得了不错的成绩.

Also get good results from my Cosmos account.

我该如何解决?似乎是连接问题.你能帮我吗?

How can I solve this? It seems a connectivity problem. Could you help me?

提前谢谢

推荐答案

最后,这是我们用于身份验证和授权的OAuth2代理的问题.它所基于的基础Express模块在存在另一个transfer-encoding: chunked标头时添加了content-length标头.正如其他问题所研究的那样,此组合不符合到 RFC ,并导致某些完全合规客户端实现正在重置连接.

Finally, this was a problem with the OAuth2 proxy we are using for Authentication and Authorization. The underlying Express module it is based was adding a content-length header when another transfer-encoding: chunked header was present. As researched in this other question, this combination is not according to the RFC, and was causing certain fully compliant client implementations were reseting the connection.

这篇关于FILAB VM和Cosmos全局实例之间的连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆