Ceramic daemon AbortController not defined or EAI_AGAIN

Hi, I’m trying to run a local node with ceramic daemon but I’m having some problems.

When using

Ubuntu v20.04.5 (WSL2 on windows11)
node v14.18.1
npm v6.14.15
Python v3.8.10
sqlite v3.31.1

and running npm install --location=global @ceramicnetwork/cli I get some not supported errors during the installation.

npm WARN notsup Unsupported engine for ipfs-unixfs@6.0.9: wanted: {"node":">=16.0.0","npm":">=7.0.0"} (current: {"node":"14.18.1","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: ipfs-unixfs@6.0.9
npm WARN notsup Unsupported engine for ipfs-unixfs-importer@9.0.10: wanted: {"node":">=16.0.0","npm":">=7.0.0"} (current: {"node":"14.18.1","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: ipfs-unixfs-importer@9.0.10
npm WARN notsup Unsupported engine for ipfs-unixfs-exporter@7.0.11: wanted: {"node":">=16.0.0","npm":">=7.0.0"} (current: {"node":"14.18.1","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: ipfs-unixfs-exporter@7.0.11
npm WARN notsup Unsupported engine for libp2p@0.35.8: wanted: {"node":">=15.0.0"} (current: {"node":"14.18.1","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: libp2p@0.35.8
npm WARN notsup Unsupported engine for libp2p-bootstrap@0.14.0: wanted: {"node":">=15.0.0"} (current: {"node":"14.18.1","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: libp2p-bootstrap@0.14.0
npm WARN notsup Unsupported engine for peer-id@0.16.0: wanted: {"node":">=15.0.0"} (current: {"node":"14.18.1","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: peer-id@0.16.0
npm WARN notsup Unsupported engine for libp2p-kad-dht@0.27.6: wanted: {"node":">=15.0.0"} (current: {"node":"14.18.1","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: libp2p-kad-dht@0.27.6
npm WARN notsup Unsupported engine for wherearewe@1.0.2: wanted: {"node":">=16.0.0","npm":">=7.0.0"} (current: {"node":"14.18.1","npm":"6.14.15"})
npm WARN notsup Not compatible with your version of node/npm: wherearewe@1.0.2
npm WARN @awaitjs/express@0.9.0 requires a peer of @types/express@4.x but none is installed. You must install peer dependencies yourself.
npm WARN @opentelemetry/core@1.2.0 requires a peer of @opentelemetry/api@>=1.0.0 <1.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN @opentelemetry/resources@1.2.0 requires a peer of @opentelemetry/api@>=1.0.0 <1.2.0 but none is installed. You must install peer dependencies yourself.

And when I try to ceramic daemon I get

Ceramic daemon failed to start up:
ReferenceError: AbortController is not defined
    at Client.fetch (/home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/node_modules/ipfs-utils/src/http.js:126:29)
    at Client.fetch (file:///home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/node_modules/ipfs-http-client/esm/src/lib/core.js:132:20)
    at Client.post (/home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/node_modules/ipfs-utils/src/http.js:176:17)
    at Object.id (file:///home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/node_modules/ipfs-http-client/esm/src/id.js:7:27)
    at Daemon.start (/home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/node_modules/ipfsd-ctl/src/ipfsd-daemon.js:268:31)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Object.go (file:///home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/node_modules/@ceramicnetwork/ipfs-daemon/lib/create-ipfs.js:65:25)
    at async Function.create (file:///home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/lib/ceramic-daemon.js:163:22)
    at async Function.createDaemon (file:///home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/lib/ceramic-cli-utils.js:125:24)
    at async Command.<anonymous> (file:///home/julianperassi/.nvm/versions/node/v14.18.1/lib/node_modules/@ceramicnetwork/cli/lib/bin/ceramic.js:28:5)

Then, if I change to node v16.17.0 (npm v8.15.0) (even if on your docs it says that we shall use node 14) the installation goes ok but then when I ceramic daemon I get:

[2022-09-06T16:00:49.951Z] IMPORTANT: Starting Ceramic Daemon at version 2.6.0 with config:
{
  "anchor": {},
  "http-api": {
    "cors-allowed-origins": [
      ".*"
    ]
  },
  "ipfs": {
    "mode": "bundled"
  },
  "logger": {
    "log-level": 2,
    "log-to-files": false
  },
  "metrics": {
    "metrics-exporter-enabled": false,
    "metrics-port": 9090
  },
  "network": {
    "name": "testnet-clay"
  },
  "node": {},
  "state-store": {
    "mode": "fs",
    "local-directory": "/home/julianperassi/.ceramic/statestore/"
  },
  "indexing": {
    "db": "sqlite:///home/julianperassi/.ceramic/indexing.sqlite",
    "allow-queries-before-historical-sync": true,
    "models": []
  }
}
[2022-09-06T16:00:50.008Z] IMPORTANT: Connecting to ceramic network 'testnet-clay' using pubsub topic '/ceramic/testnet-clay'

After some secs, first time it went:

[2022-09-06T16:01:36.891Z] WARNING: Can not connect to /dns4/go-ipfs-ceramic-public-clay-external.ceramic.network/tcp/4011/ws/p2p/QmSqeKpCYW89XrHHxtEQEWXmznp6o336jzwvdodbrGeLTk
[2022-09-06T16:01:36.892Z] WARNING: TimeoutError: connect QmSqeKpCYW89XrHHxtEQEWXmznp6o336jzwvdodbrGeLTk failure: failed to dial QmSqeKpCYW89XrHHxtEQEWXmznp6o336jzwvdodbrGeLTk:
  * [/ip4/10.0.2.96/tcp/4010] dial tcp4 0.0.0.0:4011->10.0.2.96:4010: i/o timeout
  * [/ip4/127.0.0.1/tcp/4010] dial tcp4 127.0.0.1:4010: connect: connection refused
  * [/ip4/13.59.67.203/tcp/35523] dial tcp4 0.0.0.0:4011->13.59.67.203:35523: i/o timeout
  * [/ip4/13.59.67.203/tcp/26022] dial tcp4 0.0.0.0:4011->13.59.67.203:26022: i/o timeout
  * [/ip4/127.0.0.1/tcp/4011/ws] malformed HTTP response "\x13/multistream/1.0.0"
  * [/ip4/3.20.3.153/tcp/4011/ws] failed to negotiate stream multiplexer: context deadline exceeded
  * [/ip4/18.216.128.30/tcp/4011/ws] failed to negotiate stream multiplexer: context deadline exceeded
  * [/ip4/10.0.2.96/tcp/4011/ws] dial tcp 10.0.2.96:4011: i/o timeout
[2022-09-06T16:02:46.916Z] WARNING: Can not connect to /dns4/go-ipfs-ceramic-private-clay-external.3boxlabs.com/tcp/4011/ws/p2p/QmQotCKxiMWt935TyCBFTN23jaivxwrZ3uD58wNxeg5npi
[2022-09-06T16:02:46.916Z] WARNING: TimeoutError: connect QmQotCKxiMWt935TyCBFTN23jaivxwrZ3uD58wNxeg5npi failure: context deadline exceeded
[2022-09-06T16:02:56.921Z] WARNING: Can not connect to /dns4/go-ipfs-ceramic-private-cas-clay-external.3boxlabs.com/tcp/4011/ws/p2p/QmbeBTzSccH8xYottaYeyVX8QsKyox1ExfRx7T1iBqRyCd
[2022-09-06T16:02:56.921Z] WARNING: HTTPError: connect QmbeBTzSccH8xYottaYeyVX8QsKyox1ExfRx7T1iBqRyCd failure: no good addresses

And after that it always went

Ceramic daemon failed to start up:
FetchError: request to https://cas-clay.3boxlabs.com/api/v0/service-info/supported_chains failed, reason: getaddrinfo EAI_AGAIN cas-clay.3boxlabs.com
    at ClientRequest.<anonymous> (/home/julianperassi/.nvm/versions/node/v16.17.0/lib/node_modules/@ceramicnetwork/cli/node_modules/node-fetch/lib/index.js:1491:11)
    at ClientRequest.emit (node:events:513:28)
    at ClientRequest.emit (node:domain:489:12)
    at TLSSocket.socketErrorListener (node:_http_client:481:9)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'EAI_AGAIN',
  code: 'EAI_AGAIN'
}

Should I try to fix it using node v14 (how?) or that’s old and I can use node v16 (and how can I fix this EAI_AGAIN?)

Thank you:)

Hi @julianPerassi, seems like this might have been a transient issue. Can you please try now?

Using node v14 still got the AbortController is not defined

Using v16:
First time I got

[2022-09-06T16:52:57.893Z] WARNING: Can not connect to /dns4/go-ipfs-ceramic-private-cas-clay-external.3boxlabs.com/tcp/4011/ws/p2p/QmbeBTzSccH8xYottaYeyVX8QsKyox1ExfRx7T1iBqRyCd
[2022-09-06T16:52:57.894Z] WARNING: HTTPError: connect QmbeBTzSccH8xYottaYeyVX8QsKyox1ExfRx7T1iBqRyCd failure: no good addresses

then

[2022-09-06T16:54:56.122Z] IMPORTANT: Connected to anchor service 'https://cas-clay.3boxlabs.com' with supported anchor chains ['eip155:100']
[2022-09-06T16:55:58.249Z] IMPORTANT: Closing Ceramic instance
[2022-09-06T16:55:58.280Z] IMPORTANT: Ceramic instance closed successfully
Ceramic daemon failed to start up:
Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.0)
    at Logger.makeError (/home/julianperassi/.nvm/versions/node/v16.17.0/lib/node_modules/@ceramicnetwork/cli/node_modules/@ethersproject/logger/lib/index.js:238:21)
    at Logger.throwError (/home/julianperassi/.nvm/versions/node/v16.17.0/lib/node_modules/@ceramicnetwork/cli/node_modules/@ethersproject/logger/lib/index.js:247:20)
    at JsonRpcProvider.<anonymous> (/home/julianperassi/.nvm/versions/node/v16.17.0/lib/node_modules/@ceramicnetwork/cli/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:609:54)
    at step (/home/julianperassi/.nvm/versions/node/v16.17.0/lib/node_modules/@ceramicnetwork/cli/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
    at Object.throw (/home/julianperassi/.nvm/versions/node/v16.17.0/lib/node_modules/@ceramicnetwork/cli/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
    at rejected (/home/julianperassi/.nvm/versions/node/v16.17.0/lib/node_modules/@ceramicnetwork/cli/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  reason: 'could not detect network',
  code: 'NETWORK_ERROR',
  event: 'noNetwork'
}

and then

[2022-09-06T17:12:25.896Z] WARNING: Can not connect to /dns4/go-ipfs-ceramic-private-clay-external.3boxlabs.com/tcp/4011/ws/p2p/QmQotCKxiMWt935TyCBFTN23jaivxwrZ3uD58wNxeg5npi
[2022-09-06T17:12:25.898Z] WARNING: HTTPError: connect QmQotCKxiMWt935TyCBFTN23jaivxwrZ3uD58wNxeg5npi failure: failed to dial QmQotCKxiMWt935TyCBFTN23jaivxwrZ3uD58wNxeg5npi:
  * [/ip4/127.0.0.1/tcp/4010] dial tcp4 127.0.0.1:4010: connect: connection refused
  * [/ip4/127.0.0.1/tcp/4011/ws] malformed HTTP response "\x13/multistream/1.0.0"
  * [/ip4/10.0.2.238/tcp/4010] dial tcp4 0.0.0.0:4011->10.0.2.238:4010: i/o timeout
  * [/ip4/10.0.2.238/tcp/4011/ws] dial tcp 10.0.2.238:4011: i/o timeout
  * [/ip4/13.58.48.26/tcp/4011/ws] read tcp 172.21.105.224:48730->13.58.48.26:4011: i/o timeout

OK, I see. Can you please add the --network testnet-clay to your CLI command and try again?

It needed several tries but it worked! Thanks you! :green_heart:

1 Like

Great!! :grin: And you’re welcome!