gatus icon indicating copy to clipboard operation
gatus copied to clipboard

XMPP WSS Bad Status

Open roughnecks opened this issue 2 years ago • 6 comments

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

roughnecks avatar Dec 23 '23 20:12 roughnecks

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 🤔

TwiN avatar Dec 24 '23 23:12 TwiN

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?

heitorPB avatar Jan 15 '24 14:01 heitorPB

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.

roughnecks avatar Jan 18 '24 12:01 roughnecks

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

heitorPB avatar Jan 18 '24 17:01 heitorPB

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

roughnecks avatar Jan 18 '24 19:01 roughnecks

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

hamann avatar Mar 06 '24 09:03 hamann