# Mmctl channel move exposes migration bug

**URL:** <https://forum.mattermost.com/t/mmctl-channel-move-exposes-migration-bug/16514>\
**Category:** Unanswered\
**Created:** [July 26, 2023, 1:03am UTC](https://forum.mattermost.com/t/mmctl-channel-move-exposes-migration-bug/16514 "2023-07-26T01:03:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rochus](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rochus](https://forum.mattermost.com/u/Rochus)\
**Post date:** [July 26, 2023, 1:03am UTC](https://forum.mattermost.com/t/mmctl-channel-move-exposes-migration-bug/16514/1 "2023-07-26T01:03:15Z")

</div>

Hi ,

When I did a mmctl channel move, I got an error regarding the port I used when I did the migration. I don’t see the logic in a channel containing migration info down to the port used, as a port can change.

I added this post in the [CLI category](https://forum.mattermost.com/t/mmcil-channel-move-error/16482) but the more I think about it the more I think it is a bug.

Any help will be appreciated

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [July 27, 2023, 12:20pm UTC](https://forum.mattermost.com/t/mmctl-channel-move-exposes-migration-bug/16514/2 "2023-07-27T12:20:09Z")

</div>

What error are you seeing and what Mattermost version are you using?

---

<div class="post-metadata">

**Author:** ![Rochus](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rochus](https://forum.mattermost.com/u/Rochus)\
**Post date:** [July 28, 2023, 12:57am UTC](https://forum.mattermost.com/t/mmctl-channel-move-exposes-migration-bug/16514/3 "2023-07-28T00:57:48Z")

</div>

Hi @amy.blais ,

I am using

**Mattermost Server**

```auto
Version: 7.10.3

Build Number: 7.10.3

Build Date: Wed Jun 14 12:11:06 UTC 2023

Build Hash: 74af1505a69a560085fd609620e3f92123e84536

Build Enterprise Ready: true

```

**MMCTL**

```auto
mmctl:
Version:	v7.10.4
GitCommit:	e5743a6789cbaa280af91d1064924a159a80f82d
GitTreeState:	"clean"
BuildDate:	2023-06-21T13:53:58Z
GoVersion:	go1.18.1
Compiler:	gc
Platform:	linux/amd64

```

The thing which I could imagine being a bug is that when I do a channel move

```auto
mmctl channel move NewTeam OldTeam:myChannel

```

and I get

```auto
http://domain_name.de:8065/api/v4/users/me": dial tcp ip_address:8065: connect: connection refused

```

It looks like a bug to me because I can’t imagine why a channel would be need to be concerned with the site URL used in the migration process ?

---

<div class="post-metadata">

**Author:** ![amy.blais](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/amy.blais/32/7481_2.png) [@amy.blais](https://forum.mattermost.com/u/amy.blais)\
**Post date:** [July 28, 2023, 12:16pm UTC](https://forum.mattermost.com/t/mmctl-channel-move-exposes-migration-bug/16514/4 "2023-07-28T12:16:32Z")

</div>

@mgdelacroix @isacikgoz Would you know if this is a bug?

---

<div class="post-metadata">

**Author:** ![isacikgoz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/isacikgoz/32/4554_2.png) [@isacikgoz](https://forum.mattermost.com/u/isacikgoz)\
**Post date:** [July 28, 2023, 6:15pm UTC](https://forum.mattermost.com/t/mmctl-channel-move-exposes-migration-bug/16514/5 "2023-07-28T18:15:58Z")

</div>

Seems like a connection issue to me. `mmctl` seems to be getting an error while authenticating with the server. Did you check if the domain name is correct or not? For instance the connection can be `https` instead of `http`, or even something else.

---

<div class="post-metadata">

**Author:** ![Rochus](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@Rochus](https://forum.mattermost.com/u/Rochus)\
**Post date:** [July 31, 2023, 1:43am UTC](https://forum.mattermost.com/t/mmctl-channel-move-exposes-migration-bug/16514/6 "2023-07-31T01:43:40Z")

</div>

Hi @amy.blais and. @isacikgoz ,

The error was on my part. @isacikgoz made a comment that shed light on the issue. I still had the login credentials from the migration. I didn’t ( but should have) realised that this has to be kept current.

However I did see something that is not quite right in this process.

when I ran the following command

```auto
mmctl channel move NewTeam OldTeam:myChannel

```

I got the message

```auto
Error: 1 error occurred:
	* unable to find channel "OldTeam:myChannel"

```

I then discovered that. the is no record of “OldTeam” , however whereas in the GUI I see the team “OldTeam” owning channels, when I run

```auto
mmctl team list

```

I see that “OldTeam” is in fact listed as “main”.

Nevertheless I ran the command with the “main” and it worked.

Thanks @amy.blais and @isacikgoz for the help. Much appreciated
