question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

System.PlatformNotSupportedException running in linux-based container

See original GitHub issue

Version: 3.0.0 - alpha3

I’ve just run console app in docker container and got the following PlatformNotSupportedException at the start . The same app works just fine under windows .NET Core 2.0. Looks like it’s one of Thread properties setter throws this (line number does not help for some reason).

Any ideas?

[16:44:51] [Info] [  ]Quartz.NET properties loaded from configuration file '/app/quartz.config'
[16:44:51] [Info] [  ]Registering datasource 'myDS' with db provider: 'Quartz.Impl.AdoJobStore.Common.DbProvider'
[16:44:51] [Info] [  ]Using object serializer: Quartz.Simpl.JsonObjectSerializer, Quartz.Serialization.Json
[16:44:51] [Info] [  ]Initialized Scheduler Signaller of type: Quartz.Core.SchedulerSignalerImpl
[16:44:51] [Info] [  ]Quartz Scheduler v.3.0.0.0 created.
[16:44:51] [Info] [  ]Using db table-based data access locking (synchronization).
[16:44:51] [Info] [  ]JobStoreTX initialized.
[16:44:51] [Info] [  ]Scheduler meta-data: Quartz Scheduler (v3.0.0.0) 'Service' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'Quartz.Core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'Quartz.Simpl.DefaultThreadPool' - with 10 threads.
  Using job-store 'Quartz.Impl.AdoJobStore.JobStoreTX' - which supports persistence. and is clustered.

[16:44:51] [Info] [  ]Quartz scheduler 'Service' initialized
[16:44:51] [Info] [  ]Quartz scheduler version: 3.0.0.0
[16:44:52] [Info] [  ]ClusterManager: detected 1 failed or restarted instances.
[16:44:52] [Info] [  ]ClusterManager: Scanning for instance "NON_CLUSTERED"'s failed in-progress jobs.
Host start was not succeeded: System.PlatformNotSupportedException: COM interop is not supported on this platform.
   at Quartz.Util.QueuedTaskScheduler..ctor(Int32 threadCount, String threadName, Boolean useForegroundThreads, ThreadPriority threadPriority, ApartmentState threadApartmentState, Action threadInit, Action threadFinally) in C:\projects\quartznet-6fcn8\src\Quartz\Util\QueuedTaskScheduler.cs:line 72
   at Quartz.Impl.AdoJobStore.ClusterManager.<Initialize>d__8.MoveNext() in C:\projects\quartznet-6fcn8\src\Quartz\Impl\AdoJobStore\ClusterManager.cs:line 36
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Quartz.Impl.AdoJobStore.JobStoreSupport.<SchedulerStarted>d__131.MoveNext() in C:\projects\quartznet-6fcn8\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 493
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Quartz.Core.QuartzScheduler.<Start>d__68.MoveNext() in C:\projects\quartznet-6fcn8\src\Quartz\Core\QuartzScheduler.cs:line 371

quartz.config

quartz.scheduler.instanceName = AUTO
quartz.jobStore.clustered = true
quartz.scheduler.instanceName = Service
quartz.scheduler.idleWaitTime = 10000
quartz.scheduler.batchTriggerAcquisitionMaxCount = 10

quartz.threadPool.threadCount = 10

quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz
quartz.jobStore.driverDelegateType = Quartz.Impl.AdoJobStore.MySQLDelegate, Quartz
quartz.jobStore.tablePrefix = QRTZ_
quartz.jobStore.dataSource = myDS
quartz.dataSource.myDS.connectionString = Server=localhost;Database=Service;uid=service;pwd=1
quartz.dataSource.myDS.provider = MySql
quartz.jobStore.useProperties = false

quartz.serializer.type = json

dockerfile

FROM microsoft/dotnet:2.0.0-preview2-runtime-stretch
WORKDIR /app
COPY . .
ENTRYPOINT ["dotnet", "Service.dll"]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
lahmacommented, Oct 3, 2017

I’ll try to get release out next weekend the latest. I’m really trying to find possible breaking changes to be put to next release so that I could call it beta in good conscience. I’m sorry for the delay but I haven’t had too much spare time recently.

2reactions
Layoriccommented, Sep 20, 2017

@lahma Awesome this has been fixed for beta-1, I’ve hit this while trying docker + .net standard 2.0 + quartz-net alpha3 as well. Would it be possible to get beta-1 published to AppVeyor NuGet feed or nuget itself so it can be referenced and used for testing?

Read more comments on GitHub >

github_iconTop Results From Across the Web

run container, System.PlatformNotSupportedException
I am building a Linux docker image for a .net core application. Target framework: .Net Core 2.2. The docker file was built successfully....
Read more >
System.Drawing.Common is not supported on non-Windows ...
The .NET 6 and .NET 7 project project runs correctly in Windows environment. The following error occurs when running it under a Linux...
Read more >
Unable to Use Aspose.Slides for .NET in Linux Based on ...
we are currently experiencing multiple issues running Aspose.Slides. Main issue is the exception System.PlatformNotSupportedException\nSystem.
Read more >
APIs that always throw exceptions on .NET Core and .NET 5+
Learn which .NET APIs always throw an exception on .NET Core and .NET 5 and later versions.
Read more >
Creating workbook on Linux throws exception : Spire.XLS
Net Core 5 apllication running in a Linux docker container I get an "System.PlatformNotSupportedException" for System.Drawing.Common.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found