Help wanted setting up deepstream 5.0.12 on linux with ssl
See original GitHub issueHi, I am using your deepstream server to assist webRTC. Over deepstream I share information like if your partner is online or calling you. I want to upgrade to a newer Version of deepstream. At the moment I am running Version 3.1.4 on Ubuntu.
I get your example (https://deepstream.io/tutorials/getting-started/javascript/) running on localhost. But if I try to run deepstream on a different server and/or use the library from the example (https://cdn.deepstream.io/js/client/latest/ds.min.js) in my app (served over https) I can’t seem to get it working. Seems like firefox forces wss and can’t use ws.
Firefox throws following error:
Firefox can’t establish a connection to the server at wss://localhost:6020/deepstream
And the js client throws following error:
client error: {"error":{"isTrusted":true},"event":"CONNECTION_ERROR","topic":"CONNECTION"}
I read through everything you offer as tutorials, guides and docs at deepstream.io, as well as what google search offers. In Version 3.1.4 i was able to enable a wss socket in 5.0.12 not. I tried multiple syntax for key, cert, ca in the ws-binary endpoint. My Server (localhost) doesn’t show anything. With your example over http it showed user connected, etc.
Can you please give me a hint, how to setup the server to listen to wss requests?
My config:
serverName: UUID
showLogo: true
logLevel: INFO
dependencyInitializationTimeout: 2000
libDir: ../lib
exitOnFatalError: false
rpc:
ackTimeout: 1000
responseTimeout: 10000
record:
cacheRetrievalTimeout: 30000
storageRetrievalTimeout: 30000
listen:
shuffleProviderss: true
responseTimeout: 500
rematchInterval: 60000
matchCooldown: 10000
httpServer:
type: default
options:
healthCheckPath: /health-check
allowAllOrigins: true
origins:
- 'https://example.com'
# Options required to create an ssl app
ssl:
key: fileLoad(deepstream.key)
cert: fileLoad(deepstream.crt)
ca: fileLoad(myCA.pem)
connectionEndpoints:
- type: ws-binary
options:
urlPath: /deepstream
heartbeatInterval: 30000
outgoingBufferTimeout: 10
maxBufferByteSize: 100000
unauthenticatedClientTimeout: 180000
maxAuthAttempts: 3
maxMessageSize: 1048576
- type: ws-text
options:
urlPath: /deepstream-v3
heartbeatInterval: 30000
outgoingBufferTimeout: 10
maxBufferByteSize: 100000
unauthenticatedClientTimeout: 180000
maxAuthAttempts: 3
maxMessageSize: 1048576
- type: ws-json
options:
urlPath: /deepstream-json
heartbeatInterval: 30000
outgoingBufferTimeout: 10
maxBufferByteSize: 100000
unauthenticatedClientTimeout: 180000
maxAuthAttempts: 3
maxMessageSize: 1048576
- type: http
options:
allowAuthData: true
enableAuthEndpoint: false
authPath: /api/auth
postPath: /api
getPath: /api
maxMessageSize: 1024
logger:
type: default
options:
colors: true
auth:
- type: none
permission:
type: config
options:
permissions: fileLoad(permissions.yml)
maxRuleIterations: 3
cacheEvacuationInterval: 60000
monitoring:
type: none
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (7 by maintainers)
I just tested ssl using the selfsigned package. I had no problems. @LinusBrockmeyer in your config
options.ssl.cert
has acert
extension, it should be apem
file.The
config.yml
example states correctly that forhttpServer type default
, one must call the ssl files withfileLoad()
and forhttpServer type uws
withfile()
.When using a
.js
config file, for theuws
server one must give the full path for the ssl file, and for thedefault
server, the file contents should be required before and pass them to theoptions.ssl
object.I more prefer native SSL support without Nginx