GithubHelp home page GithubHelp logo

nats.cr's Issues

Crystal 0.31.0+, 0.32.0+ compatibility

  1. A patch is required for new modulo function/method.
    The patch is provided by @Tails in commit Tails@d0e6cf5.
    An addition of require "big" is also required in nuid.cr.

Further patching is required for connection.cr, see daliborfilus@616e96a.

  1. Crystal 0.31.0 introduced many changes to Channel, removing Channel::Buffered in the process.
    (https://crystal-lang.org/api/0.31.0/Channel.html)
    The new implementation doesn't have #empty? method, which is used heavily in connection.cr.
    If calls to @flush#empty? are removed, the connection deadlocks:
Unhandled exception: Attempt to lock a mutex recursively (deadlock) (Exception)
  from /usr/share/crystal/src/mutex.cr:44:21 in 'lock'
  from lib/nats/src/nats/connection.cr:132:5 in 'flush_outbound'
  from lib/nats/src/nats/connection.cr:376:9 in 'close'

Can be seen via nats-pub binary:

$ ./bin/nats-pub -s localhost subject test
Published [subject] : 'test'
Error running at_exit handler: Attempt to lock a mutex recursively (deadlock)

I can't find any replacement for this, as far I can see.

TLS with self-signed certificate

Hello,

I have NATS server setup using a self-signed certificate.
When I try to connect to my cluster, I get the following error:

Unhandled exception: SSL_connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed (OpenSSL::SSL::Error)
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/openssl/ssl/socket.cr:34:11 in 'initialize'
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/openssl/ssl/socket.cr:3:5 in 'new'
  from lib/nats/src/nats/connection.cr:528:7 in 'process_first_info'
  from lib/nats/src/nats/connection.cr:97:7 in 'initialize'
  from lib/nats/src/nats/connection.cr:55:5 in 'new'
  from lib/nats/src/nats/connection.cr:139:7 in 'new'
  from lib/nats/src/nats/connection.cr:131:7 in 'new'
  from src/server.cr:13:13 in 'initialize'
  from src/server.cr:12:5 in 'new'
  from src/identity.cr:6:12 in '__crystal_main'
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:105:5 in 'main_user_code'
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:91:7 in 'main'
  from ../../../../../usr/local/Cellar/crystal/0.35.1_1/src/crystal/main.cr:114:3 in 'main'

How do I correctly specify TLS options?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.