# Error while running kafka topic produce

**URL:** <https://forum.confluent.io/t/error-while-running-kafka-topic-produce/10890>\
**Category:** Confluent Cloud\
**Created:** [13 June 2024 08:23 UTC](https://forum.confluent.io/t/error-while-running-kafka-topic-produce/10890 "2024-06-13T08:23:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anjum](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@anjum](https://forum.confluent.io/u/anjum)\
**Post date:** [13 June 2024 08:23 UTC](https://forum.confluent.io/t/error-while-running-kafka-topic-produce/10890/1 "2024-06-13T08:23:58Z")

</div>

Hi,  
I am following this page to explore kafka.  
[Confluent CLI Overview | Confluent Documentation](https://docs.confluent.io/confluent-cli/current/overview.html)

I was able to create cluster and topic. Now I want to get something into the topic named “orders”. When I give the following command on CLI I get the next error

> confluent kafka topic produce orders --api-key XXXXXXXXXXXXXX --api-secret /ahjkbskskjbgskkskjhksjhkjhsjkhskh

Error: failed to create producer: failed to get configuration map: decryptbytes: procdecryptdata: The parameter is incorrect.

api-key and api-secret are correctly defined.

Can anyone please advise.

---

<div class="post-metadata">

**Author:** ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)\
**Post date:** [17 June 2024 19:21 UTC](https://forum.confluent.io/t/error-while-running-kafka-topic-produce/10890/2 "2024-06-17T19:21:15Z")

</div>

Are you on Windows? What version of the CLI do you have? It looks like you’re running into [this](https://github.com/confluentinc/cli/issues/2412) bug.

---

<div class="post-metadata">

**Author:** ![dgonzalezc](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dgonzalezc/32/5097_2.png) [@dgonzalezc](https://forum.confluent.io/u/dgonzalezc)\
**Post date:** [30 May 2025 15:23 UTC](https://forum.confluent.io/t/error-while-running-kafka-topic-produce/10890/3 "2025-05-30T15:23:09Z")

</div>

Still the same error over here in Confluent-CLI version 3.58.0:

```auto
Version: v3.58.0
Git Ref: c24331730
Build Date: 2024-04-19T04:09:58Z
Go Version: go1.21.7 X:boringcrypto (windows/amd64)
Development: false

```

i’m following this tutorial [Tutorial: Use Confluent CLI with Confluent Cloud | Confluent Documentation](https://docs.confluent.io/confluent-cli/current/beginner-cloud.html#produce-and-consume-records-with-confluent-cli) over cmder on windows 11

1.- Run the following command to create a new Kafka topic `demo-topic-1` **OK**

```auto
λ confluent kafka topic create demo-topic-1 --environment XXXXX --cluster XXXXXXXX
Created topic "demo-topic-1".

```

2.- Start producing to this topic `demo-topic-1` by running the following command **NOK**

```auto
λ confluent kafka topic produce demo-topic-1 --api-key XXXXXXXX --api-secret XXXXXXXXFlXMgkX --XXXXXXXX --cluster XXXXXXXX
Error: failed to create producer: failed to get configuration map: decryptbytes: procdecryptdata: The parameter is incorrect.

```

Maybe the issue [decryptbytes: procdecryptdata: The parameter is incorrect when consuming using api keys in the command · Issue #2412 · confluentinc/cli · GitHub](https://github.com/confluentinc/cli/issues/2412) is not resolved yet?

Regards

---

<div class="post-metadata">

**Author:** ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)\
**Post date:** [30 May 2025 18:47 UTC](https://forum.confluent.io/t/error-while-running-kafka-topic-produce/10890/4 "2025-05-30T18:47:39Z")

</div>

@dgonzalezc try upgrading to the latest version of the CLI. The fix went into version 4.13.2 ([release notes](https://docs.confluent.io/confluent-cli/current/release-notes.html#confluent-cli-v4-13-2-release-notes)).

---

<div class="post-metadata">

**Author:** ![dgonzalezc](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dgonzalezc/32/5097_2.png) [@dgonzalezc](https://forum.confluent.io/u/dgonzalezc)\
**Post date:** [30 May 2025 20:08 UTC](https://forum.confluent.io/t/error-while-running-kafka-topic-produce/10890/5 "2025-05-30T20:08:14Z")

</div>

thanks @dtroiano for your comments.

when trying to update only shows me 3.65.0 version:

```auto
λ confluent update
Checking for updates...
New version of confluent is available
Current Version: v3.58.0
Latest Version: v3.65.0

Do you want to download and install this update? (y/n): y
Downloading confluent version 3.65.0...
Done. Downloaded 60.82 MB in 6 seconds. (10.68 MB/s)

```

so i updated and trying again:

```auto
λ confluent update
Checking for updates...
The only available update is a major version update. Use `confluent update --major` to accept the update.

```

apparently version 4.13.2 is not available from command line but is available in [Release v4.27.1 · confluentinc/cli · GitHub](https://github.com/confluentinc/cli/releases/tag/v4.27.1) so when trying with the new version it works!!!

Produce example

```auto
λ confluent kafka topic produce demo-topic-1 --api-key XXXXXXXX --api-secret XXXXXXXX --environment XXXXXXXX --cluster XXXXXXXX
Starting Kafka Producer. Use Ctrl-C to exit.
%6|1748636209.116|GETSUBSCRIPTIONS|Confluent-CLI_v4.27.1#producer-1| [thrd:main]: Telemetry client instance id changed from AAAAAAAAAAAAAAAAAAAAAA to rKKb6VQsQnWhVz75gMn2bw
{"value": {"type": "JSON", "data": "Hello World!"}}
{"value": {"type": "JSON", "data": "Hello World!"}}
{"value": {"type": "JSON", "data": "Hello World!"}}
{"value": {"type": "JSON", "data": "Hello World!"}}
{"value": {"type": "JSON", "data": "Hello World!"}}
{"value": {"type": "JSON", "data": "Hello World!"}}

```

Consume Example

```auto
λ confluent kafka topic consume demo-topic-1 --api-key XXXXXXXX --api-secret XXXXXXXX --environment XXXXXXXX --cluster XXXXXXXX
%6|1748636703.248|GETSUBSCRIPTIONS|Confluent-CLI_v4.27.1#consumer-1| [thrd:main]: Telemetry client instance id changed from AAAAAAAAAAAAAAAAAAAAAA to Gbwz5TldRnCViKI86p4fsQ
Starting Kafka Consumer. Use Ctrl-C to exit.
"Hello World!"
"Hello World!"
"Hello World!"

```

Thanks for the help!!!

---

<div class="post-metadata">

**Author:** ![dtroiano](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/dtroiano/32/1961_2.png) [@dtroiano](https://forum.confluent.io/u/dtroiano)\
**Post date:** [30 May 2025 22:14 UTC](https://forum.confluent.io/t/error-while-running-kafka-topic-produce/10890/6 "2025-05-30T22:14:16Z")

</div>

Glad to hear it’s working!

The CLI update issue is a bit confusing. It only updates to the latest minor version by default and AFAIK there isn’t a way via CLI to update to a specific version. I believe if you had run `confluent update --major` it would have updated to the current latest v4.27.1 via CLI.
