Error Connecting to a JMS Topic Broker via SSL using Net::STOMP::Client module in Perl -


i trying connect tibco jms topic broker of net::stomp::client package in perl.

i using ssl approach while creating new net::stomp::client object , passing attributes 'uri' & 'sockopts' takes topic uri & ssl certificate files authentication.

when try run script throws error saying : -

cannot ssl connect mmx-nprd1-06:7222: io::socket::inet6 configuration failed

code give below :-

use net::stomp; use net::stomp::client;  use moose; use strict; use warnings; use findbin qw($bin);  print "\n$bin\n";  $stomp;     $stomp = net::stomp::client->new(       uri => "stomp+ssl://mmx-nprd1-06:7222",       sockopts => {           # path of directory containing trusted certificates           ssl_ca_path   => "$bin/jmscertificate/",           # client certificate present           ssl_cert_file => "$bin/jmscertificate/aix_jms_cert.pem",           # # client private key           ssl_key_file  => "$bin/jmscertificate/aix_jms_key.pem",           # passphrase of client private key           ssl_passwd_cb => sub { return("password") },       },   );    $stomp->connect();    $peer = $stomp->peer();   printf("connected broker %s (ip %s), port %d\n", $peer->host(), $peer->addr(), $peer->port());    $sid = $stomp->uuid();   $stomp->subscribe(       destination => "/queue/test",       # use generated subscription id       id          => $sid,       # want receipt on our subscribe frame       receipt     => $stomp->uuid(),   );   $count = 0;   $frame;    while ($count < 10) {       $frame = $stomp->wait_for_frames(timeout => 1);       if ($frame) {           if ($frame->command() eq "message") {               $count++;               printf("received message %d id %s\n",                      $count, $frame->header("message-id"));           } else {               # catch receipt frame               printf("%s frame received\n", $frame->command());           }       } else {           print("waiting messages...\n");       }   }   $stomp->unsubscribe(id => $sid);   $stomp->disconnect(); 

can me out not able figure out whats going wrong here.

i had issues using uri key try following :

$stomp = net::stomp::client->new(host => "mmx-nprd1-06", port => 7222,   sockopts => {       # path of directory containing trusted certificates       ssl_ca_path   => "$bin/jmscertificate/",       # client certificate present       ssl_cert_file => "$bin/jmscertificate/aix_jms_cert.pem",       # # client private key       ssl_key_file  => "$bin/jmscertificate/aix_jms_key.pem",       # passphrase of client private key       ssl_passwd_cb => sub { return("password") }, # leave out if key doesn't require passphrase   }, );  $stomp->connect(login => "aix_jms", passcode => "some_password"); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -