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

How to configure more than one addresses for "http_listen_multiaddress" in service.json #716

Closed
13 of 26 tasks
CoreyLin opened this issue Mar 13, 2019 · 6 comments
Closed
13 of 26 tasks
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature

Comments

@CoreyLin
Copy link

CoreyLin commented Mar 13, 2019

Pre-check

  • This is not a IPFS Cluster website content issue (file those here)
  • I read the troubleshooting section of the website and it did not help
  • I searched for similar issues in the repo without luck
  • All my peers are running the same cluster version
  • All my peers are configured using the same cluster secret

Basic information

  • Version information (mark as appropiate):
    • Master
    • Release candidate for next version
    • Latest stable version
    • An older version I should not be using
  • Type (mark as appropiate):
    • Bug
    • Feature request
    • Enhancement
    • Help
  • Operating system (mark as appropiate):
    • Linux
    • macOS
    • Windows
    • Other: which?
  • Installation method (mark as appropiate):
    • Binaries from dist.ipfs.io
    • Built from sources
    • Docker
    • Snap
    • Other: which?

Description

The detailed steps are below:
1.Set up a IPFS cluster with two nodes. It is successful.
2.In node1, use REST API to get pins:
curl 127.0.0.1:9094/pins
It is successful
3.Modify http_listen_multiaddress in service.json to "/ip4/0.0.0.0/tcp/9094", and then access the REST API from another node. It is successful.
4.Modify http_listen_multiaddress in service.json to "/ip4/0.0.0.0/tcp/9094,/ip4/192.168.1.2/tcp/9094" or "/ip4/0.0.0.0/tcp/9094 /ip4/192.168.1.2/tcp/9094". Restart ipfs-cluster-service, and it failed because the http_listen_multiaddress format can't be parsed.
So the question comes: how to configure more than one addresses for http_listen_multiaddress in service.json? What is the format? What is the delimiter between different addresses? It seems no documentation presents this. Thanks in advance.

@kishansagathiya
Copy link
Contributor

kishansagathiya commented Mar 13, 2019

@CoreyLin It is not possible to set more that one http_listen_multiaddress
It expects only one value
https://github.com/ipfs/ipfs-cluster/blob/508131081124bc8289b762ffb7e0e0572798e9be/api/rest/config.go#L65-L66

@kishansagathiya
Copy link
Contributor

kishansagathiya commented Mar 13, 2019

I am not sure why you will need two listen multiaddresses.
Keep in mind that each peer sets listen multiaddress for its own on its service.json. So, if you are trying to set up for other peer you will have to do there on its own service.json.

@hsanjuan
Copy link
Collaborator

hsanjuan commented Mar 13, 2019

hi @CoreyLin , /ip4/0.0.0.0/tcp/9094 should be the equivent to "listen on all interfaces", so you would not need the others in the list. Can you give more details about why you'd need more listeners?

@CoreyLin
Copy link
Author

CoreyLin commented Mar 14, 2019

@hsanjuan @kishansagathiya For example, if the host of a peer has 3 network cards, namely 3 ip addresses. But in some cases, if the business requirement is that only listening 2 ip addresses out of 3. Currently I don't meet such business requirement, but I think it is a reasonable and common requirement. When I saw the field name starting with "multi", I intuitively thought more than one ip addresses can be configured. Can it be realized from technical point of view? Thanks.

@hsanjuan hsanjuan added kind/enhancement A net-new feature or improvement to an existing feature help wanted Seeking public contribution on this issue exp/novice Someone with a little familiarity can pick up status/ready Ready to be worked labels Mar 15, 2019
@hsanjuan
Copy link
Collaborator

hsanjuan commented Mar 15, 2019

@CoreyLin a multiaddress is actually this: https://github.com/multiformats/multiaddr

Can it be realized from technical point of view?

It can, and it's a perfect feature for an external contribution if you want to work on it ;)

@CoreyLin
Copy link
Author

CoreyLin commented Mar 17, 2019

@hsanjuan Thanks very much for your help. I didn't get the multiaddr concept before.

IPFS cluster is a great project. 👍

@ghost ghost removed the status/ready Ready to be worked label Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants