How can I achieve ws://mq.domain.com:8083/mqtt and wss://mq.domain.com:8084/mqtt in a web application? #965
Unanswered
willpan122
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Hi, I'm sorry I don't understand, Is your means can connect emqx by mqttx, but can't conect emqx by your code ? PS: could you please format your YAML file in issue context ? you can use the code text by Markdown syntax |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using the EMQ X MQTT product with version 5.1.4. Here's my setup process:
I installed EMQ X 5.1.4 on Google Kubernetes Engine (GKE) using a Helm chart.
command:
helm repo add https://repos.emqx.io/charts
helm repo update
helm install emqx emqx/emqx -n emqx --set persistence.enabled=true --set persistence.storageClass=premium-rwo --set persistence.size=30Gi
And I used the Helm chart to install ingress-nginx version 4.7.1 to expose ports 80, 443, 1883, 8083, 8084, and 18083 for EMQ X.
I deployed an EMQ X Ingress to establish domain connections.
My issue is that I can't achieve ws://mq.domain.com:8083/mqtt and wss://mq.domain.com:8084/mqtt connections, and I couldn't find any relevant documentation.
Here are some logs from the developer tools:
MQTTX Client Operations:
Using the curl command:
curl -I -N
-H “Connection: Upgrade”
-H “Upgrade: websocket”
-H “Host: domain”
-H “Origin: http://mq.domain.com”
http://mq.domain.com:8083/mqtt
get
HTTP/1.1 400 Bad Request
content-length: 0
date: Thu, 12 Oct 2023 09:06:17 GMT
server: Cowboy
And use wireshark
curl -I -N
-H “Connection: Upgrade”
-H “Upgrade: websocket”
-H “Host: domain”
-H “Origin: http://mq.domain.com”
http://mq.domain.com:8083/mqtt
This is my emqx-ingress.yaml
Beta Was this translation helpful? Give feedback.
All reactions