thanks,
yes, I tried to isolate some pieces with the following snippets:
use IO::Socket::SSL; my $client = IO::Socket::SSL->new('host_atlas:1024') or die "error=$!, ssl_error=$SSL_ERROR"; print 'done';
gives
   >perl test.pl
    done%
use Mojo::IOLoop::Client; my $client = Mojo::IOLoop::Client->new; $client->on(connect => sub ($client, $handle) {print "on_connect\n"}); $client->on(error => sub ($client, $err) {print "on_error\n"}); $client->connect({address => 'host_atlas', port => 1024}); $client->reactor->start unless $client->reactor->is_running; print 'done';
gives
   >perl test.pl
   -- Emit connect in Mojo::IOLoop::Client (1)
   on_connect
   done%
use feature 'state'; use Mango; use Mojo::IOLoop::Client; my $connect_string=$ARGV[0]; sub mango { state $m = Mango->new($connect_string);} mango->db('mydb')->list_collections(sub { my ($db, $err, $cursor) = @_; print "YESSSSSSSSSSS !!!!\n"; }); Mojo::IOLoop->start unless Mojo::IOLoop->is_running;
gives
   >perl test.pl "$ATLAS_STRING"
   -- Emit connect in Mojo::IOLoop::Client (1)
   -- Emit write in Mojo::IOLoop::Stream (0)
   -- Emit drain in Mojo::IOLoop::Stream (0)
   -- Emit close in Mojo::IOLoop::Stream (2)
   -- Emit error in Mojo::Reactor::Poll (1)
   Mojo::Reactor::Poll: I/O watcher failed: Can't use an undefined value as an ARRAY reference at /var/..../local/lib/perl5/Mango/Cursor.pm line 11.
   done%

In reply to Re^2: Mojolicious connection to Atlas ssl cluster fails: "Premature connection close" by jjmoka
in thread Mojolicious connection to Atlas ssl cluster fails: "Premature connection close" by jjmoka

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.