This repository has been archived by the owner on Feb 11, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 512
how mosca create a wss server,how to connect? #655
Comments
Can you paste the client as well? |
<script src="./mqtt/mqtt.js"></script>
var client = mqtt.connect('mqtts://mydomain.com:3001/')
|
use
is ok。 the other: how of mosca perfermance .my company maybe use in production |
Are you deploying through Nginx or Haproxy? Also, check firewall of your domain. Performance depends on how many clients do you plan to connect/etc. |
so,my mosca server config is right? |
If you curl -v https://mydomain.com:3001 what is the output? |
maybe my https certificate no right,txs。other,this project has slack? |
txs |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
const moscaSetting = {
interfaces: [
{ type: "mqtt", port: 1883 },
{ type: "mqtts", port: 8883, credentials: { keyPath: SECURE_KEY, certPath: SECURE_CERT } },
{ type: "http", port: 3000, bundle: true },
{ type: "https", port: 3001, bundle: true, credentials: { keyPath: SECURE_KEY, certPath: SECURE_CERT } }
],
secure : {
keyPath: SECURE_KEY,
certPath: SECURE_CERT,
},
stats: false,
onQoS2publish: 'noack', // can set to 'disconnect', or to 'dropToQoS1' if using a client which will eat puback for QOS 2; e.g. mqtt.js
};
but var client = mqtt.connect('mqtts://:3001/');error:
mqtt.js:9 WebSocket connection to 'wss://:3001/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED?why?
The text was updated successfully, but these errors were encountered: