Unable to manage the distribution points for package: <Guid> … Object reference not set to an instance of an object.
search cancel

Unable to manage the distribution points for package: <Guid> … Object reference not set to an instance of an object.

book

Article ID: 158707

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

When attempting to run the Package Refresh, or Update Distribution Points, the schedule each package was failing to be built. The following warning (excerpt) was reflected in the NS logs:

 

Description: Unable to manage the distribution points for package: (b0b0fa67-6404-479c-d01c-2cac337ba58d)
System.NullReferenceException (Altiris.NS.StandardItems): Object reference not set to an instance of an object.

   at Altiris.NS.StandardItems.SoftwareDelivery.SWDSupport.SetupDirectoriesLocal(PackageItem pkgItem, String nsCapBinPath, String installPath, StringCollection codebaseUrls, String pkgAccessUserName)
   at Altiris.NS.StandardItems.SoftwareDelivery.SWDSupport.ManageDistributionPoints(PackageItem pkgItem)

Exception logged from:
   at Altiris.Diagnostics.Logging.EventLog.ReportException(Int32 severity, String strMessage, String category, Exception exception, String footer)
   at Altiris.NS.Logging.EventLog.ReportException(Int32 severity, String strMessage, String category, Exception exception)
   at Altiris.NS.StandardItems.SoftwareDelivery.SWDSupport.ManageDistributionPoints(PackageItem pkgItem)
   at Altiris.NS.StandardItems.SoftwareDelivery.DistributionPointManager.ManageDistributionPoints()
   at Altiris.NS.StandardItems.SoftwareDelivery.DistributionPointManager.OnSchedule(String identifier)
   at Altiris.NS.Scheduling.ScheduleService.ProcessScheduleImpl(String scheduleId, CodeProfiler cp, SecurityContext owner, Guid guid)
   at Altiris.NS.Scheduling.ScheduleService.<>c__DisplayClass4.<ProcessSchedule>b__0(SecurityContext owner)
   at Altiris.NS.Security.SecurityContext.ExecuteAsOwner(Guid itemGuid, Boolean useAppIdentityIfNoOwnerFound, Action`1 action)
   at Altiris.NS.Scheduling.ScheduleService.ProcessSchedule(String scheduleId)
   at Altiris.NS.Scheduling.ScheduleService.ProcessScheduleWithCleanup(String scheduleId, Boolean deleteMissingSchedule)
   at Altiris.Diagnostics.RemoteControl.ScheduleServiceProxy.ProcessScheduleImpl(String scheduleId, Boolean throwOnError)
   at Altiris.Diagnostics.RemoteControl.ScheduleServiceProxy.ProcessScheduleThreadProc(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at Altiris.Diagnostics.RemoteControl.ScheduleServiceProxy.ProcessSchedule(String scheduleId, Boolean async)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
   at System.Runtime.Remoting.Messaging.ServerObjectTerminatorSink.SyncProcessMessage(IMessage reqMsg)
   at System.Runtime.Remoting.Lifetime.LeaseSink.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Messaging.ServerContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
   at System.Runtime.Remoting.Channels.CrossContextChannel.SyncProcessMessageCallback(Object[] args)
   at System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)
   at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
   at System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
   at System.Runtime.Remoting.MetadataServices.SdlChannelSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
   at System.Runtime.Remoting.Channels.Tcp.TcpServerTransportSink.ServiceRequest(Object state)
   at System.Runtime.Remoting.Channels.SocketHandler.ProcessRequestNow()
   at System.Runtime.Remoting.Channels.SocketHandler.BeginReadMessageCallback(IAsyncResult ar)
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CaptureOrComplete(ExecutionContext& cachedContext, Boolean returnContext)
   at System.Net.ContextAwareResult.FinishPostingAsyncOp(CallbackClosure& closure)
   at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, SocketError& errorCode, AsyncCallback callback, Object state)
   at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
   at System.Runtime.Remoting.Channels.SocketStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
   at System.Runtime.Remoting.Channels.SocketHandler.BeginReadMessage() 

Environment

Symantec Management Platform 7.x, 8.x

Cause

During the process of building download codebases for packages the method expects to be able to call “http” and “https” then concatenate the server’s host name followed by “/Altirs/PackageShare”

 The following is an example what might be returned behind the scene:

 http://smpserver.example.org/Altiris/PackageShare

https:/ smpserver.example.org/Altiris/PackageShare

 In this case http was returned but https could not be created because it had been removed from the “bindings” list in the Default Web Site. As a result, since the process doesn’t test for a NULL value but is expecting a non NULL value it throws the error:

Object reference not set to an instance of an object.


To test if this is the problem perform the following steps:

1.    Download the file attached to this article (GetPackageWebUrls.zip) and extract the contents into a folder of choice (example will be c:\temp) 

2.    Open a DOS command prompt and change to “C:\Program Files\Altiris\Notification Server\bin”  Note if the platform is installed to a volume different than C: then replace it for the correct drive designation. 

3.    Run the following command:   Nscript “c:\temp\GetPackageWebUrls.cs”

4.    If you see an error similar to the following then the condition is confirmed: 

http://smpserver.example.org/Altiris/PackageShare 

* The script threw an exception.

Message: Object reference not set to an instance of an object. 

Stack Trace:

============

   at WebUrls.Main(String[] args) 

            Note: if the error is the same then you can see that http returned the proper string, but https resulted in an error.

 

Resolution

In IIS Manager, under the Default Web Site, select the “Bindings..” link (far right pane) and make sure that http 80 and https 443 are both added.

If any changes are made then finsh by running IISRESET and by restarting the Altiris Service.

Attachments

GetPackageWebUrls.zip get_app