Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.26.0 connection failed EOF while 1.25.2 works with same config #2037

Open
Bastrabun opened this issue Apr 4, 2023 · 11 comments
Open

1.26.0 connection failed EOF while 1.25.2 works with same config #2037

Bastrabun opened this issue Apr 4, 2023 · 11 comments

Comments

@Bastrabun
Copy link

Bastrabun commented Apr 4, 2023

Describe the bug

Using matterbridge-1.26.0-linux-64bit and this config

[irc.tv]
Password="mytokenwasreplacedofc"
Nick="Somenick"
Server="irc.chat.twitch.tv:6697"
UseTLS=true
RemoteNickFormat="<{NICK}> "
Charset="utf-8"

I get this error:

time="2023-04-04T11:26:18Z" level=error msg="disconnect: error: EOF" prefix=irc
time="2023-04-04T11:26:18Z" level=fatal msg="Starting gateway failed: Bridge irc.tv failed to start: connection failed EOF" prefix=main

Downgrading to matterbridge-1.25.2-linux-64bit does not produce the same error

To Reproduce
Use the config above for matterbridge-1.26.0-linux-64bit

Expected behavior
Matterbridge connects to Twitch

Screenshots/debug logs
Attemnpt1:
time="2023-04-04T11:25:35Z" level=info msg="Starting bridge: irc.tv " prefix=router
time="2023-04-04T11:25:35Z" level=info msg="Connecting irc.chat.twitch.tv:6697" prefix=irc
time="2023-04-04T11:25:36Z" level=error msg="disconnect: error: EOF" prefix=irc
time="2023-04-04T11:25:36Z" level=fatal msg="Starting gateway failed: Bridge irc.tv failed to start: connection failed EOF" prefix=main

Attempt2:
time="2023-04-04T11:26:18Z" level=info msg="Starting bridge: irc.tv " prefix=router
time="2023-04-04T11:26:18Z" level=info msg="Connecting irc.chat.twitch.tv:6697" prefix=irc
time="2023-04-04T11:26:18Z" level=error msg="disconnect: error: EOF" prefix=irc
time="2023-04-04T11:26:18Z" level=fatal msg="Starting gateway failed: Bridge irc.tv failed to start: connection failed EOF" prefix=main

If necessary I can bring more or set matterbridge into a debugmode of your choice.

Environment (please complete the following information):

  • OS: debian testing
  • Matterbridge version: version: 1.26.0 6dafebc
  • If self compiled: N/A

Additional context
Workaround available: Downgrade to matterbridge-1.25.2-linux-64bit: version: 1.25.2 20f841c
Not urgent
Selfcontrolled, we can do all kinds of tests with it

For my reference 4114

@Bastrabun Bastrabun added the bug label Apr 4, 2023
@42wim
Copy link
Owner

42wim commented Apr 6, 2023

run with --debug please, but there are no irc code changes between 1.25.2 and 1.26.0
They should behave the same.

@42wim 42wim added the irc label Apr 6, 2023
@Bastrabun
Copy link
Author

Bastrabun commented Apr 6, 2023

Here you can see a successful join to irc.libera.chat and then starts the join to twitch.

time="2023-04-06T21:56:28Z" level=debug msg=""CLIENT_CONNECTED irc.libera.chat:6667"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="Connection succeeded" func=Connect file="bridge/irc/irc.go:107" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="irc.yl: joining #your-land-web (ID: #your-land-webirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg=""@time=2023-04-06T21:56:26.913Z :YL MODE YL +iw"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="irc.yl: joining #your-land-chat (ID: #your-land-chatirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="irc.yl: joining #your-flight-chat (ID: #your-flight-chatirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="irc.yl: joining #your-land-dev (ID: #your-land-devirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T21:56:32Z" level=info msg="Starting bridge: irc.tv " func=Start file="gateway/router.go:75" prefix=router
time="2023-04-06T21:56:32Z" level=info msg="Connecting irc.chat.twitch.tv:6697" func=Connect file="bridge/irc/irc.go:81" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="setting pingdelay to 1m0s" func=getClient file="bridge/irc/irc.go:306" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000c2e450), Tags:girc.Tags{"time":"2023-04-06T21:56:32.231Z"}, Timestamp:time.Date(2023, time.April, 6, 21, 56, 32, 231000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-web", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="333: Topic set by Alias [~Alias@user/alias] [2022-04-04 21:48:03 +0000 UTC]" func=handleTopicWhoTime file="bridge/irc/handlers.go:264" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000a171a0), Tags:girc.Tags{"time":"2023-04-06T21:56:32.232Z"}, Timestamp:time.Date(2023, time.April, 6, 21, 56, 32, 232000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-chat", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000b40690), Tags:girc.Tags{"time":"2023-04-06T21:56:32.233Z"}, Timestamp:time.Date(2023, time.April, 6, 21, 56, 32, 233000000, time.Local), Command:"JOIN", Params:[]string{"#your-flight-chat", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000b40f60), Tags:girc.Tags{"time":"2023-04-06T21:56:32.233Z"}, Timestamp:time.Date(2023, time.April, 6, 21, 56, 32, 233000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-dev", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg=""CLIENT_INIT irc.chat.twitch.tv:6697"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T21:56:32Z" level=debug msg=""CLIENT_DISCONNECTED irc.chat.twitch.tv:6697"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T21:56:32Z" level=error msg="disconnect: error: EOF" func=doConnect file="bridge/irc/irc.go:194" prefix=irc
time="2023-04-06T21:56:32Z" level=fatal msg="Starting gateway failed: Bridge irc.tv failed to start: connection failed EOF" func=main file="matterbridge.go:66" prefix=main

@42wim
Copy link
Owner

42wim commented Apr 6, 2023

Thanks, can you do exactly the same with 1.25.2 where it has no issues? (and paste it here)

@Bastrabun
Copy link
Author

We start at the same line like above, in a successful join to irc.libera.chat

ooc: I see a couple of channel-specific values - none of those are secrets, tokens or can be used in a hostile way? I took a look through the stuff and while I didn't find anything obvious, I have a hard time figuring out what's better kept a secret.

time="2023-04-06T22:02:56Z" level=debug msg=""CLIENT_CONNECTED irc.libera.chat:6667"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:02:57Z" level=debug msg="Sending message from STEALTH on api to gateway" func=handlePostMessage file="bridge/api/api.go:140" prefix=api
time="2023-04-06T22:02:59Z" level=info msg="Connection succeeded" func=Connect file="bridge/irc/irc.go:107" prefix=irc
time="2023-04-06T22:02:59Z" level=info msg="irc.yl: joining #your-land-chat (ID: #your-land-chatirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T22:02:59Z" level=info msg="irc.yl: joining #your-flight-chat (ID: #your-flight-chatirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T22:02:59Z" level=debug msg=""@time=2023-04-06T22:02:54.586Z :YL MODE YL +iw"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:02:59Z" level=info msg="irc.yl: joining #your-land-dev (ID: #your-land-devirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T22:02:59Z" level=info msg="irc.yl: joining #your-land-web (ID: #your-land-webirc.yl)" func=joinChannels file="bridge/bridge.go:77" prefix=irc
time="2023-04-06T22:02:59Z" level=info msg="Starting bridge: irc.tv " func=Start file="gateway/router.go:75" prefix=router
time="2023-04-06T22:02:59Z" level=info msg="Connecting irc.chat.twitch.tv:6697" func=Connect file="bridge/irc/irc.go:81" prefix=irc
time="2023-04-06T22:02:59Z" level=debug msg="setting pingdelay to 1m0s" func=getClient file="bridge/irc/irc.go:306" prefix=irc
time="2023-04-06T22:02:59Z" level=debug msg=""CLIENT_INIT irc.chat.twitch.tv:6697"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000888a50), Tags:girc.Tags{"time":"2023-04-06T22:03:00.013Z"}, Timestamp:time.Date(2023, time.April, 6, 22, 3, 0, 13000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-chat", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg="333: Topic set by Alias [~Alias@user/alias] [2022-04-04 21:48:03 +0000 UTC]" func=handleTopicWhoTime file="bridge/irc/handlers.go:263" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc000561e30), Tags:girc.Tags{"time":"2023-04-06T22:03:00.014Z"}, Timestamp:time.Date(2023, time.April, 6, 22, 3, 0, 14000000, time.Local), Command:"JOIN", Params:[]string{"#your-flight-chat", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc00099a750), Tags:girc.Tags{"time":"2023-04-06T22:03:00.014Z"}, Timestamp:time.Date(2023, time.April, 6, 22, 3, 0, 14000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-dev", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg="handle girc.Event{Source:(*girc.Source)(0xc00099b080), Tags:girc.Tags{"time":"2023-04-06T22:03:00.015Z"}, Timestamp:time.Date(2023, time.April, 6, 22, 3, 0, 15000000, time.Local), Command:"JOIN", Params:[]string{"#your-land-web", "*", "YL"}, Sensitive:false, Echo:false}" func=handleJoinPart file="bridge/irc/handlers.go:117" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg="":tmi.twitch.tv CAP * LS :twitch.tv/tags twitch.tv/commands twitch.tv/membership"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg=""CLIENT_GENERAL_UPDATED"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg="":tmi.twitch.tv 001 yl_tv :Welcome, GLHF!"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg="Registering callbacks" func=handleNewConnection file="bridge/irc/handlers.go:121" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg=""CLIENT_GENERAL_UPDATED"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:03:00Z" level=debug msg=""CLIENT_GENERAL_UPDATED"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:03:02Z" level=debug msg=""CLIENT_CONNECTED irc.chat.twitch.tv:6697"" func=handleOther file="bridge/irc/handlers.go:170" prefix=irc
time="2023-04-06T22:03:05Z" level=info msg="Connection succeeded" func=Connect file="bridge/irc/irc.go:107" prefix=irc
time="2023-04-06T22:03:05Z" level=info msg="irc.tv: joining #bailiffofhaven (ID: #bailiffofhavenirc.tv)" func=joinChannels file="bridge/bridge.go:77" prefix=irc

@42wim
Copy link
Owner

42wim commented Apr 6, 2023

if your password isn't there there shouldnt be any other secrets for irc

@42wim
Copy link
Owner

42wim commented Apr 6, 2023

Do you know how to build matterbridge yourself?
The only change in irc is in the irc library itself lrstanley/girc@8240917

If you clone matterbridge from master, revert that change above in vendor/github.com/lrstanley/girc/conn.go and do go build -mod vendor you should have a matterbridge binary with exactly the same version of irc as v0.25.2

@Bastrabun
Copy link
Author

I built current master 89b0d36 and the 1.26.0 tag https://github.com/42wim/matterbridge/tree/v1.26.0 , both without the commit indicated in your previous message. In both cases it connected to twitch irc without problems.

@42wim
Copy link
Owner

42wim commented Apr 7, 2023

ok so there's not really an issue? seems like something wrong with your debian build only

@Bastrabun
Copy link
Author

Bastrabun commented Apr 7, 2023

If the error appears with the commit lrstanley/girc@8240917 you mentioned and the error does not appear without this commit, this indicates this commit is responsible for the problem.

@42wim
Copy link
Owner

42wim commented Apr 7, 2023

ok I misread, could you open an issue on https://github.com/lrstanley/girc/issues ? needs to be fixed upstream

@Bastrabun
Copy link
Author

Upstream issue: lrstanley/girc#62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants