Skip Menu |

This queue is for tickets about the ServiceNow-Simple CPAN distribution.

Report information
The Basics
Id: 90358
Status: resolved
Priority: 0/
Queue: ServiceNow-Simple

People
Owner: Nobody in particular
Requestors: JSlay [...] tiaa-cref.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.07



Subject: ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s)
Date: Thu, 14 Nov 2013 13:27:01 +0000
To: "bug-ServiceNow-Simple [...] rt.cpan.org" <bug-ServiceNow-Simple [...] rt.cpan.org>
From: "Slay, Jay" <JSlay [...] tiaa-cref.org>
I am unable to connect to my instance using an http/https proxy. Using: perl 5, version 16, subversion 2 (v5.16.2) built for MSWin32-x64-multi-thread Code: ## Get Records ############## my $sn = ServiceNow::Simple->new({ instance => '<my_instance>'. table => 'incident', __print_results => 1, }); my $results = $sn->get_records({ number => 'INC2246419'}); Returns: 500 Can't connect to <my_instance>.service-now.com:443 (Bad hostname) at C:/Perl64/site/lib/ServiceNow/Simple.pm line 207. If I comment out the following two lines in Simple.pm: undef($ENV{HTTP_proxy}); undef($ENV{HTTPS_proxy}) and explicitly set these in my code to the correct address of my proxy server(s), I have no issues connecting with the above code. I have tried setting proxy in the simple.cfg file as well as in the call to new(), however, it seems that is for a SOAP Endpoint proxy, not an http(s) proxy based on the code in Simple.pm around the following lines: if ($self->{proxy}) { $args{https} = [ $self->{proxy} ]; } $self->{soap} = SOAP::Lite->proxy($url, %args) Regards, Jay K. Slay Sr. Engineer - Enterprise Systems Management TIAA-CREF | Financial Services for the Greater Good 8825 Andrew Carnegie Blvd. F1-02 Charlotte, NC. 28262 C: 803.389.8860 O: 704.988.5401 F: 704.988.3917 jslay@tiaa-cref.org ************************************************************************* This e-mail may contain confidential or privileged information. If you are not the intended recipient, please notify the sender immediately and then delete it. TIAA-CREF *************************************************************************
Subject: Re: [rt.cpan.org #90358] ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s)
Date: Mon, 18 Nov 2013 20:53:56 +1100
To: bug-ServiceNow-Simple [...] rt.cpan.org
From: Greg George <gregg [...] bigpond.net.au>
Hi Jay, Thanks for you update. I have limited access to systems behind a proxy. If you wouldn't mind, could you try without any proxy setting and with the environment variables undefined. Our system works with this configuration even thought I does not make sense to me. I see an error in the proxy setting in set_soap so have made a change (attached) I would appreciate it if you could also test that. I will also test this tomorrow. If this fails I will set up options as you describe worked for you. Other than that do you have any other feedback, other things you would like the module to do or other things that could be simpler? Regards Greg George On 15/11/2013 12:27 AM, Slay, Jay via RT wrote: Show quoted text
> Thu Nov 14 08:27:25 2013: Request 90358 was acted upon. > Transaction: Ticket created by JSlay@tiaa-cref.org > Queue: ServiceNow-Simple > Subject: ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s) > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: JSlay@tiaa-cref.org > Status: new > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=90358> > > > I am unable to connect to my instance using an http/https proxy. > > Using: perl 5, version 16, subversion 2 (v5.16.2) built for MSWin32-x64-multi-thread > > Code: > ## Get Records > ############## > my $sn = ServiceNow::Simple->new({ > instance => '<my_instance>'. > table => 'incident', > __print_results => 1, > }); > > my $results = $sn->get_records({ number => 'INC2246419'}); > > Returns: > 500 Can't connect to<my_instance>.service-now.com:443 (Bad hostname) at C:/Perl64/site/lib/ServiceNow/Simple.pm line 207. > > If I comment out the following two lines in Simple.pm: > > undef($ENV{HTTP_proxy}); > undef($ENV{HTTPS_proxy}) > > and explicitly set these in my code to the correct address of my proxy server(s), I have no issues connecting with the above code. > > I have tried setting proxy in the simple.cfg file as well as in the call to new(), however, it seems that is for a SOAP Endpoint proxy, not an http(s) proxy based on the code in Simple.pm around the following lines: > if ($self->{proxy}) > { > $args{https} = [ $self->{proxy} ]; > } > > $self->{soap} = SOAP::Lite->proxy($url, %args) > > > Regards, > > > Jay K. Slay > Sr. Engineer - Enterprise Systems Management > TIAA-CREF | Financial Services for the Greater Good > > 8825 Andrew Carnegie Blvd. F1-02 > Charlotte, NC. 28262 > C: 803.389.8860 > O: 704.988.5401 > F: 704.988.3917 > jslay@tiaa-cref.org > > ************************************************************************* > This e-mail may contain confidential or privileged information. > If you are not the intended recipient, please notify the sender immediately and then delete it. > > TIAA-CREF > ************************************************************************* > > >

Message body is not shown because sender requested not to inline it.

Subject: RE: [rt.cpan.org #90358] ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s)
Date: Mon, 18 Nov 2013 20:17:36 +0000
To: "bug-ServiceNow-Simple [...] rt.cpan.org" <bug-ServiceNow-Simple [...] rt.cpan.org>
From: "Slay, Jay" <JSlay [...] tiaa-cref.org>
Hi, On Linux (RHEL 5 64 bit): Not setting my proxy env vars results in a warning about trying to undef an uninitialized variable: Use of uninitialized value in undef operator at /usr/lib/perl5/site_perl/5.8.8/ServiceNow/Simple.pm line 572. You may want to use delete instead of undef if you really don’t want those environment variables in the picture. Personally, I feel like they should remain as they are the vars used by soap::Lite for proxy communications. You could simply set them to the value of the proxy key in your call to new (or from your central config file) Without any proxy variables set anywhere, I get the following: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><getRecords xmlns="http://www.service-now.com/"><number xsi:type="xsd:string">INC2247736</number></getRecords></soap:Body></soap:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x44288f0) SOAP::Transport::HTTP::Client::send_receive: 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket" Content-Type: text/plain Client-Date: Mon, 18 Nov 2013 20:07:38 GMT Client-Warning: Internal response Can't locate object method "new" via package "LWP::Protocol::https::Socket" at /usr/lib/perl5/site_perl/5.8.8/LWP/Protocol/http.pm line 31. SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket" at /usr/lib/perl5/site_perl/5.8.8/ServiceNow/Simple.pm line 297 This was using the version you sent me earlier. Once again, if I do keep my ENV vars for HTTP_proxy and HTTPS_proxy by commenting lines 572 and 573, I have no issues. Regards, Jay K. Slay Sr. Engineer - Enterprise Systems Management TIAA-CREF | Financial Services for the Greater Good 8825 Andrew Carnegie Blvd. F1-02 Charlotte, NC. 28262 C: 803.389.8860 O: 704.988.5401 F: 704.988.3917 jslay@tiaa-cref.org Show quoted text
-----Original Message----- From: Greg George via RT [mailto:bug-ServiceNow-Simple@rt.cpan.org] Sent: Monday, November 18, 2013 4:54 AM To: Slay, Jay Subject: Re: [rt.cpan.org #90358] ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s) <URL: https://rt.cpan.org/Ticket/Display.html?id=90358 > Hi Jay, Thanks for you update. I have limited access to systems behind a proxy. If you wouldn't mind, could you try without any proxy setting and with the environment variables undefined. Our system works with this configuration even thought I does not make sense to me. I see an error in the proxy setting in set_soap so have made a change (attached) I would appreciate it if you could also test that. I will also test this tomorrow. If this fails I will set up options as you describe worked for you. Other than that do you have any other feedback, other things you would like the module to do or other things that could be simpler? Regards Greg George On 15/11/2013 12:27 AM, Slay, Jay via RT wrote:
> Thu Nov 14 08:27:25 2013: Request 90358 was acted upon. > Transaction: Ticket created by JSlay@tiaa-cref.org > Queue: ServiceNow-Simple > Subject: ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s) > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: JSlay@tiaa-cref.org > Status: new > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=90358> > > > I am unable to connect to my instance using an http/https proxy. > > Using: perl 5, version 16, subversion 2 (v5.16.2) built for > MSWin32-x64-multi-thread > > Code: > ## Get Records > ############## > my $sn = ServiceNow::Simple->new({ > instance => '<my_instance>'. > table => 'incident', > __print_results => 1, > }); > > my $results = $sn->get_records({ number => 'INC2246419'}); > > Returns: > 500 Can't connect to<my_instance>.service-now.com:443 (Bad hostname) at C:/Perl64/site/lib/ServiceNow/Simple.pm line 207. > > If I comment out the following two lines in Simple.pm: > > undef($ENV{HTTP_proxy}); > undef($ENV{HTTPS_proxy}) > > and explicitly set these in my code to the correct address of my proxy server(s), I have no issues connecting with the above code. > > I have tried setting proxy in the simple.cfg file as well as in the call to new(), however, it seems that is for a SOAP Endpoint proxy, not an http(s) proxy based on the code in Simple.pm around the following lines: > if ($self->{proxy}) > { > $args{https} = [ $self->{proxy} ]; > } > > $self->{soap} = SOAP::Lite->proxy($url, %args) > > > Regards, > > > Jay K. Slay > Sr. Engineer - Enterprise Systems Management TIAA-CREF | Financial > Services for the Greater Good > > 8825 Andrew Carnegie Blvd. F1-02 > Charlotte, NC. 28262 > C: 803.389.8860 > O: 704.988.5401 > F: 704.988.3917 > jslay@tiaa-cref.org > > ********************************************************************** > *** This e-mail may contain confidential or privileged information. > If you are not the intended recipient, please notify the sender immediately and then delete it. > > TIAA-CREF > ********************************************************************** > *** > > >
************************************************************************* This e-mail may contain confidential or privileged information. If you are not the intended recipient, please notify the sender immediately and then delete it. TIAA-CREF *************************************************************************
Subject: Re: [rt.cpan.org #90358] ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s)
Date: Tue, 19 Nov 2013 21:03:06 +1100
To: bug-ServiceNow-Simple [...] rt.cpan.org
From: Greg George <gregg [...] bigpond.net.au>
Hi Jay, Thanks for your input. I will digest the data you sent. From our environment I get quite different responses, so I need to figure out why and how I can cater for both, preferably without the user needing to know. Appreciate your assistance. Greg On 19/11/2013 7:17 AM, Slay, Jay via RT wrote: Show quoted text
> Queue: ServiceNow-Simple > Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=90358> > > Hi, > > On Linux (RHEL 5 64 bit): > Not setting my proxy env vars results in a warning about trying to undef an uninitialized variable: > Use of uninitialized value in undef operator at /usr/lib/perl5/site_perl/5.8.8/ServiceNow/Simple.pm line 572. > > You may want to use delete instead of undef if you really don’t want those environment variables in the picture. Personally, I feel like they should remain as they are the vars used by soap::Lite for proxy communications. You could simply set them to the value of the proxy key in your call to new (or from your central config file) > > Without any proxy variables set anywhere, I get the following: > > <?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><getRecords xmlns="http://www.service-now.com/"><number xsi:type="xsd:string">INC2247736</number></getRecords></soap:Body></soap:Envelope> > SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x44288f0) > SOAP::Transport::HTTP::Client::send_receive: 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket" > Content-Type: text/plain > Client-Date: Mon, 18 Nov 2013 20:07:38 GMT > Client-Warning: Internal response > > Can't locate object method "new" via package "LWP::Protocol::https::Socket" at /usr/lib/perl5/site_perl/5.8.8/LWP/Protocol/http.pm line 31. > SOAP::Deserializer::deserialize: () > SOAP::Parser::decode: () > 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket" at /usr/lib/perl5/site_perl/5.8.8/ServiceNow/Simple.pm line 297 > > This was using the version you sent me earlier. > > Once again, if I do keep my ENV vars for HTTP_proxy and HTTPS_proxy by commenting lines 572 and 573, I have no issues. > > Regards, > > Jay K. Slay > Sr. Engineer - Enterprise Systems Management > TIAA-CREF | Financial Services for the Greater Good > > 8825 Andrew Carnegie Blvd. F1-02 > Charlotte, NC. 28262 > C: 803.389.8860 > O: 704.988.5401 > F: 704.988.3917 > jslay@tiaa-cref.org > > -----Original Message----- > From: Greg George via RT [mailto:bug-ServiceNow-Simple@rt.cpan.org] > Sent: Monday, November 18, 2013 4:54 AM > To: Slay, Jay > Subject: Re: [rt.cpan.org #90358] ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s) > > <URL: https://rt.cpan.org/Ticket/Display.html?id=90358> > > Hi Jay, > > Thanks for you update. I have limited access to systems behind a proxy. > > If you wouldn't mind, could you try without any proxy setting and with the environment variables undefined. Our system works with this configuration even thought I does not make sense to me. > > I see an error in the proxy setting in set_soap so have made a change > (attached) I would appreciate it if you could also test that. I will also test this tomorrow. > > If this fails I will set up options as you describe worked for you. > > Other than that do you have any other feedback, other things you would like the module to do or other things that could be simpler? > > Regards > Greg George > > > On 15/11/2013 12:27 AM, Slay, Jay via RT wrote:
>> Thu Nov 14 08:27:25 2013: Request 90358 was acted upon. >> Transaction: Ticket created by JSlay@tiaa-cref.org >> Queue: ServiceNow-Simple >> Subject: ServiceNow::Simple / Unable to connect via HTTPS Proxy Server(s) >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: JSlay@tiaa-cref.org >> Status: new >> Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=90358> >> >> >> I am unable to connect to my instance using an http/https proxy. >> >> Using: perl 5, version 16, subversion 2 (v5.16.2) built for >> MSWin32-x64-multi-thread >> >> Code: >> ## Get Records >> ############## >> my $sn = ServiceNow::Simple->new({ >> instance => '<my_instance>'. >> table => 'incident', >> __print_results => 1, >> }); >> >> my $results = $sn->get_records({ number => 'INC2246419'}); >> >> Returns: >> 500 Can't connect to<my_instance>.service-now.com:443 (Bad hostname) at C:/Perl64/site/lib/ServiceNow/Simple.pm line 207. >> >> If I comment out the following two lines in Simple.pm: >> >> undef($ENV{HTTP_proxy}); >> undef($ENV{HTTPS_proxy}) >> >> and explicitly set these in my code to the correct address of my proxy server(s), I have no issues connecting with the above code. >> >> I have tried setting proxy in the simple.cfg file as well as in the call to new(), however, it seems that is for a SOAP Endpoint proxy, not an http(s) proxy based on the code in Simple.pm around the following lines: >> if ($self->{proxy}) >> { >> $args{https} = [ $self->{proxy} ]; >> } >> >> $self->{soap} = SOAP::Lite->proxy($url, %args) >> >> >> Regards, >> >> >> Jay K. Slay >> Sr. Engineer - Enterprise Systems Management TIAA-CREF | Financial >> Services for the Greater Good >> >> 8825 Andrew Carnegie Blvd. F1-02 >> Charlotte, NC. 28262 >> C: 803.389.8860 >> O: 704.988.5401 >> F: 704.988.3917 >> jslay@tiaa-cref.org >> >> ********************************************************************** >> *** This e-mail may contain confidential or privileged information. >> If you are not the intended recipient, please notify the sender immediately and then delete it. >> >> TIAA-CREF >> ********************************************************************** >> *** >> >> >>
> > > ************************************************************************* > This e-mail may contain confidential or privileged information. > If you are not the intended recipient, please notify the sender immediately and then delete it. > > TIAA-CREF > ************************************************************************* > > >