Closed yangjian102621 closed 5 years ago
Hi there,
Are you on the latest master branch?
Yep, l pull the code before run the project, it is the latest commit.
I am unable to reproduce this locally - can you please place console.log(this.url)
in callAPIStream
on line 34 and tell me the output?
Well, there are two file contains callAPIStream
method, i guess you mean the HTTPClinent.js
file.
i placed the code console.log("url: " + this.url)
Here is the output:
My filecoin daemon is runing, and the api service is up.
How about dependencies - have you tried running npm install
to make sure dependencies are up-to-date? Also, please set LOG_LEVEL
to silly
and paste the entire log here.
Yep, in fact i ran npm install
every time i had pull the code at once.
Is modifying the error log level to be modified here? .env
export DB_URL=postgresql://yangjian:123456@localhost:5432/yangjian
export FULL_NODE_URL=http://127.0.0.1:3453
export IS_MASTER=true
export PEER_INFO_FILE=./peerId.json
export HEARTBEAT_PORT=8090
export API_PORT=8081
export LOG_LEVEL=silly
Here is my output in console.
yangjian@yangjian-desktop:/ipfs/filecoin/filecoin-network-stats/backend$ npm install
> filecoin-network-stats-backend@0.0.0 postinstall /home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend
> ./build/stub-debug.sh
find: ‘./node_modules/libp2p-floodsub/node_modules/debug’: No such file or directory
find: ‘./node_modules/multistream-select/node_modules/debug’: No such file or directory
find: ‘./node_modules/libp2p-switch/node_modules/debug’: No such file or directory
find: ‘./node_modules/libp2p-tcp/node_modules/debug’: No such file or directory
find: ‘./node_modules/libp2p-connection-manager/node_modules/debug’: No such file or directory
find: ‘./node_modules/libp2p/node_modules/debug’: No such file or directory
find: ‘./node_modules/libp2p-secio/node_modules/debug’: No such file or directory
find: ‘./node_modules/libp2p-mplex/node_modules/debug’: No such file or directory
find: ‘./node_modules/libp2p-circuit/node_modules/debug’: No such file or directory
find: ‘./node_modules/debug’: No such file or directory
find: ‘./node_modules/libp2p-floodsub/node_modules/debug_old’: No such file or directory
find: ‘./node_modules/debug_old’: No such file or directory
find: ‘./node_modules/multistream-select/node_modules/debug_old’: No such file or directory
find: ‘./node_modules/libp2p-switch/node_modules/debug_old’: No such file or directory
find: ‘./node_modules/libp2p-tcp/node_modules/debug_old’: No such file or directory
find: ‘./node_modules/libp2p-connection-manager/node_modules/debug_old’: No such file or directory
find: ‘./node_modules/libp2p/node_modules/debug_old’: No such file or directory
find: ‘./node_modules/libp2p-secio/node_modules/debug_old’: No such file or directory
find: ‘./node_modules/libp2p-mplex/node_modules/debug_old’: No such file or directory
find: ‘./node_modules/libp2p-circuit/node_modules/debug_old’: No such file or directory
npm WARN filecoin-network-stats-backend@0.0.0 No description
npm WARN filecoin-network-stats-backend@0.0.0 No repository field.
updated 10 packages and audited 5315 packages in 6.597s
found 0 vulnerabilities
yangjian@yangjian-desktop:/ipfs/filecoin/filecoin-network-stats/backend$ source .env && node dist/src/main.js
Heap dump written to: heapdump-21837007.308639.heapsnapshot
{"message":"started heartbeat server","level":"info","label":"HeartbeatServer","timestamp":"2019-03-21T08:11:12.405Z"}
{"path":"/sync/","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.409Z"}
{"path":"/miners/csv","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.409Z"}
{"path":"/stats/storage/historicalMinerCounts/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.409Z"}
{"path":"/stats/storage/historicalStoragePrice/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.409Z"}
{"path":"/stats/storage/historicalCollateral/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.409Z"}
{"path":"/stats/storage/historicalCollateralPerGB/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.410Z"}
{"path":"/stats/storage/historicalStorageAmount/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.410Z"}
{"path":"/stats/storage/historicalUtilization/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.410Z"}
{"path":"/stats/token/historicalBlockRewards/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.410Z"}
{"path":"/stats/token/historicalCoinsInCirculation/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.410Z"}
{"path":"/stats/market/historicalTokenVolume/:duration((all|24h|1w|1m|1y))","method":"GET","level":"info","message":"mounted route","label":"APIServer","timestamp":"2019-03-21T08:11:12.410Z"}
{"port":"8081","level":"info","message":"API server started","label":"APIServer","timestamp":"2019-03-21T08:11:12.411Z"}
{"message":"waiting for chainsaw before materializing stats","level":"info","label":"MaterializationService","timestamp":"2019-03-21T08:11:12.411Z"}
{"message":"started poll","level":"silly","label":"Chainsaw","timestamp":"2019-03-21T08:11:12.417Z"}
{"url":"http://127.0.0.1:3453/api/chain/ls","level":"silly","message":"sending HTTP request to Filecoin node","label":"HTTPClient","timestamp":"2019-03-21T08:11:12.417Z"}
url: http://127.0.0.1:3453/api/chain/ls
{"err":{"message":"Invalid protocol: 127.0.0.1:","stack":"Error: Invalid protocol: 127.0.0.1:\n at Request.init (/home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend/node_modules/request/request.js:458:31)\n at new Request (/home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend/node_modules/request/request.js:127:8)\n at request (/home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend/node_modules/request/index.js:53:10)\n at Function.post (/home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend/node_modules/request/index.js:61:12)\n at HTTPClient.callAPIStream (/home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend/dist/src/client/HTTPClient.js:46:31)\n at ChainClientImpl.callAPIStream (/home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend/dist/src/client/HTTPClient.js:86:93)\n at Promise (/home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend/dist/src/client/ChainClient.js:24:57)\n at new Promise (<anonymous>)\n at ChainClientImpl.<anonymous> (/home/yangjian/workspace/ipfs/filecoin/filecoin-network-stats/backend/dist/src/client/ChainClient.js:24:19)\n at Generator.next (<anonymous>)"},"level":"error","message":"caught error during chainsaw run","label":"Chainsaw","timestamp":"2019-03-21T08:11:12.420Z"}
i visited the api 'http://localhost:8081/sync' and it reurn
Internal Server Error
I suspect is it cause by my .env
configuration incorrectly.
Thanks.
Additional information:
Did you get it wokring @yangjian102621 ?
@mslipper
Yep, what cause the problem is i had set the ENV variable http_proxy=127.0.0.1:7777
in my ~/.bashrc
I commented the env variable and it worked.
Thanks.
But i had get another problem, when visit the page http://llocalhost:8082:/storage/mining
,
the page is stuck, click no response, also can not close the page, and i have to close my browser.
well, i ran the command
and i get the error:
My
.env
file is