42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.57k stars 616 forks source link

Invalid or expired session #865

Closed r1de closed 5 years ago

r1de commented 5 years ago

Describe the bug I have 2 mattermost instances running, on both I had actual users that I logged into with Matterbridge. I created Bot Accounts on each of these servers for use with Matterbridge.
One of these bot accounts was converted from an existing user.
The "non converted" bot account works fine on one of the servers. It is on the "converted" account that I now get this error:

FATAL main:         Starting gateway failed: Bridge mattermost.inet failed to start: : Invalid or expired session, please login again.

To Reproduce Unsure, it might just be me.

Expected behavior To be able to login to the bot account via Matterbridge.

Environment (please complete the following information):

Current Config File

[general]
  #StripNick=true
  MediaDownloadPath="<path>"
  MediaServerDownload="http://host/mattermost-media"
  MediaDownloadSize=10000000

[irc]
  [irc.mesh]
    Server="irc-server:6667"
    Nick="mm-bot"
    RemoteNickFormat="<{NICK}> "

[mattermost]
  [mattermost.inet]
    #do not prefix it with http:// or https://
    Server="internet-mm-server" 
    Team="team"
    Token="TOKEN"
    PrefixMessagesWithNick=true
    RemoteNickFormat="<{NICK}> "

  [mattermost.mesh]
    NoTLS=true
    Server="other-mm-server:8065" 
    Team="meshchat"
    Token="TOKEN"
    PrefixMessagesWithNick=true
    RemoteNickFormat="<{NICK}> "

[[gateway]]
  name="inet-to-mesh"
  enable=true
    [[gateway.inout]]
      account="mattermost.mesh"
      channel="irc-link"

    [[gateway.inout]]
      account="mattermost.inet"
      channel="meshlink"

    [[gateway.inout]]
      account="irc.mesh"
      channel="#meshchat"

I have tried rebooting everything involved, restarting services, resetting all the sessions in mattermost, everything I could possibly think of and the error persists.

Is there any "cache" for matterbridge that I also need to clear?

r1de commented 5 years ago

This may be an issue with Mattermost and not with Matterbridge, or it could be in the way I created/deleted/converted the user account and/or the "Bot Accounts" while I was troubleshooting.

I recreated a user account and tried to use that with Matterbridge and it worked just fine.

Other users may run into this and I will leave this issue open until I discover a reason or give up (unless the devs wish to close it now).

r1de commented 5 years ago

I never found the reason and went back to just using user accounts for Matterbridge.
It looks better that way too.
Closing issue...
Sorry about that. :)