503 Service unavailable error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2016 10:29 PM
Hello everyone,
We are using a custom perl solution to integrate Nagios monitoring tool with Service-now for ticketing. This has been tested successfully from clients on premise env. that creates and closes tickets, however when we try to create from client's cloud environment (AWS), it throws "503 Service Unavailable" error. We confirmed the URL is up and running. We use proxy to connect and verified the proxy settings are fine.
The error seems to occur during a SOAP call. Does this have anything to do with the Service-now end? If anyone has encountered similar issues, please throw some light on this.
Please find the SOAP call below
503 Service Unavailable at ./SNOW_tkt.pl line 310.
Line 310 my $soapReturn = $soapSnHandle->call($soapCommand => @soapParams);
Line 22 my ($strSysID, $soapCommand, @soapParams);
Line 180 $soapCommand = SOAP::Data->name('insert')->attr({xmlns => 'http://www.service-now.com/'});
Regards,
Ram
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2016 01:25 AM
As you are trying to access by client's on network the it might be a problem of network access. As service-now is open network and you are trying to acceess client network, it will not allowed. For these you need to use mid-server.
Please visit below link :
MID Server Installation - ServiceNow Wiki
Thanks,
Param
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2016 02:11 AM
Hi Paramveer,
Thanks for your response. Please find more details below
This issue seems to be more specific to how the SOAP call handles the proxy credentials.
We are using a perl ticketing script that uses SOAP calls to Create and Close tickets. This script works fine without proxy enabled, however with proxy enabled it throws "503 Service Unavailable" error.
.
.
Inserting 2 into severity.
503 Service Unavailable at ./SNOW_tkt.pl line 310.
Line 310: my $soapReturn = $soapSnHandle->call($soapCommand => @soapParams);
The portion of the script that returns $soapCommnd
$soapCommand = SOAP::Data->name('insert')->attr({xmlns => 'http://www.service-now.com/'});
This is the portion of the script that returns $soapSnHandle, if proxy is enabled (the proxy authentication details are referred from a config file by the script).
sub sn_connect {
# Connect to service-now, the proxy connection is very simple and only attempts basic auth.
# Note: Should probably find a way to test this handle... but it's proving difficult...
my $hrMainConf = shift;
my $strPage = shift;
my $soapSnHandle;
print "ppppp hrmainconf1 at the beginning= $hrMainConf \n";
if ($hrMainConf->{'main'}->{'enable_proxy'}) {
my $strProxyAuth = "";
if (defined $hrMainConf->{'proxy'}->{'proxy_username'}) {
$strProxyAuth = "$hrMainConf->{'proxy'}->{'proxy_username'}:$hrMainConf->{'proxy'}->{'proxy_password'}\@";
}
$soapSnHandle = SOAP::Lite -> proxy("https://$hrMainConf->{'servicenow'}->{'sn_username'}:$hrMainConf->{'servicenow'}->{'sn_password'}\@$...", proxy => ['https' => "http://$strProxyAuth$hrMainConf->{'proxy'}->{'proxy_address'}:$hrMainConf->{'proxy'}->{'proxy_port'}"]);
} else {
$soapSnHandle = SOAP::Lite -> proxy("https://$hrMainConf->{'servicenow'}->{'sn_username'}:$hrMainConf->{'servicenow'}->{'sn_password'}\@$...");
}
# snt_log("Service-Now SOAP handle created.");
return $soapSnHandle;
Need to know if SOAP calls need to be handled different from what you see here, if proxy is enabled. Please let me know if you need more information