Hi, I am using the linux container and successfully migrated the DB but the logos for the projects are missing with the following error:
2021-01-07 15:40:16.4900 1 47 ERROR Unhandled error on request: GET http://server/api/Spaces-1/projects/Projects-22/logo?cb=Projects-22-2020052606180226 0HM5J3UMPJG40:00000124 by admin : 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__DisplayClass2_0.<GetResponseBodyDelegate>b__0(Stream stream)
at Octopus.NancyOwin.NancyMiddleware.RequestComplete(NancyContext context, IDictionary`2 environment) in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Owin\NancyMiddleware.cs:line 164
at Octopus.NancyOwin.NancyMiddleware.<>c__DisplayClass3_0.<<UseNancy>b__1>d.MoveNext() in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Owin\NancyMiddleware.cs:line 107
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Owin.WebSocketAcceptAdapter.<>c__DisplayClass6_0.<<AdaptWebSockets>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Octopus.Server.Web.Middleware.OctopusClientOldVersionWarningMiddleware.InvokeAsync(HttpContext context, IAutomationContext automationContext) in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Web\Middleware\OctopusClientOldVersionWarningMiddleware.cs:line 38
at Octopus.Server.Web.Middleware.RequestLoggerMiddleware.InvokeAsync(HttpContext context) in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Web\Middleware\RequestLoggerMiddleware.cs:line 42
at Octopus.Server.Web.Middleware.ErrorHandlingMiddleware.InvokeAsync(HttpContext context, CorrelationId correlationId) in C:\buildAgent\work\f014c79b193351c2\source\Octopus.Server\Web\Middleware\ErrorHandlingMiddleware.cs:line 63
I have moved the Artifacts folder as well as the Packages.
Have I missed something?
Kind Regards,
Ian
Can you go into your database for Octopus and take a look at the Configuration table and see where the artifactestorage row is pointing toward? It may be pointing to the wrong mount location.
In your Windows server in the \Artifacts folder there should be something like Projects-81-2021010706423331 for a logo for a project. They won’t be actual images. Do those exist?
When you go to the mount point, do those same files exist?
I spent some time today and spun up docker connecting to an existing database on a windows VM and moved over the files and the icons showed up for me.
Here is my docker command: sudo docker run --interactive --detach --name OctopusDeploy --publish 1322:8080 --env ACCEPT_EULA="Y" --env DB_CONNECTION_STRING="Server=tcp:192.168.139.160\SQLEXPRESS,1433;Initial Catalog=Octopus;Persist Security Info=False;User ID=Jeremy2;Password=asdasdasdasdasd;MultipleActiveResultSets=False;Connection Timeout=30;ConnectRetryInterval=1;ConnectRetryCount=3;Min Pool Size=2" -v /tmp/Tasklogs:/tasklogs -v /tmp/Packages:/repository -v /tmp/Artifacts:/artifacts --env MASTER_KEY="masterkeywashere==" octopusdeploy/octopusdeploy:2020.5.2
Is there any issue with case sensitive folder names or anything? That was a mistake I made and once I moved the files to Artifacts instead of artifacts, the logos showed up.
Hi Jeremy,
I had the files in /home/octopus/.octopus/OctopusServer/Server/Artifacts/ and created /home/octopus/.octopus/OctopusServer/Server/artifacts/ and moved everything over ther but still no luck. Is that the correct location for the folders?
#EDIT#
Aah ok they need to be in the root not at the home! It works now. Thanks Jeremy