Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to testproxy:8080

by bvani11 (Initiate)
on Jun 09, 2018 at 12:02 UTC ( [id://1216241]=perlquestion: print w/replies, xml ) Need Help??

bvani11 has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to run perl script to connect service-now and create incidents with below command. but I am receiving SOAP error while running the script SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to testproxy.com:8080
Please find debug output
perl -MSOAP::Lite=trace /usr/local/nagios/libexec/Eventhandler/sn_connect.pl
Config loaded. correlationid -> 1118 servicedowntime -> 0 page -> u_incident_interface.do serviceoutput -> test alert please ignore servicestatetype -> HARD service -> LIN_Server_Scheduler_Status servicestate -> CRITICAL description -> test alert please ignore host -> ppppp HASH(0 +x2baf118) SOAP::Transport::new: () SOAP::Serializer::new: () SOAP::Deserializer::new: () SOAP::Parser::new: () SOAP::Lite::new: () SOAP::Transport::HTTP::Client::new: () xxxxx HASH( +0x2baf118) Service-Now SOAP handle created. soap handle..: SOAP::Lite=HASH(0x2d14048) Ticket track enabled using database. State is CRITICAL,Creating new ticket Serviceoutput -> test alert please ignore Correlation Id -> 1118 Short description -> test alert please ignore Service Description in new block -> LIN_Server_Scheduler_Status Description -> LIN_Server_Scheduler_Status-test alert please ignore SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::DESTROY: () SOAP::Lite::call: () SOAP::Serializer::envelope: () SOAP::Serializer::envelope: SOAP::Data=HASH(0x2d13df0) SOAP::Data=HASH +(0x2d15918) SOAP::Data=HASH(0x3011b40) SOAP::Data=HASH(0x2d10510) SOA +P::Data=HASH(0x3011d38) SOAP::Data=HASH(0x2f80090) SOAP::Data=HASH(0x +2f80180) SOAP::Data=HASH(0x3018fe0) SOAP::Data=HASH(0x30194d8) SOAP:: +Data=HASH(0x3019730) SOAP::Data=HASH(0x31c46c0) SOAP::Data=HASH(0x31c +4780) SOAP::Data=HASH(0x2e07de0) SOAP::Data=HASH(0x2e07e58) SOAP::Dat +a=HASH(0x2e07f48) SOAP::Data=HASH(0x2e08038) SOAP::Data=HASH(0x2e0812 +8) SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x31cd +b60) SOAP::Transport::HTTP::Client::send_receive: POST https://srv_SOAPimpo +rt:testpwd@test.service-now.com/u_incident_interface.do?SOAP HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap Content-Length: 9370 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://www.service-now.com/#insert" <?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyl +e="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://sche +mas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap +.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml +ns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><insert + xmlns="http://www.service-now.com/"><category xsi:type="xsd:string"> +failure</category><subcategory xsi:type="xsd:string">software</subcat +egory><contact_type xsi:type="xsd:string">monitoring</contact_type><u +_business_service SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x325 +d1b8) SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to test +proxy:8080 Content-Type: text/plain Client-Date: Sat, 09 Jun 2018 10:02:00 GMT Client-Warning: Internal response Can't connect to testproxy:8080 SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Transport::DESTROY: () SOAP::Transport::HTTP::Client::DESTROY: ()
Could you please help on this issue ?
  • Comment on SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to testproxy:8080
  • Download Code

Replies are listed 'Best First'.
Re: SOAP::Transport::HTTP::Client::send_receive: 500 Can't connect to testproxy:8080
by NetWallah (Canon) on Jun 09, 2018 at 15:30 UTC
    HTTP error 500 AKA "Internal Server Error" is a server-side error.

    The good news is that the web server is receiving your SOAP request.
    The bad news is that the web server is rejecting it.

    The name "testproxy" is not a part of your request - it seems like some attempt at server-side redirect that is failing.

    It's time to talk to the web server administrator to figure out what is happening.

                    Memory fault   --   brain fried

      Thanks for the response. We have checked with service-now team. Nothing has been changed from their end. We have observed that in RHEL 6.9, the perl-libwww package has been updated to perl-libwww-perl-5.833-5. With this update LWP also updated. I am trying to run simple script to connect service-now and get records. Here is my code
      #!/usr/bin/perl -w use SOAP::Lite; use Data::Dumper; use Getopt::Long; use strict; use warnings; $ENV{https_proxy} = "http://myproxy.com:8080"; $ENV{HTTPS_PROXY} = "http://myproxy.com:8080"; sub SOAP::Transport::HTTP::Client::get_basic_credentials { return "k2soap" => "REDACTED"; #PROD } my $soap = SOAP::Lite -> proxy('https://usr_soap:pwd_soap@swe.service- +now.com/change_request.do?SOAP'); my $method = SOAP::Data->name('getRecords') ->attr({xmlns => 'https:// +www.service-now.com/'}); my @params = ( SOAP::Data->name(number => $ARGV[0]) ); print "Searching for Change Request... $soap and $method\n"; my $result = $soap->call($method => @params);
      We are receiving below error when we run script 500 handshakefailed at soap_connection.pl line 18. Could you please help on this error.
        This code looks incorrect:
        my $method = SOAP::Data->name('getRecords') ->att...
        In order to "get" the "name", you need an existing SOAP::Data object.
        I don't know what accessing that as a class method will get you.

        You should try to error check that .. as a minimum, ensure that $method is not undef.

        Error 500 is still a server-side error - so server-side web-server logs can also help identify the cause.

        If you can reproduce this problem using a 'curl' command, it may be easier to convince the server support people that the issue is on their side.

                        Memory fault   --   brain fried

      Client-Warning: Internal response

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1216241]
Approved by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found