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

docker ipfs auto stoped but dont know why,how can i get the detail logs? #6557

Closed
godcong opened this issue Aug 6, 2019 · 4 comments
Closed
Labels
kind/support A question or request for support

Comments

@godcong
Copy link
Contributor

godcong commented Aug 6, 2019

This ipfs has been running for a long time with aws s3.
but recently, it always auto stoped.

docker log docker ipfs logs:

Changing user to ipfs
ipfs version 0.4.21
Found IPFS fs-repo at /data/ipfs
Initializing daemon...
go-ipfs version: 0.4.21-
Repo version: 7
System version: amd64/linux
Golang version: go1.12.6
04:59:04.751 ERROR    p2pnode: mdns error:  could not determine host IP addresses for ip-172-26-10-24. discovery.go:46
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/172.17.0.1/tcp/4001
Swarm listening on /ip4/172.22.252.148/tcp/4001
Swarm listening on /ip4/172.26.10.24/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /ip6/fcec:5208:3dc:93cf:4123::1/tcp/4001
Swarm listening on /ip6/fdab:fd31:bd47:af39:be99:93dc:93cf:4123/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/13.124.30.27/tcp/4001
Swarm announcing /ip4/172.17.0.1/tcp/4001
Swarm announcing /ip4/172.22.252.148/tcp/4001
Swarm announcing /ip4/172.26.10.24/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
Swarm announcing /ip6/fcec:5208:3dc:93cf:4123::1/tcp/4001
Swarm announcing /ip6/fdab:fd31:bd47:af39:be99:93dc:93cf:4123/tcp/4001
API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
Daemon is ready

and the config

root@ip-172-26-10-24:/home/ubuntu/service# ipfs config show
{
  "API": {
    "HTTPHeaders": {}
  },
  "Addresses": {
    "API": "/ip4/0.0.0.0/tcp/5001",
    "Announce": [],
    "Gateway": "/ip4/0.0.0.0/tcp/8080",
    "NoAnnounce": [],
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4001",
      "/ip6/::/tcp/4001"
    ]
  },
  "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"
  ],
  "Datastore": {
    "BloomFilterSize": 0,
    "GCPeriod": "1h",
    "HashOnRead": false,
    "Spec": {
      "mounts": [
        {
          "child": {
            "accessKey": "------------------------",
            "bucket": "ipfstest",
            "path": "blocks",
            "region": "ap-northeast-2",
            "rootDirectory": "/ipfsdata",
            "secretKey": "------------------------------------",
            "type": "s3ds"
          },
          "mountpoint": "/blocks",
          "prefix": "s3ds.datastore",
          "type": "measure"
        },
        {
          "child": {
            "compression": "none",
            "path": "datastore",
            "type": "levelds"
          },
          "mountpoint": "/",
          "prefix": "leveldb.datastore",
          "type": "measure"
        }
      ],
      "type": "mount"
    },
    "StorageGCWatermark": 90,
    "StorageMax": "10000GB"
  },
  "Discovery": {
    "MDNS": {
      "Enabled": true,
      "Interval": 10
    }
  },
  "Experimental": {
    "FilestoreEnabled": false,
    "Libp2pStreamMounting": false,
    "P2pHttpProxy": false,
    "PreferTLS": false,
    "QUIC": true,
    "ShardingEnabled": false,
    "UrlstoreEnabled": false
  },
  "Gateway": {
    "APICommands": [],
    "HTTPHeaders": {
      "Access-Control-Allow-Headers": [
        "X-Requested-With",
        "Range",
        "User-Agent"
      ],
      "Access-Control-Allow-Methods": [
        "GET",
      ],
      "Access-Control-Allow-Origin": [
        "*"
      ]
    },
    "NoFetch": false,
    "PathPrefixes": [],
    "RootRedirect": "",
    "Writable": false
  },
  "Identity": {
    "PeerID": "QmRnCapPN73gDHRhnmKD8VbFjsqdF6Y5adzihwbjULaTcx"
  },
  "Ipns": {
    "RecordLifetime": "",
    "RepublishPeriod": "",
    "ResolveCacheSize": 128
  },
  "Mounts": {
    "FuseAllowOther": false,
    "IPFS": "/ipfs",
    "IPNS": "/ipns"
  },
  "Pubsub": {
    "DisableSigning": false,
    "Router": "",
    "StrictSignatureVerification": false
  },
  "Reprovider": {
    "Interval": "12h",
    "Strategy": "all"
  },
  "Routing": {
    "Type": "dht"
  },
  "Swarm": {
    "AddrFilters": null,
    "ConnMgr": {
      "GracePeriod": "20s",
      "HighWater": 900,
      "LowWater": 600,
      "Type": "basic"
    },
    "DisableBandwidthMetrics": false,
    "DisableNatPortMap": false,
    "DisableRelay": false,
    "EnableAutoNATService": true,
    "EnableAutoRelay": true,
    "EnableRelayHop": true
  }
}

i don't know why it stoped.
can i get some more detailed error log.
the aws s3 now has 300G+ files and 310W+ fragment files.

@godcong godcong added the kind/support A question or request for support label Aug 6, 2019
@godcong godcong changed the title docker ipfs exit with unknown how can i get the detail logs? docker ipfs auto stoped but dont know why,how can i get the detail logs? Aug 6, 2019
@godcong
Copy link
Contributor Author

godcong commented Aug 6, 2019


i build the v0.4.22-rc1 with s3 plugin.
it has same question.
before stop, i'm pinning something with a go shell.


It will also eixt if you do nothing.


in ssh run ipfs swarm peers | grep -c "" see the result count was over 10000+(+200/s).


@Stebalien
Copy link
Member

It's probably running out of memory. Your issue is:

"DisableRelay": false,
"EnableAutoNATService": true,
"EnableAutoRelay": true,
"EnableRelayHop": true

You're running as a public relay and telling the entire network to use you as a relay.

Additionally, your connection limit is set to 900. That means you're repeatedly disconnecting, reconnecting, disconnecting, etc. which is probably trashing your CPU.


I'd:

  1. Disable EnableRelayHop and EnableAutoRelay.
  2. Change your peer ID (generate a new identity). Unfortunately, it looks like there are some nodes on the network that aren't forgetting advertisements so your current peer ID may be marked as a public relay for quite a while.

@godcong
Copy link
Contributor Author

godcong commented Aug 7, 2019

thanks.
i changed the ID , and Disabled EnableRelayHop and EnableAutoRelay.
that's be ok.

ps:
if used EnableRelayHop and EnableAutoRelay,
does it need a limit to connection for stable running?
I want to see if I can optimize it.

@Stebalien
Copy link
Member

if used EnableRelayHop and EnableAutoRelay,
does it need a limit to connection for stable running?

It's mostly a protocol issue. Nodes don't ask relays before they start advertising that they should be contacted via that relay. There was some discussion in libp2p/go-libp2p-circuit#67 but that didn't go anywhere.

For now, relays can only reasonably run on very large machines.

Note: setting lower connection limits will make this worse as peers will repeatedly try to reconnect to the relay.

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