I am trying to connect to GCM CCS server using the below script:
#!/usr/bin/perl use Net::XMPP; my $con = Net::XMPP::Client->new( debuglevel => 5, debugfile => "stdout", debugtime => 1 ); print "trying ... \n"; my $status = $con->Connect( hostname => 'gcm-preprod.googleapis.com', connectiontype => 'tcpip', port => 5236, tls => 1 ssl_ca_path => '/etc/ssl/localcerts/gcm.key' ); die('ERROR: XMPP connection failed') if ! defined($status); $con->Disconnect();
I am getting the below error: Anybody tried connecting CCS with perl. What wrong am I doing ?
[17:25:00] XML::Stream: new: hostname = (gcmsender.com) [17:25:00] XML::Stream: SetCallBacks: tag(node) func(CODE(0x90fe390)) [17:25:00] XMPP::Conn: xmppCallbackInit: start [17:25:00] XMPP::Conn: SetCallBacks: tag(message) func(CODE(0x90fe530) +) [17:25:00] XMPP::Conn: SetCallBacks: tag(presence) func(CODE(0x90fe4b0 +)) [17:25:00] XMPP::Conn: SetCallBacks: tag(iq) func(CODE(0x90fe3e0)) [17:25:00] XMPP::Conn: SetPresenceCallBacks: type(subscribe) func(CODE +(0x90fe4a0)) [17:25:00] XMPP::Conn: SetPresenceCallBacks: type(subscribed) func(COD +E(0x90fe6f0)) [17:25:00] XMPP::Conn: SetPresenceCallBacks: type(unsubscribe) func(CO +DE(0x90fe670)) [17:25:00] XMPP::Conn: SetPresenceCallBacks: type(unsubscribed) func(C +ODE(0x90fe770)) [17:25:00] XMPP::Conn: SetDirectXPathCallBacks: xpath(/[@xmlns="urn:ie +tf:params:xml:ns:xmpp-tls"]) func(CODE(0x90fe6e0)) [17:25:00] XMPP::Conn: SetDirectXPathCallBacks: xpath(/[@xmlns="urn:ie +tf:params:xml:ns:xmpp-sasl"]) func(CODE(0x9102ba8)) [17:25:00] XMPP::Conn: xmppCallbackInit: stop trying ... [17:25:00] XMPP::Conn: Connect: host(gcm-preprod.googleapis.com:5236) +namespace(jabber:client) [17:25:00] XMPP::Conn: Connect: timeout(10) [17:25:00] XML::Stream: Connect: timeout(10) [17:25:00] XML::Stream: Connect: type(tcpip) [17:25:00] XML::Stream: Connect: Got a connection [17:25:00] XML::Stream: MarkActivity: sid(newconnection) [17:25:00] XML::Stream: Send: (<?xml version='1.0'?><stream:stream ver +sion='1.0' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jab +ber:client' to='gcm-preprod.googleapis.com' from='gcmsender.com' xml: +lang='en' >) [17:25:00] XML::Stream: Send: sid(newconnection) [17:25:00] XML::Stream: Send: status(0) [17:25:00] XML::Stream: Send: socket(IO::Socket::INET=GLOB(0x90fe580)) [17:25:00] XML::Stream: Send: can_write [17:25:00] XML::Stream: Send: SENDWRITTEN(196) [17:25:00] XML::Stream: Send: no exceptions [17:25:00] XML::Stream: MarkActivity: sid(newconnection) [17:25:00] XML::Stream: Connect: can_read( ) [17:25:00] XML::Stream: Read: sid(newconnection) [17:25:00] XML::Stream: Read: connectionType(tcpip) [17:25:00] XML::Stream: Read: socket(IO::Socket::INET=GLOB(0x90fe580)) [17:25:00] XML::Stream: Read: buff() [17:25:00] XML::Stream: Read: status(0) [17:25:00] XML::Stream: Read: ERROR [17:25:00] XML::Stream: GetErrorCode: sid(newconnection) ERROR: XMPP connection failed at ccsclient.pl line 18.

In reply to Issues connecting android GCM CCS using perl by kamrul

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.