Cannot create composite from compose db. EAI_AGAIN ipfs not found

Hi,
Cannot create composite from compose db. Getting error saying EAI_AGAIN ipfs not found. I can confirm that ipfs is running. I am trying to deploy on mainnet node

Creating the composite...Error: HTTP request to 'http://localhost:7007/api/v0/streams' failed with status 'Internal Server Error': {"error":"request to http://ipfs:5001/api/v0/dag/put?store-codec=dag-jose&input-codec=dag-jose&hash=sha2-256 failed, reason: getaddrinfo EAI_AGAIN ipfs"}

using docker image config

see this in daemon logs :

ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:06:13.268Z] IMPORTANT: Connecting to IPFS node available as /ip4/127.0.0.1/tcp/4001/p2p/QmVZa1Xxm7Xu5gAEq12gLCLAK1PS8V78nyLi3W5PDXS577, /ip4/127.0.0.1/tcp/8081/ws/p2p/QmVZa1Xxm7Xu5gAEq12gLCLAK1PS8V78nyLi3W5PDXS577, /ip4/167.99.152.53/tcp/4001/p2p/QmVZa1Xxm7Xu5gAEq12gLCLAK1PS8V78nyLi3W5PDXS577, /ip4/172.23.0.3/tcp/4001/p2p/QmVZa1Xxm7Xu5gAEq12gLCLAK1PS8V78nyLi3W5PDXS577, /ip4/172.23.0.3/tcp/8081/ws/p2p/QmVZa1Xxm7Xu5gAEq12gLCLAK1PS8V78nyLi3W5PDXS577
ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:06:13.331Z] IMPORTANT: Initializing PostgreSQL connection
ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:06:13.376Z] IMPORTANT: Connecting to ceramic network 'mainnet' using pubsub topic '/ceramic/mainnet'
ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:06:17.392Z] IMPORTANT: Connected to anchor service 'https://cas.3boxlabs.com' with supported anchor chains ['eip155:1']
ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:06:17.505Z] WARNING: No pinned streams detected. This is expected if this is the first time this node has been run, but may indicate a problem with the node's persistence setup if it should have pinned streams
ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:06:17.609Z] IMPORTANT: Ceramic API running on 0.0.0.0:7007'
ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:07:33.153Z] WARNING: Did not receive any pubsub messages in more than 60000ms. IPFS did not provide any messages, please check your IPFS configuration and ensure your node is well connected to the rest of the Ceramic network.
ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:07:38.713Z] WARNING: Did not receive any pubsub messages in more than 60000ms. IPFS did not provide any internal messages, please check your IPFS configuration.
ceramic-ipfs-docker-ceramic-1  | [2023-03-02T13:07:46.752Z] ERROR: TimeoutError: Request timed out

ipfs healthceck getting suceeded

daemon config

{
  "anchor": {
    "ethereum-rpc-url": "https://eth-mainnet.g.alchemy.com/v2/gRV8E8H-ok8nzUOAdR4YY_bCM5BCoqy5"
  },
  "http-api": {
    "cors-allowed-origins": [
      "https://dev.spect.network",
      "https://circles.spect.network"
    ],
    "admin-dids": ["did:key:z6MkvhxsgXoVNa69zEGMMZtam2YAYJsyzzETe4wJdb69hMV9"]
  },
  "ipfs": {
    "mode": "remote",
    "host": "http://ipfs:5001"
  },
  "logger": {
    "log-level": 2,
    "log-to-files": false
  },
  "metrics": {
    "metrics-exporter-enabled": false,
    "metrics-port": 9090
  },
  "network": {
    "name": "mainnet"
  },
  "node": {},
  "state-store": {
    "mode": "fs",
    "local-directory": "/root/.ceramic/statestore/"
  },
  "indexing": {
    "db": "postgres://postgres:password@db:5432",
    "allow-queries-before-historical-sync": true,
    "models": []
  }
}

docker image

version: "3.3"
services:
  ipfs:
    image: ceramicnetwork/go-ipfs-daemon:latest
    ports:
      - "5001:5001"
      - "8011:8011"
    volumes:
      - ./ipfs:/data/ipfs

  db:
    image: postgres:latest
    restart: always
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
    ports:
      - "5432:5432"
    volumes:
      - db:/var/lib/postgresql/data

  ceramic:
    image: ceramicnetwork/js-ceramic:latest
    ports:
      - "7007:7007"
    volumes:
      - ./ceramic:/root/.ceramic
    depends_on:
      - ipfs
      - db
    environment:
      - NODE_ENV=production
      - CERAMIC_ENABLE_EXPERIMENTAL_COMPOSE_DB=true

volumes:
  ipfs:
  ceramic:
  db:

Hey @avp14. Are you still experiencing these issues?
To confirm that this is something related to connecting to the mainnet node, can you successfully run everything on clay-testnet?

The URL in your config file for ipfs is http://ipfs:5001.

Is “ipfs” a valid DNS name in your setup? If not, you probably want to change that to a valid URL for reaching your ipfs node, using an IP address or valid DNS name for the node. For instance if IPFS is running on the same machine as ceramic, it would be http://127.0.0.1:5001 or http://localhost:5001

Yes it is valid. I am using a docker compose setup, and I can verify that it is correct because if I change the url to “localhost” or anything else it gives a ECONN_REFUSED error. In the daemon logs you can see that it did connect to the IPFS node.
And to answer @Justina This same docker file worked for testnet node, I was able to create composite successfully.

getaddrinfo EAI_AGAIN is definitely a DNS timeout error, so there’s definitely some error on your machine being able to resolve ipfs to a valid DNS name.