TwiN / gatus

⛑ Automated developer-oriented status page
https://gatus.io
Apache License 2.0
6.36k stars 424 forks source link

XMPP WSS Bad Status #641

Open roughnecks opened 10 months ago

roughnecks commented 10 months ago

Describe the bug

Not sure if a bug but I cannot get the wss endpoint to work with my prosody instance.

This is my configuration:

  - name: prosody
    group: core
    url: "wss://woodpeckersnest.space:5281/xmpp-websocket"
    body: "status"
    conditions:
      - "[CONNECTED] == true"
      - "[BODY].result >= 0"

What do you see?

image

What do you expect to see?

No response

List the steps that must be taken to reproduce this issue

  1. Configure wss endpoint
  2. Start application
  3. Look at the webpage - error in the wss endpoint

Version

I installed with GO

Additional information

No response

TwiN commented 10 months ago

To be honest, I don't currently monitor any websocket endpoint myself, but perhaps @heitorPB will see something I don't as they're the one who implemented the feature 🤔

heitorPB commented 10 months ago

Hey @roughnecks!

What errors did you get? Did you check the logs?

I switched jobs recently and I'm not monitoring websocket endpoints anymore. But I also saw some errors when monitoring wss endpoints that returned large payloads. Maybe there's some internal buffers that are not large enough by default and could be configured to hold more data?

Or some other bug in the code?

roughnecks commented 9 months ago

Hi @heitorPB What logs are you referring to?

I tried enabling debug logs but journalctl -xeu gatus.service doesn't say much And I don't know why there's no nginx logs, like access and error logs are not even created.

heitorPB commented 9 months ago

I was referring to the Gatus logs, in debug mode. Something like journalctl --unit gatus.service --grep "wss".

Can you connect directly to your websocket? Like websocat woodpeckersnest.space:5281/xmpp-websocket?

I can't reach it via websocket:

$ websocat -v -H='Sec-Websocket-Protocol: xmpp' -H='seb-websocket-version: 13' -H='upgrade: websocket' wss://woodpeckersnest.space/xmpp-websocket
[INFO  websocat::lints] Auto-inserting the line mode
[INFO  websocat::stdio_threaded_peer] get_stdio_peer (threaded)
[INFO  websocat::ws_client_peer] get_ws_client_peer
websocat: WebSocketError: WebSocketError: Received unexpected status code (404 Not Found)
websocat: error running
roughnecks commented 9 months ago

The only thing I can say to you now is that I have a bot connected to wss (IPv4 only).

hamann commented 8 months ago

I get the same result bad status for a websocket check

Screenshot 2024-03-06 at 10 31 40

- alerts:
  - type: slack
  conditions:
  - '[CONNECTED] == true'
  interval: 60s
  name: gameserver
  url: wss://spiel.bummerl.at/websocket
❯ websocat wss://spiel.bummerl.at/websocket
{"type":"youMustAuthenticate","requiredClientVersion":"2.0","pingTimeout":"infinity"}
^C