42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
295 stars 60 forks source link

0.17.0 Cannot login due to missing parameters. #173

Closed norrland closed 6 years ago

norrland commented 6 years ago

Running matterircd 0.17.0 with only one server allowed.

08:57:49 <myuser> LOGIN myuser mypass 08:57:49 <mattermost> need LOGIN <server> <team> <login> <pass>

Config:

[mattermost]
#specify default mattermost server/instance (default "")
DefaultServer = "172.16.0.10:8065"

#skip verification of mattermost certificate chain and hostname (default false)
SkipTLSVerify = false

#specify default mattermost team (default "")
DefaultTeam = "lucanus"

#use http connection to mattermost (default false)
Insecure = true

#an array of channels that won't be joined on IRC.
#Messages that get sent to unjoined channels (but you're joined on mattermost) will
#get sent to the &messages channel.
#You can still /JOIN exclude channels.
#default ""
JoinExclude = [""]

#an array of channels that only will be joined on IRC.
#If it's empty, it means all channels get joined (except those defined in JoinExclude)
#Messages that get sent to unjoined channels (but you're joined on mattermost) will
#get sent to the &messages channel.
#default ""
JoinInclude = ["#town-square"]

#PartFake: a bool that defines if you do a /LEAVE or /PART on IRC it will also
#actually leave the channel on mattermost.
#Default false
PartFake = false

#only allow connection to specified mattermost server/instances. Space delimited (default "")
Restrict = "172.16.0.10:8065"
42wim commented 6 years ago

I can't reproduce this. Did you specify -conf matterircd.toml when starting matterircd ?

norrland commented 6 years ago

Yes, it's using my modified config.

mmircd:~ # ps aux| grep matter
root       88381  0.0  0.0 10468  1788  -  IsJ  Fri20   0:00.00 daemon: /usr/local/bin/matterircd[89942] (daemon)
matterircd 89942  0.0  0.1 34532 10436  -  IJ   Fri20   0:02.68 /usr/local/bin/matterircd -conf=/usr/local/etc/matterircd/matterircd.toml
uetam commented 6 years ago

Try this command: LOGIN server myuser mypass

norrland commented 6 years ago

Output from my irc-client: 172.16.0.10:8065 is my mattermost server, serving plaintext HTTP. For external access I have nginx in front which has TLS setup.


08:03:19 <mattermost> need LOGIN <server> <team> <login> <pass>
08:03:27 <Norrland> LOGIN mm.example.com myteam norrland mypass
08:03:27 <mattermost> "https://mm.example.com/api/v4/users/logout: model.client.connecting.app_error, Post
                      https://mm.example.com/api/v4/users/logout: dial tcp 172.16.0.1:443: connect: connection refused"
08:03:38 <Norrland> LOGIN 172.16.0.10 myteam norrland mypass
08:03:38 <mattermost> "https://172.16.0.10/api/v4/users/logout: model.client.connecting.app_error, Post
                      https://172.16.0.10/api/v4/users/logout: dial tcp 172.16.0.10:443: connect: connection refused"
08:03:46 <Norrland> LOGIN 172.16.0.10:8065 myteam norrland mypass
08:03:46 <mattermost> "https://172.16.0.10:8065/api/v4/users/logout: model.client.connecting.app_error, Post
                      https://172.16.0.10:8065/api/v4/users/logout: http: server gave HTTP response to HTTPS client"```
42wim commented 6 years ago

@norrland A couple of things, I'm pretty sure you're not using the config file with matterircd 0.17.0, because it will fail on the last line

Restrict = "172.16.0.10:8065"

should be

Restrict = ["172.16.0.10:8065"]

Please stop the daemon and run matterircd manually, and paste me the output of this command

/usr/local/bin/matterircd -conf=/usr/local/etc/matterircd/matterircd.toml
norrland commented 6 years ago

Hah, this is embarrasing. My server did not upgrade to 0.17 and was still running with the 0.16.8 binary but the config was updated.

0.17 binary and the same config works. :)