Processing GET to /api/communityactiontemplates/CommunityActionTemplates-219/logo: Object reference not set to an instance of an object

(Raf) #1

Hello

After migrating from 3.4.11 to 3.8.5 we can observe following error in the log file:

2017-02-07 11:30:31.3738 207 ERROR Unhandled exception from web server processing GET to http://servername/api/communityactiontemplates/CommunityActionTemplates-219/logo: Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Nancy.Responses.StreamResponse.<>c__DisplayClass1.b__0(Stream stream)
at Octopus.Server.Web.OctopusNancyHost.OutputWithDefaultTransferEncoding(Response nancyResponse, HttpListenerResponse response) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Web\OctopusNancyHost.cs:line 356
at Octopus.Server.Web.OctopusNancyHost.ConvertNancyResponseToResponse(NancyContext nancyRequest, Response nancyResponse, HttpListenerResponse response) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Web\OctopusNancyHost.cs:line 341
at Nancy.NancyEngineExtensions.HandleRequest(INancyEngine nancyEngine, Request request, Func2 preRequest, Action1 onComplete, Action`1 onError, CancellationToken cancellationToken)
at Octopus.Server.Web.OctopusNancyHost.Process(HttpListenerContext ctx) in Z:\buildAgent\workDir\eec88466c176b607\source\Octopus.Server\Web\OctopusNancyHost.cs:line 0

(Pawel Pabich) #2

Hi,

Thanks for getting in touch! Can you please go to https://your_octopus_server/app#/configuration/features, click Sync button and wait for the task to complete successfully? Then can you go and try again the same action that originally triggered the problem? If you still see the problem please let me know the name of the community templates that causes it.

Regards,

Pawel

(Raf) #3

Thanks Pawel,

After runnign sync manually I didn’t get any errors s will wait and see if we will get any of them tommorow and not sure what si triggering this sync.

Task ID: ServerTasks-102610
Task status: Success
Task queued: 08 February 2017 14:05
Task started: 08 February 2017 14:05
Task duration: 3 seconds
Server version: 3.8.5+Branch.master.Sha.c9850c544df8b59dfe77ddb3ad2c3aef3a802f58

                | Success: Synchronize Community Step Templates

14:05:29 Info | Running community library step templates sync…
14:05:29 Verbose | Downloading latest community templates from https://library.octopus.com/api/step-templates
14:05:29 Verbose | Using an exising Etag: "1e1c87-fyTMVJkatt6d7PVTbvw1Jg"
14:05:30 Info | Checking for library updates took: 00:00:00.8396313
14:05:30 Info | 0 community templates have been downloaded.
14:05:30 Info | There are no updates to community templates.
14:05:30 Info | Trying to link existing action templates to community step templates…
14:05:32 Info | Completed linkage of existing action templates to community step templates.

(Pawel Pabich) #4

Hi,

I’m glad it worked. The sync runs once every 24h in the background so in the future you don’t have to do anything manually.

Please, do let me know if you see this problem again.

Regards,

Pawel

(Raf) #5

Hi Pawel,

I dont see those errors mentioned in the initial thread hovwer i see a lot fo warnning now (attached) when it runs automatically.

Just run it manually and it works.

Running community library step templates sync…
February 9th 2017 09:03:36Info
Checking for library updates took: 00:00:00.7641829
February 9th 2017 09:03:36Info
0 community templates have been downloaded.
February 9th 2017 09:03:36Info
There are no updates to community templates.
February 9th 2017 09:03:36Info
Trying to link existing action templates to community step templates…
February 9th 2017 09:03:37Info
Completed linkage of existing action templates to community step templates.

I’m tryign to figure out why we have those warnning

errors.txt (6 KB)

(Pawel Pabich) #6

Hi,

Thank you for providing logs. From what I can see it looks like the logos of those two templates are missing but Octopus expects them to be available. Do you have an idea why they might not be there? Has the instance been migrated recently? Has the location of Artifacts folder changed?

The data is in inconsistent state so to solve your problem we need to provide those 2 missing logos. The following steps are the same for both templates and the only difference is the template name and the logo file.

  1. Execute Select Id from dbo.CommunityActionTemplate Where [Name] = 'AWS - Create Cloud Formation Stack' and remember the result, this is the name of the missing logo. It should look like this: ComunityStepTemplates-NUMBER
  2. Go to Artifacts folder and confirm there is no file with the name you found in the previous step. There should be plenty of other files that start with ComunityStepTemplates.
  3. Download AWS category logo from and save it with the name you found in step #1 in Artifacts folder. Note, the file should have no extension. Please use SQL category logo for the SSRS template

Now the sync process should not produce any warnings.

Please let me know how you go.

Regards,

Pawel

(Raf) #7

Hi Pawel,

I noticed that we no longer have error in the log:

ERROR Unhandled exception from web server processing GET to http://servername/api/communityactiontemplates/CommunityActionTemplates-219/logo: Object reference not set to an instance of an object.

but the sync task (attached) still have a lot of warnnings it seems that warnning affect many templates.
We;e also migrated the octopus to the new server and had to also repoint the folders in database:
UPDATE [dbo].[Configuration]
SET JSON = ‘{“ArtifactsDirectory”:“D:\Octopus\Artifacts”}’
WHERE Id = ‘artifactstorage-single’
I’ve alo synced the Artifcatcs folder content so which has just few files (Capture.png)

ServerTasks-103961.log.zip (5 KB)

Capture.PNG

(Pawel Pabich) #8

Hi,

Thank you for the logs. I spent a bit more time on this issue and it turned out that our migration process doesn’t export the logos of community step templates. I fixed that problem and made the community step templates sync a bit less strict so it can deal with missing logos. You can track the progress of this work here. It should be released within a week or so.

Please let me know if this doesn’t solve your problem.

Regards,

Pawel

(system) closed #9