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

examples/mqtt-ws-server.rs not worked wss with mqttx #190

Open
aamalev opened this issue Feb 24, 2025 · 0 comments
Open

examples/mqtt-ws-server.rs not worked wss with mqttx #190

aamalev opened this issue Feb 24, 2025 · 0 comments

Comments

@aamalev
Copy link

aamalev commented Feb 24, 2025

  1. If use examples/mqtt-ws-client.rs - is ok

  2. If use mqttx - not worked

$ mqttx pub -l wss --hostname 127.0.0.1 --port 8883 --mqtt-version 3.1.1 -t topic -m message --content-type text --insecure
✖ Exceed the maximum reconnect times limit, stop retry

log:

[2025-02-24T10:22:51Z TRACE ntex_io::tasks] : New 359 bytes available, wakeup dispatcher
Connection is established, select protocol
HTTP protocol is selected
[2025-02-24T10:22:51Z TRACE ntex::http::service] New http connection, peer address Some(127.0.0.1:63122), in-flight: 1
[2025-02-24T10:22:51Z DEBUG ntex_io::ioref] : Start timer Seconds(1)
[2025-02-24T10:22:51Z TRACE ntex::http::h1::dispatcher] : Trying to read http message
[2025-02-24T10:22:51Z TRACE ntex::http::h1::dispatcher] : Http message is received:
    Request HTTP/1.1 GET:/mqtt
      headers:
        "sec-websocket-key": "qVwximovjHWf983lpkfwIw=="
        "connection": "Upgrade"
        "sec-websocket-version": "13"
        "sec-websocket-extensions": "permessage-deflate; client_max_window_bits"
        "upgrade": "websocket"
        "sec-websocket-protocol": "mqtt"
        "host": "127.0.0.1:8883"
     and payload Stream(PayloadDecoder { kind: Cell { value: Eof } })
[2025-02-24T10:22:51Z DEBUG ntex::http::h1::dispatcher] IO: Dispatcher is stopped
[2025-02-24T10:22:51Z TRACE mqtt] Got http request:
    Request HTTP/1.1 GET:/mqtt
      headers:
        "sec-websocket-key": "qVwximovjHWf983lpkfwIw=="
        "connection": "Upgrade"
        "sec-websocket-version": "13"
        "sec-websocket-extensions": "permessage-deflate; client_max_window_bits"
        "upgrade": "websocket"
        "sec-websocket-protocol": "mqtt"
        "host": "127.0.0.1:8883"

[2025-02-24T10:22:51Z TRACE mqtt] WebSocket handshake is completed
[2025-02-24T10:22:51Z TRACE ntex_io::tasks] : Tcp stream is disconnected
[2025-02-24T10:22:51Z TRACE ntex_io::tasks] : Write task is instructed to terminate
[2025-02-24T10:22:51Z DEBUG ntex_io::ioref] : Stop timer
[2025-02-24T10:22:51Z TRACE ntex_io::ioref] : Force close io stream object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant