This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Perl REST - CustomProperty Set/Update Failing

This was working fine until July 7th. ? Anyway, I have been looking at this for hours now and can’t find the problem…..

Here is my function that I use to call the update:

sub orion_UpsertNodesCustomProperties() {

        my ( $self, $SWServer, $NodeID, $NodesCustomProperties ) = @_;

        if ( $NodeID * 1 > 0 ) {

            my $swhostname = $SWServer->{OrionServer}; # fill in a hostname

            my $swport     = $SWServer->{JSONPort};

            my $swprotocol = $SWServer->{Protocol};

            my $SWCredentials =

$self->get_credentials( $SWServer->{CredentialSetName} );

            my $username = $SWCredentials->{username};

            my $password =

$self->decrypt_password( $SWCredentials->{password} );

            #####

#servername:17778/.../CustomProperties

            my @elements = split( /\./, $swhostname );

            my $swhostname2 = $elements[0];

            my $uri =

"https://$swhostname:$swport/SolarWinds/InformationService/v3/Json/swis://$swhostname/Orion/Orion.Nodes/NodeID=$NodeID/CustomProperties";

            my $rest = REST::Client->new();

#$rest->setTimeout(5);

            #my $hostname = $self->orion_ip;

$rest->getUseragent()->proxy( ['https'] );

            my $headers = {

Authorization => 'Basic '

                  . MIME::Base64::encode_base64( $username . ':' . $password ),

                'Content-Type' => 'application/json'

            };

            my $json      = JSON->new->allow_nonref->utf8;

            my $json_text = $json->encode($NodesCustomProperties);

            print Dumper $json_text;

            #my $json_text = $json->space_after->encode({ 'Comments' => 'Testing' });

            my $response = $rest->POST( $uri, $json_text, $headers );

            print Dumper $response;

            while ( $response =~ m/Connect failed/ ) {

sleep(2);

                $response = $rest->POST( $uri, $json_text, $headers );

            }

            my $JSONResults = "";

            eval { $JSONResults = $json->decode( $rest->responseContent ); };

            #my @Results = ();

            return ($JSONResults);

        }

        else {

            printf( "ERROR: This is not a valid node id: %s\n", $NodeID );

            return (undef);

        }

    }

*****************************************************************************************************************************************************

Here is debug and error info:

Node 6091 does have custom properties...  I shall update them.

$VAR1 = '{"TNSDivision":"POS","City":"Lincoln","TNSCustomerDeviceName":"","TNSDeviceStatus":"Operational","TNSDeviceTicketID":"USDEV0000053908","State":"NE","TNSCustomer":"NETS","TNSOperationalOwner":"","TNSDeviceManufacturer":"JBM","TNSRegion":"Americas","TNSDeviceModel":"A2301","TNSSoakPeriodEndDate":"2013-05-09T09:34:06-04:00","TNSSiteID":"","TNSMonitoringProfile":"Ping Loopback 5 min and Ping Static IP","TNSSponsoredby":"","Region":"Region 1","TNSInstallType":"Customer Device","TNSDivision_Reporting":"Payments","TNSProduct":"TNSLink","TNSDeviceType":"IP-VPNR","TNSLastModifiedDate":"2015-01-21T19:43:33","TNSRefreshDate":"","Post_ZIP":"68516","TNSUserDefined2":"","TNSUserDefined3":"","TNSUserDefined1":"","Country":"USA","TNSCustomerSite":"nwr-s1","TNSSubDivision":"POS","TNSACNA":"NWR","TNSService":"ATMLink-WirelessVPN"}';

$VAR1 = bless( {

'_config' => {

                                'useragent' => bless( {

'max_redirect' => 7,

                                                        'ssl_opts' => {

'verify_hostname' => 0

},

                                                        'protocols_forbidden' => undef,

'show_progress' => undef,

'handlers' => {

                                                                        'response_header' => bless( [

{

'owner' => 'LWP::UserAgent::parse_head',

'callback' => sub { "DUMMY" },

'm_media_type' => 'html',

'line' => '/home/autoeng/lib/perl5/LWP/UserAgent.pm:684'

}

], 'HTTP::Config' )

},

'no_proxy' => [],

'protocols_allowed' => undef,

'local_address' => undef,

'use_eval' => 1,

'requests_redirectable' => [

                                                                                     'GET',

'HEAD'

],

'timeout' => 300,

'def_headers' => bless( {

'user-agent' => 'REST::Client/272'

                                                                                }, 'HTTP::Headers' ),

'proxy' => {},

'max_size' => undef

                                                      }, 'LWP::UserAgent' )

},

'_res' => bless( {

                                    '_protocol' => 'HTTP/1.1',

                                    '_content' => '{"Message":"Object reference not set to an instance of an object.","ExceptionType":"System.NullReferenceException","FullException":"System.NullReferenceException: Object reference not set to an instance of an object.\\u000d\\u000a   at SolarWinds.InformationService.Core.SwisUriResolver.BuildQuery(IEnumerable`1 uris, Dictionary`2 queryParameters, IEnumerable`1 properties)\\u000d\\u000a   at SolarWinds.InformationService.Core.SwisUriResolver.<Resolve>d__15.MoveNext()\\u000d\\u000a   at SolarWinds.InformationService.Core.CrudProcessor.<ResolveAndPackQueryResultsForUpdate>d__44.MoveNext()\\u000d\\u000a   at SolarWinds.InformationService.Core.CrudProcessor.UpdateInternal(Boolean bulkMode, SwisUriResolver uriResolver, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)\\u000d\\u000a at SolarWinds.InformationService.Core.CrudProcessor.Update(IServiceHost serviceHost, SwisUri uri, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)\\u000d\\u000a at SolarWinds.InformationService.Core.InformationService.Update(String uri, IDictionary`2 propertiesToUpdate)"}',

                                    '_rc' => '400',

                                    '_headers' => bless( {

'client-response-num' => 1,

'date' => 'Tue, 21 Jul 2015 17:43:40 GMT',

'client-ssl-cert-issuer' => '/CN=SolarWinds-Orion',

                                                           'client-ssl-cipher' => 'ECDHE-RSA-AES256-SHA384',

'client-peer' => '10.64.223.171:17778',

'content-length' => '1083',

'::std_case' => {

'client-date' => 'Client-Date',

'client-ssl-warning' => 'Client-SSL-Warning',

'client-response-num' => 'Client-Response-Num',

                                                                             'client-ssl-cert-subject' => 'Client-SSL-Cert-Subject',

'client-ssl-cert-issuer' => 'Client-SSL-Cert-Issuer',

'client-ssl-cipher' => 'Client-SSL-Cipher',

'client-peer' => 'Client-Peer',

'client-ssl-socket-class' => 'Client-SSL-Socket-Class'

},

'client-date' => 'Tue, 21 Jul 2015 17:43:40 GMT',

'client-ssl-warning' => 'Peer certificate not verified',

'content-type' => 'application/json',

                                                           'client-ssl-cert-subject' => '/CN=SolarWinds-Orion',

'server' => 'Microsoft-HTTPAPI/2.0',

'client-ssl-socket-class' => 'Net::SSL'

}, 'HTTP::Headers' ),

                                    '_msg' => 'Bad Request',

                                    '_request' => bless( {

                                                           '_content' => '{"TNSDivision":"POS","City":"Lincoln","TNSCustomerDeviceName":"","TNSDeviceStatus":"Operational","TNSDeviceTicketID":"USDEV0000053908","State":"NE","TNSCustomer":"NETS","TNSOperationalOwner":"","TNSDeviceManufacturer":"JBM","TNSRegion":"Americas","TNSDeviceModel":"A2301","TNSSoakPeriodEndDate":"2013-05-09T09:34:06-04:00","TNSSiteID":"","TNSMonitoringProfile":"Ping Loopback 5 min and Ping Static IP","TNSSponsoredby":"","Region":"Region 1","TNSInstallType":"Customer Device","TNSDivision_Reporting":"Payments","TNSProduct":"TNSLink","TNSDeviceType":"IP-VPNR","TNSLastModifiedDate":"2015-01-21T19:43:33","TNSRefreshDate":"","Post_ZIP":"68516","TNSUserDefined2":"","TNSUserDefined3":"","TNSUserDefined1":"","Country":"USA","TNSCustomerSite":"nwr-s1","TNSSubDivision":"POS","TNSACNA":"NWR","TNSService":"ATMLink-WirelessVPN"}',

'_uri' => bless( do{\(my $o = 'https://asbwpnmsswp01.win2k.corp.tnsi.com:17778/SolarWinds/InformationService/v3/Json/swis://asbwpnmsswp01.win2k.corp.tnsi.com/Orion/Orion.Nodes/NodeID=6091/CustomProperties')}, 'URI::https' ),

'_headers' => bless( {

'user-agent' => 'REST::Client/272',

'content-type' => 'application/json',

                                                                                  'content-length' => 824,

'::std_case' => {

'if-ssl-cert-subject' => 'If-SSL-Cert-Subject'

},

'authorization' => 'Basic YXV0b2JvdG9yaW9uOk1lZUZhSDAwY2g6

'

}, 'HTTP::Headers' ),

'_method' => 'POST',

'_uri_canonical' => $VAR1->{'_res'}{'_request'}{'_uri'}

}, 'HTTP::Request' )

                                  }, 'HTTP::Response' )

               }, 'REST::Client' );

Update WorldMap.Point entry in the database

Deciding whether or not to manage device nwr37127v...

Deciding what to do with Manage/Unmanage automatically

Everything else checks out, so it's all about DeviceStatus...

Device USDEV0000053908 nwr37127v is of Device Status of Operational - No change as per Hasmukh Patel 4/29/2015.

Determined a managed state of >NoChange< for NodeID 6091

[autoeng@rstlcnscweb01 OrionIntegration]$

  • What version of the product are you on? This was broken in NPM 11.5 and fixed in NPM 11.5 Service Release 2.

  • This was working for almost 2 months before I started getting this error. Here is my version details.

    Orion Platform Details

    Server

    Web ServerASBWPNMSSWP01
    Operating SystemWindows Server 2012 R2
    OS Version6.3.9600.0
    Service PackNone

    Network Elements

    Total Count38534
    Nodes9687
    Interfaces28082
    Volumes765

    Version Info

    AccountLimitationBuilder.exe2015.01
    AlertingEngine.exe2015.1.0.0
    AlertManager.exe2015.01
    AntiXSSLibrary.dll4.2.0.0
    Antlr3.Runtime.dll3.1.0.39271
    Antlr3.Utility.dll0.1.0.39272
    BasicAlertsManager.exe2015.01
    Castle.Core.dll3.3.0.2287
    Castle.Windsor.dll3.3.0.2412
    ConfigurationWizard.exe2015.1.5500.2341
    Database-Maint.exe2015.1.5500.2341
    DatabaseManager.exe2015.1.5500.2341
    DotNetOpenAuth.Core.dll4.3.4.13329
    DotNetOpenAuth.OAuth2.Client.dll4.3.4.13329
    DotNetOpenAuth.OAuth2.ClientAuthorization.dll4.3.4.13329
    DotNetOpenAuth.OAuth2.dll4.3.4.13329
    EntityFramework.dll6.0.21010.0
    EntityFramework.SqlServer.dll6.0.21010.0
    EO.Pdf.dll5.0.34.2
    ExportToPDFCmd.Exe2015.1.5500.2341
    HtmlSanitizationLibrary.dll4.2.0.0
    ICSharpCode.SharpZipLib.dll0.85.5.452
    Infragistics2.Shared.v7.3.dll7.3.20073.38
    InstallHelper.RunOnce.exe2015.1.5500.2341
    Interop.cdosys.dll1.0.0.0
    Interop.COMAdmin.dll1.0.0.0
    Interop.NetFWTypeLib.dll1.0.0.0
    Interop.olelib.dll1.61.0.0
    Interop.OrionSWScheduler8.dll1.0.0.0
    Interop.SHDocVw.dll1.1.0.0
    Interop.TaskScheduler.dll1.0.0.0
    Kiwi_LogViewer_2.1.0_Win32.setup.exeUnknown
    LicenseManager.exe3.0.0.658
    log4net.dll1.2.10.0
    LogAdjuster.exe2015.1.5500.2341
    makecert.exe6.1.7600.16385 (win7_rtm.090713-1255)
    Microsoft.Web.Services3.dll3.0.5305.0
    MomConnectorFrameworkV2.dll5.0.2749.0
    NetPerfMonEventLog.dll6.0.0.0
    Newtonsoft.Json.dll4.5.11.15520
    nsoftware.IPWorksSSNMP.dll9.0.5077.0
    OptimizeWebsite.exe2015.1.5500.2341
    OrionAlertEngine.exe2015.01
    OrionNPMMapEngine.dll2015.01
    OrionPermissionChecker.exe2015.1.5500.2341
    OrionReportWriter.exe2015.01
    OrionSWDiscoveryServices9.dll2015.01
    OrionSWLogger.dll2015.01
    OrionSWScheduler8.dll2015.01
    OrionWeb.dll2015.1.5500.2341
    phantomjs.exe1.9.2
    PollerCheckerTool.exe2015.1.5500.2341
    PrintLauncher.exe2015.1.5500.2341
    RegAsm.exe4.0.30319.18408 built by: FX451RTMGREL
    SciLexer.dll3.0.4
    SciLexer64.dll3.0.4
    ScintillaNet.dll2.5.0.0
    SmartThreadPool.dll2.0.0.0
    SnmpWalk.exe2011.2.0.0
    SolarWinds.AgentManagement.Contract.dll1.1.0.1082
    SolarWinds.Alerting.Service.exe2015.1.5500.2341
    SolarWinds.BusinessLayerHost.Contract.dll2015.1.5500.2341
    SolarWinds.BusinessLayerHost.exe2015.1.5500.2341
    SolarWinds.BusinessLayerHostx64.exe2015.1.5500.2341
    SolarWinds.Cirrus.IS.Client.dll7.3.12.45
    SolarWinds.Collector.Contract.dll2.11.0.179
    SolarWinds.Common.dll2015.1.5500.2341
    Solarwinds.Compression.dll2015.1.5500.2341
    SolarWinds.ConfigurationWizard.Common.dll2015.1.5500.2341
    SolarWinds.ConfigurationWizard.IIS7.dll2015.1.5500.2341
    SolarWinds.ConfigurationWizard.IIS7.Installer.exe2015.1.5500.2341
    SolarWinds.ConfigurationWizard.Permissions.dll2015.1.5500.2341
    SolarWinds.ConfigurationWizard.Plugin.Common.dll2015.1.5500.2341
    SolarWinds.ConfigurationWizard.Plugin.IpSla.dll4.2.0.1000
    SolarWinds.ConfigurationWizard.Plugin.NetFlow.dll4.1.0.591
    SolarWinds.ConfigurationWizard.Plugin.NPM.dll11.5.5.3678
    SolarWinds.ConfigurationWizard.Plugin.OIP.dll2.3.469.0
    SolarWinds.ConfigurationWizard.Plugin.Orion.dll2015.1.5500.2341
    SolarWinds.ConfigurationWizard.Plugin.Toolset.dll11.0.1.1190
    SolarWinds.ConfigurationWizard.Plugin.VIM.dll2.0.0.1157
    SolarWinds.DatabaseManager.Strings.dll2015.1.5500.2341
    SolarWinds.DataGap.AnalysisTool.exe2015.1.5500.2341
    SolarWinds.Diagnostics.DBResponse.exe2015.1.5500.2341
    SolarWinds.FipsManager.exe2015.1.5500.2341
    SolarWinds.InformationService.Contract2.dll2015.1.0.187
    SolarWinds.Internationalization.dll2015.1.5500.2341
    SolarWinds.JobEngine.Contract.dll1.6.0.28
    SolarWinds.JobEngine.Contract2.dll2.9.0.255
    SolarWinds.Licensing.Analysis.dll3.0.0.658
    SolarWinds.Licensing.Diagnostics.exe3.0.0.658
    SolarWinds.Licensing.Framework.dll3.0.0.658
    SolarWinds.Logging.dll2015.1.5000.303
    SolarWinds.Management.dll2015.1.5500.2341
    SolarWinds.NCM.AlertAction.dll7.3.12.45
    SolarWinds.NCM.BusinessLayerPlugin.dll1.0.1.0
    SolarWinds.NCM.Contracts.dll7.3.12.45
    SolarWinds.NCM.RTNForwarder.exe7.3.12.45
    SolarWinds.Net.ICMP.dll2015.1.5500.2341
    SolarWinds.Net.SNMP.dll2015.1.5500.2341
    SolarWinds.Net.WMI.dll2015.1.5500.2341
    SolarWinds.Netflow.Common.dll4.1.0.591
    SolarWinds.Netflow.FastBit.Client.dll4.1.0.591
    SolarWinds.Netflow.FastBit.Contract.dll4.1.0.591
    SolarWinds.Netflow.Installer.Common.dll4.1.0.591
    SolarWinds.Netflow.Strings.dll4.1.0.591
    SolarWinds.Netflow.Utils.dll4.1.0.591
    SolarWinds.NTM.Common.dll2.1.1.383
    SolarWinds.NTM.Data.dll2.1.1.383
    SolarWinds.NTM.Discovery.dll2.1.1.383
    SolarWinds.NTM.Topology.dll2.1.1.383
    SolarWinds.Orion.Collector.MessagePlugin.dll2015.1.5500.2341
    SolarWinds.Orion.Collector.Plugins.dll2015.1.5500.2341
    SolarWinds.Orion.Common.dll2015.1.5500.2341
    SolarWinds.Orion.CommonHelper.Interop.dll1.0.0.0
    SolarWinds.Orion.Core.Actions.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Alerting.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Alerting.Plugins.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Auditing.dll2015.1.5500.2341
    SolarWinds.Orion.Core.BusinessLayer.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Collector.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Collector.MessageSender.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Common.dll2015.1.5500.2341
    Solarwinds.Orion.Core.Data.dll2015.1.5500.2341
    Solarwinds.Orion.Core.Database.dll1.0.0.0
    Solarwinds.Orion.Core.Dependencies.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Discovery.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Jobs.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Jobs2.dll2015.1.5500.2341
    SolarWinds.Orion.Core.MessageActions.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Models.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Pollers.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Reporting.dll2015.1.5500.2341
    SolarWinds.Orion.Core.SharedCredentials.dll2015.1.5500.2341
    SolarWinds.Orion.Core.Strings.dll2015.1.5500.2341
    SolarWinds.Orion.Core.SwisViaCOM.dll1.0.0.0
    SolarWinds.Orion.Core.Topology.dll2015.1.0.23
    SolarWinds.Orion.Discovery.Contract.dll2015.1.5500.2341
    SolarWinds.Orion.Discovery.Framework.dll2015.1.5500.2341
    SolarWinds.Orion.Discovery.Job.dll2015.1.5500.2341
    SolarWinds.Orion.FeatureManager.Interop.dll1.0.0.0
    SolarWinds.Orion.I18n.Interop.dll1.0.0.0
    SolarWinds.Orion.MacroProcessor.dll2015.1.0.0
    SolarWinds.Orion.NCM.Security.dll7.3.12.45
    SolarWinds.Orion.Packages.dll1.0.0.57
    SolarWinds.Orion.Pollers.Framework.dll2015.1.5500.2341
    SolarWinds.Orion.Security.dll2015.1.5500.2341
    SolarWinds.Orion.Topology.Calculator.exe2015.1.5500.2341
    SolarWinds.Orion.Topology.Framework.dll2015.1.0.23
    SolarWinds.Orion.Web.Integration.Common.dll2015.1.5500.2341
    SolarWinds.Orion.Web.Integration.dll2015.1.5500.2341
    SolarWinds.OrionScheduler2.dll2015.1.5500.2341
    SolarWinds.Packaging.Contract.dll1.0.0.57
    SolarWinds.Packaging.Core.dll1.0.0.57
    SolarWinds.PollerChecker.Contract.dll2015.1.5500.2341
    SolarWinds.PollerChecker.dll2015.1.5500.2341
    SolarWinds.PollerChecker.Plugin.Core.dll2015.1.5500.2341
    SolarWinds.PollerChecker.Plugin.PollerChecker.dll2015.1.5500.2341
    SolarWinds.Reporting.dll2015.1.5500.2341
    SolarWinds.Security.Cryptography.X509Certificates.dllUnknown
    SolarWinds.Security.Cryptography.X509Certificates.x64.dllUnknown
    SolarWinds.Shared.dll2015.1.5500.2341
    SolarWinds.Syslog.dll2013.2.0.1
    SolarWinds.Syslog.Strings.dll2013.2.0.1
    SolarWinds.WebLauncher.exe2015.1.5500.2341
    SolarwindsDiagnostics.exe2015.1.5500.2341
    StopNetPerfMon.exe2015.1.5500.2341
    SWAlertActions8.dll2015.01
    SWAlertEngine8.dll2015.01
    SWSubClass.dll2015.01
    SWSysLogActions.dll2015.01
    SWTrapActions.dll2015.01
    SWTrapService.exe2015.1.5500.2341
    SyslogService.exe2015.1.5500.2341
    SyslogViewer.exe2015.01
    taskschd.dll6.0.6001.18000 (longhorn_rtm.080118-1840)
    tdbgpp8.dll8.0.20034.14
    TDBWSnk6.dll5.00.0020
    TestAlerts.exe2015.01
    todgub8.dll8.0.20034.18
    TrapViewer.exe2015.01
    Vim25Service.dll0.0.0.0
    Vim25Service.XmlSerializers.dll0.0.0.0
    VimService.dll0.0.0.0
    VimService.XmlSerializers.dll0.0.0.0
  • Here is the message back in a little cleaner format.

    $VAR1 = {

              'FullException' => 'System.NullReferenceException: Object reference not set to an instance of an object.

       at SolarWinds.InformationService.Core.SwisUriResolver.BuildQuery(IEnumerable`1 uris, Dictionary`2 queryParameters, IEnumerable`1 properties)

       at SolarWinds.InformationService.Core.SwisUriResolver.<Resolve>d__15.MoveNext()

       at SolarWinds.InformationService.Core.CrudProcessor.<ResolveAndPackQueryResultsForUpdate>d__44.MoveNext()

       at SolarWinds.InformationService.Core.CrudProcessor.UpdateInternal(Boolean bulkMode, SwisUriResolver uriResolver, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)

       at SolarWinds.InformationService.Core.CrudProcessor.Update(IServiceHost serviceHost, SwisUri uri, IDictionary`2 propertiesToUpdate, IQueryExecutionContext context)

       at SolarWinds.InformationService.Core.InformationService.Update(String uri, IDictionary`2 propertiesToUpdate)',

              'Message' => 'Object reference not set to an instance of an object.',

              'ExceptionType' => 'System.NullReferenceException'

            };

  • I will also note that this node has a entry in the CustomProperties table, I am only updating them not creating them.

  • From these version numbers I can see that you are running NPM 11.5 RTM. The specific error you are seeing is a known issue in that version. I don't know how it could have worked for the prior two months if that's the version you were running then as well.

    The solution is to upgrade to NPM 11.5 SR2.

  • Which one to I apply:

    Orion Network Performance Monitor SL100-11.5.2 or Orion Network Performance Monitor SLX-11.5.2 ?