I am trying to launch a cosmos instance following this document:http://fiware-cosmos.readthedocs.io/en/latest/quick_start_guide_new/index.html.
The first step is executed successfully and i got a access token using which i create a cosmos account acc. to 2nd step and receive this response:
{"organizations": [], "displayName": "varun143", "roles": [], "app_id": "45bed173b2f8482aa15b22556c057112", "isGravatarEnabled": false, "email": "manchandavishal143#gmail.com", "id": "varun143"}.
Now i follow the 3rd step i.e creating a new dir using this command:curl -X PUT "http://storage.cosmos.lab.fiware.org:14000/webhdfs/v1/user/varun143/testdir?op=MKDIRS&user.name=varun143" -H "X-Auth-token: my acess token" | python -m json.tool and get this response:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (52) Empty reply from server
No JSON object could be decoded.
then i create a testdata.txt file in my local & write some data in it as per document and run this command:curl -v -X PUT -T testdata.txt "http://storage.cosmos.lab.fiware.org:14000/webhdfs/v1/user/varun143/testdir/testdata.txt?op=CREATE&user.name=varun143" -H "Content-Type: application/octet-stream" -H "X-Auth-token: my acess token" and get this response attach in this image url:https://imgur.com/uiWU5qr which is not as per document.Now where am i wrong & how to resolve this.Also how can i access cli or GUI of this instance.Thanks in advance.
You are using the old documentation of cosmos, the current documentation is available here https://github.com/ging/fiware-cosmos/blob/master/doc/manuals/quick_start_guide_new.md. Moreover, you need to send an email with the information that you got in step 2 for that the platform administrator creates your account, you have to consider that currently, we are in summer holidays so the creation of your account maybe suffers some delays. Also is important that you be informed that the cloud platform is only for testing purposes and use only batching processing. As a personal advice, if you don't have a real big data problem, don't try to solve it using big data technologies because you are only adding complexity to solve that problem.
Related
I can't manage to read the data from a luasocket. If i read more than the available data, the function call keeps blocked waiting until the client decides to close.
https://github.com/StringManolo/LuaServer/blob/main/tmpServer.lua#L216
line, errorStr = clientObj:receive("*a")
I'm using this command to test:
$ curl -X POST -d "a=b" http://localhost:1337 -v
Got same problem using Chrome to send a request to the Lua server.
I tryied to read byte to byte, line to line, all, etc.
GETH VERSION
Geth
Version: 1.8.10-stable
Git Commit: eae63c511ceafab14b92e274c1b18bf1700e2d3d
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10.1
Operating System: linux
GOPATH=/home/myuser/go
GOROOT=/usr/lib/go-1.10
Node running under:
geth --testnet --rpc --rpcapi "eth,net,web3,personal,parity" --syncmode="light"
Problem 1:
When I tried to run out Node with --syncmode="full" or --syncmode="fast", CurrentBlock is always behind then HighestBlock, Approximately 64 blocks. So Node is running under --syncmode="light".
My Goal is to find all pending transactions on my accounts.
Steps to reproduce
eth.getBlock('pending').transactions
["0x2e6d5273fa29e892313166b8de458793fb0728f13a9077ab2295c1dc2371529c", "0xcc2e659ea3f8b6f6c1b812d559198427b0b2adf0316213c903e08c277384a1c6", "0x6a194f095f3b9ee65fa2eb9765617edda8ea99c2f8ad3e09d03d61735acd3a34", "0x604f53727f6ad056d82f57ce07b4e28cfae16c098dca909bffeaa51fb3584843"]
Curl eth_getTransactionByBlockHashAndIndex
curl -X POST -H "Content-Type: application/json" --data'{"id":8,"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0xc0a9a6075081add64ac2f69b52f40de7b3d726281fc00a9ab23f90c892ae3346", "0x0"]}' http://localhost:8545
It returns:
{ "jsonrpc":"2.0",
"id":8,
"result":
{"blockHash":"0xc0a9a6075081add64ac2f69b52f40de7b3d726281fc00a9ab23f90c892ae3346",
"blockNumber":"0x344c3b",
"from":"0x40e0b46c7a461c02ab6e70d5536e23a9d727f9f8",
"gas":"0x927c0",
"gasPrice":"0x218711a00",
"hash":"0x2e6d5273fa29e892313166b8de458793fb0728f13a9077ab2295c1dc2371529c",
"input":"0xfe6362ae000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000c3332353136303935323130370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c3037363832333538353537300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e516d54755334664370664531563444784c547079507074596874664845446f5734774c745159675837375a376378000000000000000000000000000000000000",
"nonce":"0x161",
"to":"0xabe486e0ad5319d8047d5ef83e8c1cb1dce0d8c5",
"transactionIndex":"0x0","value":"0x0","v":"0x2a",
"r":"0xd1c106a22480e173784267c4da3db1707e2efd7598d9c55c6e060842d8e42390",
"s":"0x15786e1f7f4bd53e402d4911b0334b38973609415868687f171501b64770331e"}}
it works perfect, Now lets ask for this transaction using getTransactionByHash
Now lets check eth_getTransactionByHash:
curl -X POST -H "Content-Type: application/json" --data '{"id":8,"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x2e6d5273fa29e892313166b8de458793fb0728f13a9077ab2295c1dc2371529c"]}' http://localhost:8545
It returns
{"jsonrpc":"2.0","id":8,"result":null}
I have to get the same result, But i got null!
Any idea? Or any suggestion of another way how to get incoming pending transactions?
You can always check for transaction details using getTransactionReceipt.
Could you please try this and get back if you do get null sometimes?
Also regarding your question on getting pending transactions, mind you these pending transactions are not for your account or you node (if you haven't posted any). Since you are connected to the public version of Ethereum, you are getting these transactions which are some later point in time picked up by some miner and getting added to the ledger. For the answer, you might write a backend which saves the pending transaction data by polling it continuously and hence serve your purpose. I hope I have answered your question.
We are running Couchbase Community Edition 4.5.1, and recently went through the process of adding a TTL to documents were none previously existed. After doing so, we pulled the csv backup of the database and noticed a large number of the document are still returning an expiration of 0. We aren't sure if the issue is a failure to update, or in the data pull.
Unfortunately, Couchbase has an issue where expiration does not return in the metadata for N1QL, so we have been unable to independently confirm whether the csv is correct for any given document.
Is there another way to get the current TTL of a document, either through the Console UI or an API call?
You can use the cbc utility included in libcouchbase to fetch the TTL with --keystats. For example:
$ cbc-stats --keystats -u Administrator -P - -U couchbase://localhost/travel-sample airline
_112
Bucket password:
localhost:11210 key_is_dirty false
localhost:11210 key_exptime 0
localhost:11210 key_flags 33554432 (cbc: converted via htonl)
localhost:11210 key_cas 1503621971151421440
localhost:11210 key_vb_state active
And note that in Couchbase Server 5.0, the Sub-Document API has been enhanced so you can fetch the TTL as a virtual XATTR. For example:
$ cbc-subdoc -u Administrator -P - -U couchbase://localhost/travel-sample
Bucket password:
subdoc> get -x $document airline_112
airline_112 CAS=0x14ddf0375af40000
0. Size=188, RC=0x00 Success (Not an error)
{"CAS":"0x14ddf0375af40000","vbucket_uuid":"0x0000e976b253ad5c","seqno":"0x0000000000000001","exptime":0,"value_bytes":118,"datatype":["json"],"deleted":false,"last_modified":"1503621971"}
1. Size=118, RC=0x00 Success (Not an error)
{"callsign":"FLYSTAR","country":"United Kingdom","iata":"5W","icao":"AEU","id":112,"name":"Astraeus","type":"airline"}
subdoc> get -x $document.exptime airline_112
airline_112 CAS=0x14ddf0375af40000
0. Size=1, RC=0x00 Success (Not an error)
0
1. Size=118, RC=0x00 Success (Not an error)
{"callsign":"FLYSTAR","country":"United Kingdom","iata":"5W","icao":"AEU","id":112,"name":"Astraeus","type":"airline"}
subdoc> get -x $document.exptime -x $document.value_bytes airline_112
airline_112 CAS=0x14ddf0375af40000
0. Size=1, RC=0x00 Success (Not an error)
0
1. Size=3, RC=0x00 Success (Not an error)
118
2. Size=118, RC=0x00 Success (Not an error)
{"callsign":"FLYSTAR","country":"United Kingdom","iata":"5W","icao":"AEU","id":112,"name":"Astraeus","type":"airline"}
You can fetch these XATTRs programmatically too from an SDK which might be handy for unit tests. Documentation of these features is available.
I am using orabbix to monitor my db. The data from the queries executed on this db using orabbix are sent to zabbix server. However, I am not able to see the data reaching zabbix.
On my zabbix web console, I see this message on the triggers added - "Trigger expression updated. No status update so far."
Any ideas?
My update interval for the trigger is set to 30 sec.
Based on the screenshots you posted, your host is named "wfc1dev1" and you have items with keys "WFC_WFS_SYS_001" and "WFC_WFS_SYS_002". However, based on the Orabbix XML that it sends to Zabbix, the hostname and item keys are different. Here is the XML:
<req><host>V0ZDMURFVg==</host><key>V0ZDX0xFQUZfU1lTXzAwMg==</key><data>MA==</data></req>
From this, we can deduce the host:
$ echo V0ZDMURFVg== | base64 -d
WFC1DEV
The key:
$ echo V0ZDX0xFQUZfU1lTXzAwMg== | base64 -d
WFC_LEAF_SYS_002
The data:
$ echo MA== | base64 -d
0
It can be seen that neither the host name, nor item key match those configured on Zabbix server. Once you fix that, it should work.
I have tried out the sample REST JSON service at
http://www.javacodegeeks.com/2013/04/spring-mvc-easy-rest-based-json-services-with-responsebody.html
and the JQuery client can successfully post a person object to the service! Yahoo!
How do I do the same thing with cURL?
Here is my attempt:
curl -i -X POST -H "Content-Type: application/json; charset=UTF-8" -H "Accept: application/json" -d "{'name':'siegfried','age':26}" http://localhost:8080/api/person
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 71 100 42 100 29 39 26 0:00:01 0:00:01 --:--:-- 40
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 42
Server: Jetty(6.1.25)
Saved person: Person [name=null, age=null]
Compilation finished at Sun Dec 08 22:14:05
It is not parsing the data! How do I make it parse my json data?
I've been google searching for hours and trying out many combinations of escaping quotes and apostrophes and the like and nothing seems to work.
Thanks
siegfried
The -d will send your data as a post, you do not need to declare POST.
man curl gives the description on how to use -d. If anyone else would need it.
A simple Sinatra server http://www.sinatrarb.com, or something like it, can be used to debug your curls as well as a mock server
Is there a possibility that the problem is on the server-side, if you run it on local host you should have access to it, right?
I found the problem!
The spring #ResponseBody uses JSON for get but uses URL Encoding for POST.
See the jQuery POST method for http://codetutr.com/2013/04/09/spring-mvc-easy-rest-based-json-services-with-responsebody/
Why the inconsistency? This drove me nuts!
Well, I still don't have a cURL command. But I do have java and groovy clients that can now POST and GET. I should have a cURL soon.