question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Help wanted setting up deepstream 5.0.12 on linux with ssl

See original GitHub issue

Hi, 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:closed
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jaime-ezcommented, May 4, 2020

I just tested ssl using the selfsigned package. I had no problems. @LinusBrockmeyer in your config options.ssl.cert has a cert extension, it should be a pem file.

The config.yml example states correctly that for httpServer type default, one must call the ssl files with fileLoad() and for httpServer type uws with file().

When using a .js config file, for the uws server one must give the full path for the ssl file, and for the default server, the file contents should be required before and pass them to the options.ssl object.

NOTE: when using selfsigned certs, one must execut node with the following env variable: NODE_TLS_REJECT_UNAUTHORIZED=0

1reaction
caracal7commented, Apr 5, 2020

I more prefer native SSL support without Nginx

Read more comments on GitHub >

github_iconTop Results From Across the Web

NVIDIA DeepStream SDK Developer Guide : Quick Start Guide
This section explains how to prepare a Jetson device before installing the DeepStream SDK. To install Jetson SDK components. • Download NVIDIA SDK...
Read more >
Getting Started with NVIDIA DeepStream-5.0 - Medium
In this article I will be sharing detailed steps on how to install NVIDIA DeepStream on DGPU based devices. You must install the...
Read more >
Implementing Real-time Vision AI Apps Using NVIDIA ...
Learn how companies around the world are modernizing their existing infrastructure with IoT sensors, such as cameras, to extract rich ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found