Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ozkan Sayin 6 posts 136 karma points
    Feb 03, 2017 @ 06:46
    Ozkan Sayin
    0

    Courier Failing with ContextId issues

    Hey there,

    We have been using Courier.v2.52.14 successfuly, until it stopped working all of a sudden, after a deploy.

    Then, we have updated to Courier.v3.0.4 to see if that helps, but unfortunately it did not.

    The errors we get are:,

    2017-02-02 18:43:42,172 [34] ERROR Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 8] There was a problem with extracting database information for the item: Name:**censored** | Id:**cencored** | Provider:Dictionary items
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> A call to SetContextId must occur before getting/setting a context
    

    And

    2017-02-02 19:46:48,723 [66] ERROR Umbraco.Courier.Core.TaskManager - [Thread 74] Error ExtractionTask with id: 4364d761-1515-4370-9a70-ac95303ce754
    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> Tried setting Core.ContextId to 3e2e784e-5cf1-47e3-9916-2ad8a29d783d - There is already an active global execution context with id: 55ccf5c2-8601-47b4-808c-5ebc86d06d0e and there can only be one
    

    We are getting these after the comparison between the environments, i.e., we get the list of items that will be sent, and sometimes we are able to see the progress bar (Deploying xyz). After all, instead of the success message, we get the error.

    We have tried restarting the sites, clearing App_Data, reinstalling Courier after a fresh deploy, adding the assembly redirect mentioned here, none of which worked.

    We are not using NHibernate ourselves, and we have checked that the NHibernate related dlls only get created upon Courier installation. We are not using any other package that might cause conflicts.

    Our site is running on Umbraco v7.5.6, and we are trying to move data from a single server (no load balancing) to a load-balanced environment's master server. Both environments are Azure WebApps (paas) with Azure sql server connections.

    There is a warning before the "tried setting Core.ContextId" error, as the following:

    2017-02-02 19:46:48,286 [66] DEBUG Umbraco.Courier.Core.EventManager - [Thread 12] Unloading (count: 0)
    2017-02-02 19:46:48,317 [66] DEBUG Umbraco.Courier.Core.EventManager - [Thread 12] Unloading (count: 0)
    2017-02-02 19:46:48,333 [66] INFO  Umbraco.Courier.Core.TaskManager - [Thread 12] Added ExtractionTask behind queue of : 0
    2017-02-02 19:46:48,333 [66] INFO  Umbraco.Courier.Core.BackgroundTaskRunner - [Thread 12]  Task added Umbraco.Courier.Core.Tasks.ExtractionTask
    2017-02-02 19:46:48,333 [66] INFO  Umbraco.Courier.Core.BackgroundTaskRunner - [Thread 12] Starting
    2017-02-02 19:46:48,333 [66] INFO  Umbraco.Courier.Core.TaskManager - [Thread 74] Starting ExtractionTask with id: 4364d761-1515-4370-9a70-ac95303ce754
    2017-02-02 19:46:48,333 [66] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 74] Running PopulateGraph
    2017-02-02 19:46:48,614 [66] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 74] Finished PopulateGraph (took 269ms)
    2017-02-02 19:46:48,634 [66] DEBUG Umbraco.Courier.Core.EventManager - [Thread 74] Adding event DeleteContentAndMedia To Queue: DeploymentComplete for session: 3e2e784e-5cf1-47e3-9916-2ad8a29d783d
    2017-02-02 19:46:48,634 [66] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 74] Starting extraction
    2017-02-02 19:46:48,634 [66] INFO  Umbraco.Courier.Core.Extraction.RevisionExtraction - [Thread 74] Opens database session
    2017-02-02 19:46:48,634 [66] DEBUG Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider - [Thread 74] Opening session to https://**censored**
    2017-02-02 19:46:48,708 [66] DEBUG Umbraco.Courier.RepositoryProviders.Local - [Thread 74] Disposing: True
    2017-02-02 19:46:48,708 [66] WARN  Umbraco.Courier.RepositoryProviders.Local - [Thread 74] Closing session called but there is no session open: 3e2e784e-5cf1-47e3-9916-2ad8a29d783d
    2017-02-02 19:46:48,723 [66] DEBUG Umbraco.Courier.Core.EventManager - [Thread 74] Unloading (count: 1)
    

    One note, though the dll has the name

    Umbraco.Courier.Persistence.V7.NHibernate.dll

    The logs contain V6 source, such as the following:

    Umbraco.Courier.Persistence.V6.NHibernate.NHibernateSessionManager

    But I guess that is just an old naming of the namespace still lingering.

    Thanks in advance,

  • Ozkan Sayin 6 posts 136 karma points
    Feb 06, 2017 @ 06:30
    Ozkan Sayin
    100

    Found out the reason for this was that the load-balanced setup on the target environment was wrong. Anyone that runs into similar issues, make sure that the url to which you are sending data is served by only one instance (duh!)

    I guess this might go as a subcategory for rubber duck debugging.

  • Laurence Gillian 600 posts 1219 karma points
    Nov 10, 2017 @ 18:31
    Laurence Gillian
    0

    I am having similar issues, with a single server that is behind a ELB.

Please Sign in or register to post replies

Write your reply to:

Draft