Squidex do not launch in Docker

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 :

File name: 'System.Data.SqlClient, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(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 40
   at Squidex.Pipeline.Plugins.PluginExtensions.AddSquidexPlugins(IMvcBuilder mvcBuilder, IConfiguration config) in /src/src/Squidex/Pipeline/Plugins/PluginExtensions.cs:line 42
   at Squidex.Config.Web.WebServices.AddSquidexMvcWithPlugins(IServiceCollection services, IConfiguration config) in /src/src/Squidex/Config/Web/WebServices.cs:line 79
   at Squidex.Startup.ConfigureServices(IServiceCollection services) in /src/src/Squidex/Startup.cs:line 40
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& 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)

Expected behavior

Squidex working normally

Minimal reproduction of the problem

Environment

App Name:

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

Version: [7.0.2]

Browser:

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

Others:

Chart version: 1.0.0 , appVersion: “7.0.2”
The values of the chart is

labels:

service:
  type: ClusterIP
  port: 80

deployment:
  replicaCount: 1

selectors:
  component: squidex
  partOf: ""
  version: ""

image:
  repository: squidex/squidex
  tag: "7.0.2"
  pullPolicy: IfNotPresent

securityContainerContext:
  allowPrivilegeEscalation: false
  runAsNonRoot: true
  runAsUser: 10001
  capabilities:
    drop:
      - ALL

containerPort: 8080

resources:
  limits:
    cpu: 1000m
    memory: 1Gi
  requests:
    cpu: 500m
    memory: 500Mi

nodeSelector: {}

tolerations: []

clusterSuffix: cluster.local

mongodb:
  mongoDbHost: mongodb-0,mongodb-1,mongodb-2:27017
  monguser: 
  mongopassword: 
  mongodb: squidex_db

ingress:
  ## If true, Squidex Ingress will be created.
  ##
  enabled: true
  ## Squidex Ingress annotations
  annotations:
    kubernetes.io/ingress.class: nginx
  #   kubernetes.io/tls-acme: "true"
  hostName: squidex.local

  tls: []
  #  - secretName: chart-example-tls
  #    hosts:
  #      - chart-example.local

env:
  # Define the type of the event store
  EVENTSTORE__TYPE: MongoDb
  EVENTSTORE__MONGODB__DATABASE: "squidex_db"

  # CREATE LOCAL ADMIN USER
  IDENTITY__ADMINEMAIL: "squidex_admin"
  IDENTITY__ADMINPASSWORD: "squidex_admin_password" 
  IDENTITY__ADMINRECREATE: true # Recreate the admin if it does not exist or the password does not match
  IDENTITY__ALLOWPASSWORDAUTH: "true" # Enable password auth. Set this to false if you want to disable local login, leaving only 3rd party login options
  IDENTITY__LOCKAUTOMATICALLY: "false" # Lock new users automatically, the administrator must unlock them
  IDENTITY__SHOWPII: true # Set to true to show PII (Personally Identifiable Information) in the logs
  IDENTITY__PRIVACYURL: "https://squidex.io/privacy" # The url to you privacy statements, if you host squidex by yourself

  # Settings for Google auth (keep empty to disable)
  IDENTITY__GOOGLECLIENT: null
  IDENTITY__GOOGLESECRET: null

  # Settings for Github auth (keep empty to disable)
  IDENTITY__GITHUBCLIENT: null
  IDENTITY__GITHUBSECRET: null

  # Settings for Microsoft auth (keep empty to disable)
  # NOTE: Tennant is optional for using a specific AzureAD tenant
  IDENTITY__MICROSOFTCLIENT: null
  IDENTITY__MICROSOFTSECRET: null
  IDENTITY__MICROSOFTTENANT: null

  # Settings for your custom oidc server
  IDENTITY__OIDCNAME: null
  IDENTITY__OIDCAUTHORITY: null
  IDENTITY__OIDCCLIENT: null
  IDENTITY__OIDCSECRET: null
  IDENTITY__OIDCMETADATAADDRESS: null
  IDENTITY__OIDCSCOPES: [] # ["email"]
  IDENTITY__OIDCRESPONSETYPE: null # id_token or code
  IDENTITY__OIDCGETCLAIMSFROMUSERINFOENDPOINT: false
  IDENTITY__OIDCSINGOUTREDIRECTURL: null
  LETSENCRYPT_HOST: null
  LETSENCRYPT_EMAIL: null

  # LOGGING SETTINGS
  LOGGING__LEVEL: INFORMATION # Trace, Debug, Information, Warning, Error, Fatal
  LOGGING__HUMAN: false # Setting the flag to true, enables well formatteds json logs
  LOGGING__COLORS: false # Set to true, to use colors
  LOGGING__LOGREQUESTS: true # Set to false to disable logging of http requests
  LOGGING__STOREENABLED: true # False to disable the log store
  LOGGING__STORERETENTIONINDAYS: 90 # The number of days request log items will be stored
  LOGGING__STACKDRIVER__ENABLED: false # True, to enable stackdriver integration
  LOGGING__OTLP__ENABLED: false # True, to enable OpenTelemetry Protocol integration
  LOGGING__OLTP__ENDPOINT: null # The endpoint to the agent
  LOGGING__APPLICATIONINSIGHTS__ENABLED: false # True, to enable application insights integraon
  LOGGING__APPLICATIONINSIGHTS__CONNECTIONSTRING: null # "instrumentationkey=keyvalue"

  # Define the clustering type
  ORLEANS__CLUSTERING: MongoDB # SUPPORTED: MongoDB, Development
  ORLEANS__KUBERNETES: true # Tell Orleans it is running in kubernetes

  # Define the type of the read store
  STORE__TYPE: MongoDb
  STORE__MONGODB__DATABASE: "squidex_db"
  STORE__MONGODB__CONTENTDATABASE: "squidex_content_db"

  # Assets
  ASSETSTORE__TYPE: MongoDb
  URLS__BASEURL: http://squidex.local  # Set the base url of your application, to generate correct urls in background process
  URLS__ENFORCEHTTPS: false # Set it to true to redirect the user from http to https permanently

Many thanks,

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.

I’m tired of searching for a reason to solve this problem, and I have some questions about it.

  1. Why is SQLClient used when the database is MongoDB? Does Squidex require it for something else, and if so, what is it?
  2. What are the potential causes of this problem? Could the security context be affecting it, and what permissions should it have on the cluster?
  3. Is it possible that there is an issue with the database connection, and how would this affect Squidex’s launch?

Please respond with any information, possibilities, or methods for troubleshooting and resolving this issue.

I have no idea what is going on here. I run tests on the docker image with each build, so it is very weird that your setup does not run.

  1. No idea where this is coming from. When I search for System.Data.SqlClient in my working folder there is no result.
  2. No idea. You also do not need any special permission.
  3. No, Squidex does not have any SQL connection. If the connection to MongoDB cannot be established you get a very concrete exception message in your logs.