Squidex do not launch in Docker on Ubuntu 20.04 but do on macOS

I have…

I’m submitting a…

  • [ ] Regression (a behavior that stopped working in a new release)
  • [x ] Bug report
  • [ ] Performance issue
  • [ ] Documentation issue or request

Current behavior

The squidex container stops with the following error :

Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlClient, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Data.SqlClient, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly assemblyContext, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
   at McMaster.NETCore.Plugins.Loader.AssemblyLoadContextBuilder.PreferDefaultLoadContextAssembly(AssemblyName assemblyName)
   at McMaster.NETCore.Plugins.Loader.AssemblyLoadContextBuilder.PreferDefaultLoadContextAssembly(AssemblyName assemblyName)
   at McMaster.NETCore.Plugins.Loader.AssemblyLoadContextBuilder.PreferDefaultLoadContextAssembly(AssemblyName assemblyName)
   at McMaster.NETCore.Plugins.Loader.AssemblyLoadContextBuilder.PreferDefaultLoadContextAssembly(AssemblyName assemblyName)
   at McMaster.NETCore.Plugins.Loader.AssemblyLoadContextBuilder.PreferDefaultLoadContextAssembly(AssemblyName assemblyName)
   at McMaster.NETCore.Plugins.Loader.AssemblyLoadContextBuilder.PreferDefaultLoadContextAssembly(AssemblyName assemblyName)
   at McMaster.NETCore.Plugins.PluginLoader.CreateLoadContextBuilder(PluginConfig config)
   at McMaster.NETCore.Plugins.PluginLoader..ctor(PluginConfig config)
   at McMaster.NETCore.Plugins.PluginLoader.CreateFromAssemblyFile(String assemblyFile, Action`1 configure)
   at Squidex.Infrastructure.Plugins.PluginLoaders.LoadPlugin(String pluginPath, AssemblyName[] sharedAssemblies)
   at Squidex.Infrastructure.Plugins.PluginManager.Load(String path, AssemblyName[] sharedAssemblies) in /src/src/Squidex.Infrastructure/Plugins/PluginManager.cs:line 44
   at Squidex.Pipeline.Plugins.PluginExtensions.AddSquidexPlugins(IMvcBuilder mvcBuilder, IConfiguration config) in /src/src/Squidex/Pipeline/Plugins/PluginExtensions.cs:line 48
   at Squidex.Config.Web.WebServices.AddSquidexMvcWithPlugins(IServiceCollection services, IConfiguration config) in /src/src/Squidex/Config/Web/WebServices.cs:line 93
   at Squidex.Startup.ConfigureServices(IServiceCollection services) in /src/src/Squidex/Startup.cs:line 45
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.MethodInfoExtensions.InvokeWithoutWrappingExceptions(MethodInfo methodInfo, Object obj, Object[] parameters)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Squidex.Program.Main(String[] args) in /src/src/Squidex/Program.cs:line 23
Aborted (core dumped) 

Expected behavior

Squidex launching normally

Minimal reproduction of the problem

Environment

  • [ x] Self hosted with docker
  • [ ] Self hosted with IIS
  • [ ] Self hosted with other version
  • [ ] Cloud version

Version: [5.3.0]

Browser:

  • [ ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [ ] Edge

Others:
Host is Ubuntu 20.04
Docker Compose :

volumes:
 mongo:
networks:
  common:
    external: true
  internal:
    external: false
services:
  mongo:
    image: mongo:4
    volumes:
      - mongo:/data/db
    expose:
      - 27017
    networks:
      - internal
  squidex:
    image: squidex/squidex:5.3.0
    expose:
      - 80
    environment:
      - URLS__BASEURL=***
      - URLS__ENFORCEHTTPS=true
      - LOGGING__LEVEL=Debug
      - EVENTSTORE__TYPE=MongoDB
      - EVENTSTORE__MONGODB__CONFIGURATION=mongodb://mongo
      - STORE__TYPE=MongoDB
      - STORE__MONGODB__CONFIGURATION=mongodb://mongo
      - VIRTUAL_HOST=***
      - IDENTITY__ADMINEMAIL=admin@localhost.local
      - IDENTITY__ADMINPASSWORD=***
      - IDENTITY__GOOGLECLIENT=
      - IDENTITY__GOOGLESECRET=
      - IDENTITY__GITHUBCLIENT=
      - IDENTITY__GITHUBSECRET=
      - IDENTITY__MICROSOFTCLIENT=
      - IDENTITY__MICROSOFTSECRET=
      - ASPNETCORE_URLS=http://+:5000
    networks:
      - internal
      - common
    depends_on:
      - mongo
    restart: always
    labels:
      - traefik.docker.network=common
      - traefik.backend=squidev-development
      - traefik.frontend.rule=Host:***
      - traefik.port=80 

It actually happens only on the Ubuntu Host, on my workstation using macOS it is working fine using the same compose file

Many thanks,

That’s weird, because all my builds run through some API tests, that use docker. So a temporary Squidex instance is created using docker-compose and then the test connects to this instance and runs the tests.

I have no idea how to debug this …

my build server is CentOS 7 x64 thoug…

Hi,

Thanks for your reply.

Just for you to know, on that server, it worked then stopped almost a month ago which more or less coincide with the period where it got updated from Ubuntu 18 to Ubuntu 20.

Maybe I can try to give you more information somehow ?

I just tried Ubuntu 20.10 x64 and it is working fine with squidex/squidex:5

Hi,

I am pretty sure it is a misconfiguration somewhere that I did, because it worked before. Do you have any idea how I should investigate more ? I really need to make it work on that particular server.

Many thanks

No idea. I don’t understand how this particular error could cause problems depending on the OS. You can try to stop squidex, then clear docker with docker system prune -a -f and then run docker-compose again to force a pull of all image layers.

Hi,

Did it, same error.

I tried squidex version 4 and 5 as well.

I can give you access to my server if you want to have a look if something is different, but I have no idea what is going on :frowning: