问题
When trying to persist an entity from Cygnus to Cosmos global instance it fails.
Looking at the log file I see something like that:
2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:273) - >> GET /webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms HTTP/1.1
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> X-Auth-Token: xxxxxxxxxxxxxxxxxxx
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> Host: cosmos.lab.fiware.org:14000
12 Nov 2015 15:31:50,006 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> Connection: Keep-Alive
12 Nov 2015 15:31:50,007 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.sendRequestHeader:276) - >> User-Agent: Apache-HttpClient/4.2.1 (java 1.5)
12 Nov 2015 15:31:50,284 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.close:169) - Connection 0.0.0.0:59834<->130.206.80.46:14000 closed
12 Nov 2015 15:31:50,285 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:716) - Closing the connection.
12 Nov 2015 15:31:50,285 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.conn.DefaultClientConnection.close:169) - Connection 0.0.0.0:59834<->130.206.80.46:14000 closed
12 Nov 2015 15:31:50,286 INFO [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:723) - I/O exception (java.net.SocketException) caught when processing request: Connection reset
12 Nov 2015 15:31:50,287 DEBUG [SinkRunner-PollingRunner-DefaultSinkProcessor] (org.apache.http.impl.client.DefaultRequestDirector.tryExecute:728) - Connection reset
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:185)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
(I have obfuscated the token in the example above.)
for some reason the connection is closed.
Orion and Cygnus are installed on a fiware lab private instance in Spain2.
When trying to fire the same request from the command line from the Orion machine, I get the same disconnected response.
curl -X GET "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms" -H "X-Auth-Token: xxxxxxxxxxxxxxxxxxxxxx"
curl: (56) Failure when receiving data from the peer
But surprisingly, when doing the same request from the command line from the Cosmos global instance, it works!
See:
[ms@cosmosmaster-gi ~]$ curl -X GET "http://cosmos.lab.fiware.org:14000/webhdfs/v1/user/ms/def_serv/def_servpath/6_registervalues/6_registervalues.txt?op=getfilestatus&user.name=ms" -H "X-Auth-Token: xxxxxxxxxxxxxxxxx"
{"FileStatus":{"pathSuffix":"","type":"FILE","length":2,"owner":"ms","group":"ms","permission":"644","accessTime":1447332222908,"modificationTime":1447253745711,"blockSize":67108864,"replication":3}}
[ms@cosmosmaster-gi ~]$
Seems like Cosmos will not service connection arriving from a fiware lab instance running on Spain2.
Does anyone knows what's the issue here, and how to correct this.
Thanks!
Menachem S.
回答1:
Issue was solved by a workaround.
The Cygnus server was installed on an external node ( a Machine on Azure), and everything works fine wrt Orion-->Cygnus-->Cosmos stream.
来源:https://stackoverflow.com/questions/33674713/cygnus-can-not-persist-data-on-cosmos-global-instance