Linux Container Migration Logos Missing

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

Hi @ianburrows.sa,

Thanks for reaching out.

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.

Please let me know what you find.

Thanks,
Jeremy

Hi @ianburrows.sa,

Depending on your version it may also be pathconfiguration-single.

Best,
Jeremy

Hi Jeremy,
We are using 2020.5.0 so it was pathconfiguration-single.
Here is what is in the DB:

{"ArtifactsDirectory":"Artifacts","PackagesDirectory":"Packages","TelemetryDirectory":"Telemetry","TaskLogDirectory":"TaskLogs","ClusterSharedDirectory":null,"Id":"pathconfiguration-single"}

I looked in the original Windows server (we are migrating to the Linux container) and I wasn’t able to find any logos there either but they work.

Best,
Ian

Hi Ian,

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?

Please let me know.

Thanks,
Jeremy

Hi Jeremy,
Yes they exist on both.
Regards,
Ian

Hey Ian,

Thanks for that.

I’m going to try and spin up a reproduction. Is there anything we may have missed that I should consider in the reproduction?

Would you be able to private message me your yaml and env files?

Thanks,
Jeremy

Hey Ian,

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.

Please let me know what you think.

Thanks,
Jeremy

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

Regards,
Ian

1 Like

Hey Ian,

You’re very welcome! Thanks so much for the update, I’m glad to hear you’ve got it going.

I hope you have a great weekend and please reach out if you hit any bumps in the future.

Best,
Jeremy