I have a lot of errors using the API and I am wondering if there is anyway to debug it.

When I use

 curl ""
{"Links":[],"Data":"\u0008\u0002\u0012\u000etrevor oakley\n\u0018\u000e"}

When I try

 curl "http://jenbil.com:5001/api/v0/cat?arg=QmU5KhkgvweYgE3Gsr8A19uFQrq7mszx7dubcoo89cTmAV&stream-channels=true"
curl: (7) Failed to connect to jenbil.com port 5001: Connection refused

netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address            State       PID/Program name
tcp        0      0*                   LISTEN      13749/ipfs      
tcp        0      0    *               LISTEN       1287/sshd       
tcp        0      0  *               LISTEN      13749/ipfs      
tcp        0      0*               LISTEN      11669/geth      
tcp        0      0*               LISTEN      13749/ipfs      
tcp6       0      0 :::22                   :::*                    LISTEN      1287/sshd       
tcp6       0      0 :::3000                 :::*                    LISTEN      11513/node      
tcp6       0      0 :::30303                :::*                    LISTEN      11669/geth      
tcp6       0      0 :::4001                 :::*                    LISTEN      13749/ipfs 

Has anyone any ideas about this?


You need to set the IPFS host to

ipfs config Addresses.API /ip4/
ipfs config Addresses.Gateway /ip4/

You may also need to set CORS:

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'

Restart IPFS daemon.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.