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

XMPP WSS Bad Status #641

Open
roughnecks opened this issue Dec 23, 2023 · 6 comments · May be fixed by #702
Open

XMPP WSS Bad Status #641

roughnecks opened this issue Dec 23, 2023 · 6 comments · May be fixed by #702
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@roughnecks
Copy link

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 roughnecks added the bug Something isn't working label Dec 23, 2023
@TwiN
Copy link
Owner

TwiN commented Dec 24, 2023

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 TwiN added the help wanted Extra attention is needed label Dec 24, 2023
@heitorPB
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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

@hamann
Copy link

hamann commented Mar 6, 2024

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 hamann linked a pull request Mar 7, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants