Docker Install - Invalid Type Issue

Hello,
I am trying to run docker-compose up command and am getting the following error:

ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:
services.farmer.ports contains an invalid type, it should be an array

I am running
Docker Compose version v2.10.2
I have a Intel desktop with 16GB Ram and 512GB SSD.
I am running Ubuntu Jammy.

Thanks

version: "3.7"
services:
  node:
    # Replace `snapshot-DATE` with latest release (like `snapshot-2022-apr-29`)
    # For running on Aarch64 add `-aarch64` after `DATE`
    image: ghcr.io/subspace/node:snapshot-DATE
    volumes:
#Instead of specifying volume (which will store data in `/var/lib/docker`), you can
#alternatively specify path to the directory where files will be stored, just make
#sure everyone is allowed to write there
      - node-data:/var/subspace:rw
#- /path/to/subspace-node:/var/subspace:rw
    ports:
# If port 30333 is already occupied by another Substrate-based node, replace all
# occurrences of `30333` in this file with another value

Hey, maverick can you share screen of your docker-compose.yml file?

1 Like

I think this will help Docker-composer.yml: services.farmer.depends_on contains an invalid type, it should be an array - #12 by ImmaZoni

That is an incomplete file, make sure you copy the whole thing

version: "3.7"
services:
  node:
    # Replace `snapshot-DATE` with latest release (like `snapshot-2022-apr-29`)
    # For running on Aarch64 add `-aarch64` after `DATE`
    image: ghcr.io/subspace/node:snapshot-DATE
    volumes:
#Instead of specifying volume (which will store data in `/var/lib/docker`), you can
#alternatively specify path to the directory where files will be stored, just make
#sure everyone is allowed to write there
      - node-data:/var/subspace:rw
#- /path/to/subspace-node:/var/subspace:rw
    ports:
# If port 30333 is already occupied by another Substrate-based node, replace all
# occurrences of `30333` in this file with another value
      - "0.0.0.0:30333:30333"
    restart: unless-stopped
    command: [
      "--chain", "gemini-2a",
      "--base-path", "/var/subspace",
      "--execution", "wasm",
      "--state-pruning", "archive",
      "--port", "30333",
      "--rpc-cors", "all",
      "--rpc-methods", "safe",
      "--unsafe-ws-external",
      "--validator",
# Replace `INSERT_YOUR_ID` with your node ID (will be shown in telemetry)
      "--name", "Antrix"
    ]
    healthcheck:
      timeout: 5s
# If node setup takes longer then expected, you want to increase `interval` and `retries` number.
      interval: 30s
      retries: 5

  farmer:
    depends_on:
      node:
        condition: service_healthy
                                                                                                                              # Replace `snapshot-DATE` with latest release (like `snapshot-2022-apr-29`)
      #For running on Aarch64 add `-aarch64` after `DATE`
    image: ghcr.io/subspace/farmer:snapshot-DATE
    volumes:
#Instead of specifying volume (which will store data in `/var/lib/docker`), you can
#alternatively specify path to the directory where files will be stored, just make
#sure everyone is allowed to write there
      - farmer-data:/var/subspace:rw
# - /path/to/subspace-farmer:/var/subspace:rw
    ports:
# Un-comment following line to unlock farmer's RPC
#  - "127.0.0.1:9955:9955"
#If port 40333 is already occupied by something else, replace all
#occurrences of `40333` in this file with another value
       "0.0.0.0:40333:40333"
    restart: unless-stopped
    command: [
      "--base-path", "/var/subspace",
      "farm",
      "--node-rpc-url", "ws://node:9944",
      "--ws-server-listen-addr", "0.0.0.0:9955",
      "--listen-on", "/ip4/0.0.0.0/tcp/40333",
    #Replace `WALLET_ADDRESS` with your Polkadot.js wallet address
       "--reward-address", "st8D7BgUxXxvAptwQbwEvuftqBqm9Jg44QPZo6oZXQJyMSuCF",
       "--plot-size", "100G"
    ]
volumes:
  node-data:
  farmer-data:

I created the file just like as it is in the documentation only substituting the required value.

Thanks

You’re missing - , it should be - "0.0.0.0:40333:40333", looks like it was accidentally removed.

I checked official docs and it is correct there, where did you copy it from?

What value should use here?

image: Package farmer · GitHub
volumes:

Thanks

Never mind. I am pulling the one published on Sep 10.

So I think my node is up and running.

gem2@gem2:~/subspace$ gem2@gem2:~/subspace$ sudo docker-compose up -d
Pulling node (ghcr.io/subspace/node:gemini-2a-2022-sep-10)...
gemini-2a-2022-sep-10: Pulling from subspace/node
675920708c8b: Pull complete
c6a88d7a8d0b: Pull complete
53e5f3369f9f: Pull complete
f14a3f4af606: Pull complete
Digest: sha256:b59ac2fdfb17e2b5385797d3a1f02cafe398bdd20d0dba1dd90a7b5092db6adc
Status: Downloaded newer image for ghcr.io/subspace/node:gemini-2a-2022-sep-10
Pulling farmer (ghcr.io/subspace/farmer:gemini-2a-2022-sep-10)...
gemini-2a-2022-sep-10: Pulling from subspace/farmer
675920708c8b: Already exists
fc78d9394630: Pull complete
48981844875f: Pull complete
Digest: sha256:c2034b279150c507de110e3836a45cd30a74e5006ac233ad037da73ec88ad2fe
Status: Downloaded newer image for ghcr.io/subspace/farmer:gemini-2a-2022-sep-10
Creating subspace_node_1 ... done
Creating subspace_farmer_1 ... done

But I see this in the log.

node_1    | 2022-09-19 12:56:51 [PrimaryChain] Waiting for farmer to receive and acknowledge archived segment
node_1    | 2022-09-19 12:56:52 [PrimaryChain] ⚙️  Syncing  0.0 bps, target=#186574 (70 peers), best: #1 (0x5b02…32b6), finalized #0 (0x43d1…9101), ⬇ 90.3kiB/s ⬆ 3.0kiB/s
node_1    | 2022-09-19 12:56:56 [PrimaryChain] Waiting for farmer to receive and acknowledge archived segment
node_1    | 2022-09-19 12:56:57 [PrimaryChain] ⚙️  Syncing  0.0 bps, target=#186656 (71 peers), best: #1 (0x5b02…32b6), finalized #0 (0x43d1…9101), ⬇ 77.2kiB/s ⬆ 2.8kiB/s
node_1    | 2022-09-19 12:57:01 [PrimaryChain] Waiting for farmer to receive and acknowledge archived segment
node_1    | 2022-09-19 12:57:02 [PrimaryChain] ⚙️  Syncing  0.0 bps, target=#186590 (70 peers), best: #1 (0x5b02…32b6), finalized #0 (0x43d1…9101), ⬇ 137.1kiB/s ⬆ 2.2kiB/s
node_1    | 2022-09-19 12:57:06 [PrimaryChain] Waiting for farmer to receive and acknowledge archived segment
node_1    | 2022-09-19 12:57:07 [PrimaryChain] ⚙️  Syncing  0.0 bps, target=#186574 (67 peers), best: #1 (0x5b02…32b6), finalized #0 (0x43d1…9101), ⬇ 92.2kiB/s ⬆ 2.1kiB/s
node_1    | 2022-09-19 12:57:11 [PrimaryChain] Waiting for farmer to receive and acknowledge archived segment
node_1    | 2022-09-19 12:57:12 [PrimaryChain] ⚙️  Syncing  0.0 bps, target=#186590 (69 peers), best: #1 (0x5b02…32b6), finalized #0 (0x43d1…9101), ⬇ 113.3kiB/s ⬆ 4.0kiB/s

Is that correct. The port is open.

1 Like

Looks correct, congrats :tada:

Should I be worried about this warning?

farmer_1  | 2022-09-19T19:49:20.269701Z  WARN parity-db: Background worker error: IO Error: No space left on device (os error 28)
farmer_1  | 2022-09-19T19:49:20.269703Z  WARN parity-db: Background worker error: IO Error: No space left on device (os error 28)
farmer_1  | 2022-09-19T19:49:20.275198Z  WARN parity-db: Background worker error: IO Error: No space left on device (os error 28)

I am using 512GM SSD.

And I should see my node in Telemetry, right?

Thanks

Yes, you should. Do you have free disk space? Probably your disk is divided into several sections, and the section where the farmer’s data is stored is filled in. Check it out, as it’s important. Farmer simply has nowhere to save the data.

Try df -h to view disk space.

Here is where is shows that the total disk space:
size: 476GiB (512GB)
Got it by running lshw | less. But df shows this:
gem2@gem2:~$ gem2@gem2:~$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 1.5M 1.6G 1% /run
/dev/mapper/ubuntu–vg-ubuntu–lv 98G 94G 0 100% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda2 2.0G 127M 1.7G 7% /boot
tmpfs 1.6G 4.0K 1.6G 1% /run/user/1000

Where is the other 400? How do I get that?

I used the resize command and not it looks good.

2 Likes