nats update stream replicas - no suitable peers for placement

146 views Asked by At

When using the nats cli tool to increase a stream's replica count, we get this error.

Command: nats stream edit --replicas=2 (then select a stream)

Response: nats: error: could not edit Stream stream-for-testing: no suitable peers for placement, miscellaneous issue (10005)

I can't figure out why. The cluster has 3 nodes with plenty of disk space and the stream isn't large.

This is the stream info

➜ ~ % nats stream info             
[prod] ? Select a Stream stream-for-testing
Information for Stream stream-for-testing created 2022-10-13 15:07:55

              Subjects: stream-for-testing.*
              Replicas: 1
               Storage: File

Options:

             Retention: Limits
       Acknowledgments: true
        Discard Policy: Old
      Duplicate Window: 2m0s
     Allows Msg Delete: true
          Allows Purge: true
        Allows Rollups: false

Limits:

      Maximum Messages: 10,000
   Maximum Per Subject: unlimited
         Maximum Bytes: unlimited
           Maximum Age: unlimited
  Maximum Message Size: unlimited
     Maximum Consumers: unlimited

Cluster Information:

                  Name: nats
                Leader: nats-jetstream-0

State:

              Messages: 10,000
                 Bytes: 1.6 MiB
        First Sequence: 36,538 @ 2023-06-24 08:50:01 UTC
         Last Sequence: 46,537 @ 2023-09-03 14:00:01 UTC
      Active Consumers: 1
    Number of Subjects: 1

This is the server info for one of the nodes (the output is similar for the other 2 nodes)

➜ ~ % nats server info nats-jetstream-0
Server information for nats-jetstream-0 (NC2X7YGONEKCPPCIBUDJ5MXMLZKBXH6KNU6P6SJWT4RNJHOSD4LMC6LR)

Process Details:

            Version: 2.9.16
         Git Commit: f84ca24
         Go Version: go1.19.8
         Start Time: 2023-12-12 15:38:31
   Config Load Time: 2023-12-12 15:38:31
             Uptime: 1h6m2s

Connection Details:

      Auth Required: true
       TLS Required: false
               Host: 0.0.0.0:4222

JetStream:

             Domain: 
  Storage Directory: /data/jetstream
         Max Memory: 1.0 GiB
           Max File: 30 GiB
    Active Accounts: 1
      Memory In Use: 0 B
        File In Use: 870 MiB
       API Requests: 228
         API Errors: 0

Limits:

           Max Conn: 65,536
           Max Subs: 0
        Max Payload: 1.0 MiB
        TLS Timeout: 2.00s
     Write Deadline: 10.00s

Statistics:

          CPU Cores: 2 0.00%
             Memory: 28 MiB
        Connections: 0
      Subscriptions: 939
           Messages: 81,577 in 81,455 out
              Bytes: 5.9 MiB in 9.6 MiB out
     Slow Consumers: 0

Cluster:

               Name: nats
               Host: 0.0.0.0:6222
               URLs: nats-jetstream-0.[redacted]:6222
                     nats-jetstream-1.[redacted]:6222
                     nats-jetstream-2.[redacted]:6222
0

There are 0 answers