xmppo / xmpp-webhook

Multipurpose XMPP-Webhook (Built for DevOps Alerts)
https://github.com/xmppo/xmpp-webhook
MIT License
22 stars 8 forks source link

Errors on Ubuntu 20.04 #15

Closed theidiotyouyellat closed 3 years ago

theidiotyouyellat commented 3 years ago

OS: Ubuntu 20.04.2 LTS Kernel: 5.4.0-65-generic x86_64 Go: 1.13.8 Xmpp-webhook: 0.3

Any time I launch the systemd service it errors out.

systemd[1]: Started XMPP-Webhook.
xmpp-webhook[623]: panic: EOF
xmpp-webhook[623]: goroutine 1 [running]:
xmpp-webhook[623]: main.panicOnErr(...)
xmpp-webhook[623]:         /home/thomas/projects/xmpp-webhook/main.go:23
xmpp-webhook[623]: main.main()
xmpp-webhook[623]:         /home/thomas/projects/xmpp-webhook/main.go:88 +0x6b6
systemd[1]: xmpp-webhook.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: xmpp-webhook.service: Failed with result 'exit-code'.

Following the same steps on Arch I can successfully get the service running.

OS: Arch Kernel: 5.10.10-arch1-1 Go: 1.15.7 Xmpp-webhook: 0.3

theidiotyouyellat commented 3 years ago

I was able to work around the issue by installing the bot on my ejabberd server and having it connect over localhost. Please ignore this issue.

konstantine-v commented 3 years ago

theidiotyouyellat: Could you provide more detail on how it was resolved? I'm running into the same issue trying to connect it via localhost on an Ubuntu machine.

theidiotyouyellat commented 3 years ago

@MaterialFuture: In my ejabberd yaml file, I have 2 hosts, one is the domain name my clients connect to, and the other is the fqdn of the server. I connect xmpp-webhook over the fqdn of the server.

tmsmr commented 3 years ago

@MaterialFuture @theidiotyouyellat Could you provide more information about your environment? Is this systemd-related?

theidiotyouyellat commented 3 years ago

@tmsmr I have my ejabberd server behind pfsense with haproxy. On my arch desktop different vlan, I could get it to connect via systemd or from terminal. On a second ubuntu vm in the same vlan as my server, it would never connect and alwas give the error above. Once I installed xmpp-webhook on my ejabberd server, it worked.

tmsmr commented 3 years ago

@theidiotyouyellat That sounds like a general connection problem to me. VLAN' should not matter afaik. Was the connection between VM and Jabber server routed? Do you have an IPS installed on your pfSense box?

theidiotyouyellat commented 3 years ago

@tmsmr yeah I figured it was a connection issue. I do not currently use IPS on my pfsense, but the VM and jabber connection was still routed through haproxy since it takes control of the port. In my case, using the ejabberd VM let me bypass pfsense.

tmsmr commented 3 years ago

@theidiotyouyellat So if you use $insert_jabber_cllient_of_your_choice in that VLAN + Connection over HAProxy it does NOT work aswell?

SamWhited commented 3 years ago

There was a bug in Mellium for a while where if the connection was closed due to a stream error it would return the EOF instead of the stream error too, so if you can log the XML you might find a better error being sent under the hood. The next version fixes this, IIRC.

theidiotyouyellat commented 3 years ago

@tmsmr I honestly didn't try as that vlan is only headless servers. I can spin up a system with a gui and test.

tmsmr commented 3 years ago

Hi @SamWhited. Thanks for dropping by! Are you referring to an upcoming version or v0.15.0 (Since im still using v0.14.0...)? I kind of neglected this project for some time and need fix some stuff anyway...

tmsmr commented 3 years ago

@theidiotyouyellat I don't think this is necessary if you are happy with your solution. As soon as Mellium is more verbose on that stream errors (And i integrated that) you could test again.

SamWhited commented 3 years ago

Are you referring to an upcoming version or v0.15.0 (Since im still using v0.14.0...)?

Yes, sorry, I meant an upcoming version (v0.18.0). I am not sure off the top of my head when this issue was introduced, so I don't know that it could be the problem here, I just vaguely remember fixing it recently so it may be worth taking a look at the XML output if you're debugging.

theidiotyouyellat commented 3 years ago

@tmsmr not a problem. I spun a live disk and connecting to the jabber address fails but connecting using the ejabberd fqdn works.Good to know I've got some networking to review.

konstantine-v commented 3 years ago

I'm not sure if my issue happens to be the same as I'm not getting the EOF error but rather panic: malformed-request. It may be more appropriate to make a new issue for this.

Edit: I've created a new issue here: #16 . I imagine my problem is a different one all together and would want to also have visibility for others running into a similar issue.

tmsmr commented 3 years ago

@SamWhited I'll just use the v0.18.0 as soon as its ready, then we'll see if the stream errors are reported differently :smile: