Open jeffmccune opened 1 year ago
Searching through slack, it was suggested checking the user account limits, but those look OK:
Could you post your kubernetes helm config and which version of helm charts did you use?
Thanks for taking a look @wallyqs looks like the nats-0.19.13 chart.
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
nats holos-dev 3 2023-04-28 11:42:51.391311593 -0700 PDT deployed nats-0.19.13 2.9.16
Note, I'm fairly ignorant about the NACK jetstream controller at the bottom, that was an experiment of mine that didn't pan out back in May.
My deployment script overlays the following resources into the rendered output using a kustomize post-renderer:
Here's the complete build script for the helm chart plus overlay which renders the yaml to apply to the cluster.
@wallyqs I unblocked myself by over-provisioning js-disk-storage from 128MiB to 256MiB. It feels like there's a bug in the limit calculations since the stream size is well within the 128 MiB limit but I'll leave that determination up to you of course.
The only other stream in this account is a kv CONFIG
bucket. The KV_CONFIG stream is 32 MiB max and the DOM_ELEMENTS stream is 16 MiB max, which I'd expect to fit in the 128MiB account limit but I might misunderstand how replication is accounted for or something else. It's notable 32x3+16x3 = 144 which may explain why a 256 MiB account limit works fine.
thanks for the info, I will validate on my end whether this is a bug or something we can improve but good to hear that you are unblocked.
I think I had the same issue.
I could not create more than a few (almost empty) streams before receiving err_code 10047 (or 10028 for memory streams).
I had to set jetstream max file to 100G instead of 10G in order to create my streams, even though my steams were less than 5Mo.
Hope this will help others to not lose the 3h I lost😭😅. And thanks @jeffmccune for your detailed report which saved my night 🙏🦄
{ "server_id": "NAFKEFDYMDCFWY5ZUKMAQEQ6XQ4XFHCFYZ6DOKXBRKYUPFNQD2SFJV7S", "server_name": "ayon_nats", "version": "2.10.17", "proto": 1, "git_commit": "b91de03", "go": "go1.22.4", "host": "0.0.0.0", "port": 4221, "max_connections": 100, "max_subscriptions": 1000, "ping_interval": 60000000000, "ping_max": 3, "http_host": "0.0.0.0", "http_port": 8221, "http_base_path": "/", "https_port": 0, "auth_timeout": 2, "max_control_line": 2048, "max_payload": 65536, "max_pending": 10000000, "cluster": { }, "gateway": { }, "leaf": { }, "mqtt": { }, "websocket": { }, "jetstream": { "config": { "max_memory": 1000000000, "max_storage": 100000000000, "store_dir": "/data/nats/jetstream", "sync_interval": 120000000000, "compress_ok": true }, "stats": { "memory": 0, "storage": 4022205, "reserved_memory": 0, "reserved_storage": 37580963840, "accounts": 1, "ha_assets": 0, "api": { "total": 52, "errors": 4 } } }, "tls_timeout": 2, "write_deadline": 3000000000, "start": "2024-07-27T20:11:22.2576767Z", "now": "2024-07-27T20:16:15.5566358Z", "uptime": "4m53s", "mem": 21278720, "cores": 6, "gomaxprocs": 6, "cpu": 0, "connections": 2, "total_connections": 7, "routes": 0, "remotes": 0, "leafnodes": 0, "in_msgs": 5556, "out_msgs": 5738, "in_bytes": 3454832, "out_bytes": 413704, "slow_consumers": 0, "subscriptions": 71, "http_req_stats": { "/": 1, "/varz": 1 }, "config_load_time": "2024-07-27T20:11:22.2576767Z", "system_account": "$SYS", "slow_consumer_stats": { "clients": 0, "routes": 0, "gateways": 0, "leafs": 0 } }
Defect
Make sure that these boxes are checked before submitting your issue -- thank you!
nats-server -DV
outputnats-server -DV output
``` [7] 2023/04/28 18:18:19.790095 [INF] Starting nats-server [7] 2023/04/28 18:18:19.790168 [INF] Version: 2.9.16 [7] 2023/04/28 18:18:19.790172 [INF] Git: [f84ca24] [7] 2023/04/28 18:18:19.790187 [INF] Cluster: nats [7] 2023/04/28 18:18:19.790190 [INF] Name: nats-0 [7] 2023/04/28 18:18:19.790194 [INF] Node: S1Nunr6R [7] 2023/04/28 18:18:19.790199 [INF] ID: NAVQ6FRDQ4DSFKGHYK4SPGOMT67P2SO522WWYAEYYUZRT2X3BEZO74Q2 [7] 2023/04/28 18:18:19.790225 [INF] Using configuration file: /etc/nats-config/nats.conf [7] 2023/04/28 18:18:19.790229 [INF] Trusted Operators [7] 2023/04/28 18:18:19.790233 [INF] System : "" [7] 2023/04/28 18:18:19.790248 [INF] Operator: "OpenInfrastructureServices" [7] 2023/04/28 18:18:19.790262 [INF] Issued : 2023-04-28 18:15:50 +0000 UTC [7] 2023/04/28 18:18:19.790274 [INF] Expires : Never [7] 2023/04/28 18:18:19.791561 [INF] Starting http monitor on 0.0.0.0:8222 [7] 2023/04/28 18:18:19.791696 [INF] Managing all jwt in exclusive directory /accounts/jwt [7] 2023/04/28 18:18:19.791751 [INF] Starting JetStream [7] 2023/04/28 18:18:19.793489 [INF] _ ___ _____ ___ _____ ___ ___ _ __ __ [7] 2023/04/28 18:18:19.793507 [INF] _ | | __|_ _/ __|_ _| _ \ __| /_\ | \/ | [7] 2023/04/28 18:18:19.793514 [INF] | || | _| | | \__ \ | | | / _| / _ \| |\/| | [7] 2023/04/28 18:18:19.793517 [INF] \__/|___| |_| |___/ |_| |_|_\___/_/ \_\_| |_| [7] 2023/04/28 18:18:19.793519 [INF] [7] 2023/04/28 18:18:19.793522 [INF] https://docs.nats.io/jetstream [7] 2023/04/28 18:18:19.793524 [INF] [7] 2023/04/28 18:18:19.793526 [INF] ---------------- JETSTREAM ---------------- [7] 2023/04/28 18:18:19.793538 [INF] Max Memory: 2.00 GB [7] 2023/04/28 18:18:19.793543 [INF] Max Storage: 10.00 GB [7] 2023/04/28 18:18:19.793546 [INF] Store Directory: "/data/jetstream" [7] 2023/04/28 18:18:19.793548 [INF] ------------------------------------------- [7] 2023/04/28 18:18:19.793998 [INF] Starting JetStream cluster [7] 2023/04/28 18:18:19.794025 [INF] Creating JetStream metadata controller [7] 2023/04/28 18:18:19.795194 [INF] JetStream cluster bootstrapping [7] 2023/04/28 18:18:19.795795 [INF] Listening for websocket clients on wss://0.0.0.0:443 [7] 2023/04/28 18:18:19.796210 [INF] Listening for leafnode connections on 0.0.0.0:7422 [7] 2023/04/28 18:18:19.796808 [INF] Listening for client connections on 0.0.0.0:4222 [7] 2023/04/28 18:18:19.796827 [INF] TLS required for client connections [7] 2023/04/28 18:18:19.797130 [INF] Server is ready [7] 2023/04/28 18:18:19.797188 [INF] Cluster name is nats [7] 2023/04/28 18:18:19.797273 [INF] Listening for route connections on 0.0.0.0:6222 [7] 2023/04/28 18:18:19.810518 [INF] 10.68.253.243:6222 - rid:6 - Route connection created [7] 2023/04/28 18:18:19.810647 [ERR] Error trying to connect to route (attempt 1): lookup for host "nats-2.nats.holos-dev.svc.cluster.local": lookup nats-2.nats.holos-dev.svc.cluster.local on 10.64.64.10:53: no such host [7] 2023/04/28 18:18:19.897629 [WRN] Waiting for routing to be established... [7] 2023/04/28 18:18:19.899732 [INF] JetStream cluster new metadata leader: nats-1/nats (Output truncated) ```Versions of
nats-server
and affected client libraries used:2.9.16
OS/Container environment:
Kubernetes kubeadm on top of proxmox ceph rdb storage.
Steps or code to reproduce the issue:
Expected result:
I first ran into this error with
--max-bytes=64MiB
. The account had Max Disk Storage of64 MB
and Max Mem Storage of64 MB
(note, not MiB) so I made only one change to--max-bytes=32MiB
and the stream created OK as follows:Stream MYSTREAM was created
```console Stream MYSTREAM was created Information for Stream MYSTREAM created 2023-06-29 10:59:11 Description: Redacted Subjects: holos.releases.*.elements.> Replicas: 3 Storage: File Options: Retention: Limits Acknowledgements: true Discard Policy: Old Duplicate Window: 15s Direct Get: true Allows Msg Delete: true Allows Purge: true Allows Rollups: false Limits: Maximum Messages: unlimited Maximum Per Subject: 1 Maximum Bytes: 32 MiB Maximum Age: 90d0h0m0s Maximum Message Size: 128 KiB Maximum Consumers: unlimited Cluster Information: Name: nats Leader: nats-2 Replica: nats-0, current, seen 0.00s ago Replica: nats-1, current, seen 0.00s ago State: Messages: 0 Bytes: 0 B FirstSeq: 0 LastSeq: 0 Active Consumers: 0 ```I then deleted this stream intending to re-create it with 120s duplicate message window.
Actual result:
After deleting the stream, I cannot re-create it using the command in "steps to reproduce" I always get the following error even when I put the original
--dupe-window=15s
back.Note, there's plenty of storage available and the ext4 file system is writable.