# Error connecting to ksqldb in ecs w/ ksqldb-cli

**URL:** <https://forum.confluent.io/t/error-connecting-to-ksqldb-in-ecs-w-ksqldb-cli/6223>\
**Category:** ksqlDB\
**Created:** [8 October 2022 17:38 UTC](https://forum.confluent.io/t/error-connecting-to-ksqldb-in-ecs-w-ksqldb-cli/6223 "2022-10-08T17:38:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasprograms](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/lucasprograms/32/2455_2.png) [@lucasprograms](https://forum.confluent.io/u/lucasprograms)\
**Post date:** [8 October 2022 17:38 UTC](https://forum.confluent.io/t/error-connecting-to-ksqldb-in-ecs-w-ksqldb-cli/6223/1 "2022-10-08T17:38:01Z")

</div>

I am trying to use a local ksqldb-cli container to connect to ksqldb running in ecs.

My command looks like:

```auto
docker run -it confluentinc/ksqldb-cli:0.28.2 ksql -u <username> -p <password> <ksql-server-URL>

```

I reach a ksql prompt, but it does not work. The following text is output:

```auto
CLI v0.28.2, Server v<unknown> located at <ksql-server-URL>

WARNING: Could not identify server version.
         Non-matching CLI and server versions may lead to unexpected errors.

Server Status: <unknown>

Having trouble? Type 'help' (case-insensitive) for a rundown of how things work!

Couldn't connect to the KSQL server: The server returned an unexpected error: 

ksql> 

```

Note that the unexpected error does not have an error associated with it. I should also note that **I am able to use the same url and container to run ksql-migration commands**.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [7 November 2022 17:38 UTC](https://forum.confluent.io/t/error-connecting-to-ksqldb-in-ecs-w-ksqldb-cli/6223/2 "2022-11-07T17:38:31Z")

</div>

This topic was automatically closed after 30 days. New replies are no longer allowed.
