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

IPFS Node config initialised with 0 for all local address ports #617

Closed
olizilla opened this issue Mar 15, 2018 · 18 comments
Closed

IPFS Node config initialised with 0 for all local address ports #617

olizilla opened this issue Mar 15, 2018 · 18 comments
Assignees

Comments

@olizilla
Copy link
Member

  • Remove ~/.ipfs
  • Start IPFS Desktop
  • Confirm "Install IPFS"
  • Open IPFS node config
  "Addresses": {
    "API": "/ip4/127.0.0.1/tcp/0",
    "Announce": null,
    "Gateway": "/ip4/127.0.0.1/tcp/0",
    "NoAnnounce": null,
    "Swarm": [
      "/ip4/127.0.0.1/tcp/0"
    ]
  },

The ports are all set to 0 which is weird, and it means that I can't connect to the desktop ipfs api from ipfs-companion

@hacdias
Copy link
Member

hacdias commented Mar 15, 2018

@dryajov are these the default values for node.init on js-ipfsd-ctl?

@dryajov
Copy link
Member

dryajov commented Mar 15, 2018

Yes they are. SInce once of the most frequent use cases of ipfsd-ctl is tests and the ability to run several daemons in parallel we defaulted to that.

@hacdias
Copy link
Member

hacdias commented Mar 15, 2018

Thanks @dryajov 😄

@olizilla so I just need to change them to the other "defaults". Should I use these (from go-ipfs defaults)?

Swarm listening on /ip4/10.0.75.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/169.254.117.219/tcp/4001
Swarm listening on /ip4/169.254.186.78/tcp/4001
Swarm listening on /ip4/172.20.206.33/tcp/4001
Swarm listening on /ip4/192.168.1.8/tcp/4001
Swarm listening on /ip4/192.168.133.1/tcp/4001
Swarm listening on /ip4/192.168.253.1/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit/ipfs/QmXhZ1nkKXTerQzKzhL4GVs53Ng11euGtoiGrDi2EqaSsB
Swarm announcing /ip4/10.0.75.1/tcp/4001
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/169.254.117.219/tcp/4001
Swarm announcing /ip4/169.254.186.78/tcp/4001
Swarm announcing /ip4/172.20.206.33/tcp/4001
Swarm announcing /ip4/192.168.1.8/tcp/4001
Swarm announcing /ip4/192.168.133.1/tcp/4001
Swarm announcing /ip4/192.168.253.1/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080

@olizilla
Copy link
Member Author

@dryajov Is there a way to use ipfsd and have it initialised with the same defaults that you'd get if you installed go-ipfs manually, without having to copy/paste the defaults across... seems like it'll just keep getting out of sync.

@dryajov
Copy link
Member

dryajov commented Mar 15, 2018

We used to have that with non-disposable nodes (https://github.com/ipfs/js-ipfsd-ctl/blob/151303ce495b456188d2201421706358afcd5b5d/src/factory-daemon.js#L108), but it was removed at some point.

On the other hand, those values should not be changed frequently if at all by either go or js ipfs, setting them up once in ipfs-desctop should be OK - IMO.

@olizilla
Copy link
Member Author

We can init them manually for now. I'd guess that new sections get added from time to time, and it'd be nice to have a way to ask ipfsd-ctl to init with defaults, so I'll raise an issue there.

@dryajov
Copy link
Member

dryajov commented Mar 15, 2018

Thanks @olizilla!

@CPCer
Copy link

CPCer commented Mar 16, 2018

@hacdias Hello, I wonder if i can open certain file in IPFS through http://127.0.0.1:8080/ or http://127.0.0.1:5001/ or so in your reply.
It seems not working at all, and i cannot find any setting on the port...

@olizilla
Copy link
Member Author

HI @CPCer, we need more information to be able to help you. Are you having an issue with IPFS Desktop? Are you running it from source, or are you running official 0.3 release. If you'd like help getting set up, then irc.freenode.net#ipfs would work better for that conversation, as this your problem may not be the same as the topic in this GitHub issue.

@olizilla
Copy link
Member Author

@hacdias yes, I'd go ahead and initialise them from the go-ipfs defaults for now. If you have time to figure out a PR for adding a flag to let ipfsd-ctl do it for us, then that'd be rad too.

I'd go ahead and duplicate them in desktop first though as it's a blocker for us right now.

@hacdias
Copy link
Member

hacdias commented Mar 18, 2018

@olizilla just in terms of ports or everything?

{
  "Datastore": {
    "StorageMax": "10GB",
    "StorageGCWatermark": 90,
    "GCPeriod": "1h",
    "Spec": {
      "mounts": [
        {
          "child": {
            "path": "blocks",
            "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
            "sync": true,
            "type": "flatfs"
          },
          "mountpoint": "/blocks",
          "prefix": "flatfs.datastore",
          "type": "measure"
        },
        {
          "child": {
            "compression": "none",
            "path": "datastore",
            "type": "levelds"
          },
          "mountpoint": "/",
          "prefix": "leveldb.datastore",
          "type": "measure"
        }
      ],
      "type": "mount"
    },
    "HashOnRead": false,
    "BloomFilterSize": 0
  },
  "Addresses": {
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4001",
      "/ip6/::/tcp/4001"
    ],
    "Announce": [],
    "NoAnnounce": [],
    "API": "/ip4/127.0.0.1/tcp/5001",
    "Gateway": "/ip4/127.0.0.1/tcp/8080"
  },
  "Mounts": {
    "IPFS": "/ipfs",
    "IPNS": "/ipns",
    "FuseAllowOther": false
  },
  "Discovery": {
    "MDNS": {
      "Enabled": true,
      "Interval": 10
    }
  },
  "Ipns": {
    "RepublishPeriod": "",
    "RecordLifetime": "",
    "ResolveCacheSize": 128
  },
  "Bootstrap": [
    "/dnsaddr/bootstrap.libp2p.io/ipfs/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
    "/dnsaddr/bootstrap.libp2p.io/ipfs/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
    "/dnsaddr/bootstrap.libp2p.io/ipfs/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
    "/dnsaddr/bootstrap.libp2p.io/ipfs/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
    "/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ",
    "/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
    "/ip4/128.199.219.111/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu",
    "/ip4/104.236.76.40/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64",
    "/ip4/178.62.158.247/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd",
    "/ip6/2604:a880:1:20::203:d001/tcp/4001/ipfs/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM",
    "/ip6/2400:6180:0:d0::151:6001/tcp/4001/ipfs/QmSoLSafTMBsPKadTEgaXctDQVcqN88CNLHXMkTNwMKPnu",
    "/ip6/2604:a880:800:10::4a:5001/tcp/4001/ipfs/QmSoLV4Bbm51jM9C4gDYZQ9Cy3U6aXMJDAbzgu2fzaDs64",
    "/ip6/2a03:b0c0:0:1010::23:1001/tcp/4001/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd"
  ],
  "Gateway": {
    "HTTPHeaders": {
      "Access-Control-Allow-Headers": [
        "X-Requested-With",
        "Range"
      ],
      "Access-Control-Allow-Methods": [
        "GET"
      ],
      "Access-Control-Allow-Origin": [
        "*"
      ]
    },
    "RootRedirect": "",
    "Writable": false,
    "PathPrefixes": []
  },
  "API": {
    "HTTPHeaders": null
  },
  "Swarm": {
    "AddrFilters": null,
    "DisableBandwidthMetrics": false,
    "DisableNatPortMap": false,
    "DisableRelay": false,
    "EnableRelayHop": false,
    "ConnMgr": {
      "Type": "basic",
      "LowWater": 600,
      "HighWater": 900,
      "GracePeriod": "20s"
    }
  },
  "Reprovider": {
    "Interval": "12h",
    "Strategy": "all"
  },
  "Experimental": {
    "FilestoreEnabled": false,
    "ShardingEnabled": false,
    "Libp2pStreamMounting": false
  }
}

@dryajov
Copy link
Member

dryajov commented Mar 18, 2018

@olizilla fyi - I'm working on the flag thingy.

@hacdias
Copy link
Member

hacdias commented Mar 20, 2018

It's being worked on. For what I see it seems to be almost complete.

Ref.: ipfs/js-ipfsd-ctl#220

@dryajov
Copy link
Member

dryajov commented Apr 3, 2018

@hacdias this has been fixed in ipfsd-ctl

@hacdias
Copy link
Member

hacdias commented Apr 5, 2018

@dryajov could you release a new version with those changes? 😄

@dryajov
Copy link
Member

dryajov commented Apr 5, 2018

@dryajov could you release a new version with those changes? 😄

ping @diasdavid

@hacdias
Copy link
Member

hacdias commented Apr 6, 2018

Closed with a06b204. Thanks!

@hacdias hacdias closed this as completed Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants