Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node created with IPFS.create() doesn't accept HTTP API requests #3563

Closed
uluhonolulu opened this issue Feb 19, 2021 · 4 comments
Closed

Node created with IPFS.create() doesn't accept HTTP API requests #3563

uluhonolulu opened this issue Feb 19, 2021 · 4 comments
Labels
kind/support A question or request for support

Comments

@uluhonolulu
Copy link

uluhonolulu commented Feb 19, 2021

  • Version: 0.5.2

  • Platform: Windows 64bit

Severity: High

Description:

I'm creating a node in my NodeJS application using IPFS.create(). The node works fine, but I cannot connect to its HTTP API endpoint -- port 5001 is not open (nor is 5002).

Steps to reproduce the error:

  1. Execute await IPFS.create() at startup.
  2. Run curl -L -X POST 'http://127.0.0.1:5001/api/v0/id' from the command line.

The file ~/.ipfs/api has a single line that says /ip4/127.0.0.1/tcp/5001/http

@uluhonolulu uluhonolulu added the need/triage Needs initial labeling and prioritization label Feb 19, 2021
@welcome
Copy link

welcome bot commented Feb 19, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@achingbrain
Copy link
Member

achingbrain commented Feb 19, 2021

The HTTP API is separate from the core of IPFS - you need to configure it separately.

See how the ipfs-daemon module does it here: https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-daemon/src/index.js#L50-L51

@achingbrain
Copy link
Member

achingbrain commented Feb 19, 2021

Also ~/.ipfs/api is used by go-IPFS. js-IPFS uses ~/.jsipfs.

@achingbrain achingbrain added kind/support A question or request for support and removed need/triage Needs initial labeling and prioritization labels Feb 19, 2021
@uluhonolulu
Copy link
Author

uluhonolulu commented Feb 20, 2021

Thanks @achingbrain!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

2 participants