Base solution for your next web application
Open Closed

403 Forbidden error on FromBackgroundJob #12182


User avatar
0
joynext created

It only happens to one of the tenants, all other tenants are working fine. Also Background jobs seems to be firing up OK when there are no user notifications required.

Error,

System.Exception: Publish_MessageToUser FromBackgroundJob error with domain https://xxx.mydomain.com Call failed with status code 403 (Forbidden): POST https://https://xxx.mydomain.com

Appreciate anything that you can provide or any guidance what to check.


3 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @joynext,

    Could you share this error with the full log?

  • User Avatar
    0
    joynext created

    System.AggregateException: One or more errors occurred. ---> System.Exception: Publish_MessageToEmployee FromBackgroundJob error with domain https://tenant.mydomain.com: Call failed with status code 403 (Forbidden): POST https://tenant.mydomain.com/api/services/app/BackgroundJobNotification/NotifyEmployee at SHRIS.Notifications.NotificationAppService.<Publish_MessageToEmployee>d__17.MoveNext() --- 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 SHRIS.Notifications.NotificationAppService.<Publish_ApprovalMessage>d__19.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at SHRIS.TimeLogs.EmployeeTimesheetJobAppService.ProcessApprovedLeaves(Int32 id, Nullable1 tenantId) at Castle.Proxies.Invocations.IEmployeeTimesheetJobAppService_ProcessApprovedLeaves.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Auditing.AuditingInterceptor.PerformSyncAuditing(IInvocation invocation, AuditInfo auditInfo) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.EmployeeTimesheetJobAppServiceProxy.ProcessApprovedLeaves(Int32 id, Nullable1 tenantId) at SHRIS.BackgroundJobs.Jobs.ApprovalRequestJob.Execute(ApprovalRequestJobArgs args) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Abp.Domain.Uow.UnitOfWorkInterceptor.PerformSyncUow(IInvocation invocation, UnitOfWorkOptions options) at Castle.DynamicProxy.AbstractInvocation.Proceed() ---> (Inner Exception #0) System.Exception: Publish_MessageToEmployee FromBackgroundJob error with domain https://tenant.mydomain.com: Call failed with status code 403 (Forbidden): POST https://tenant.mydomain.com/api/services/app/BackgroundJobNotification/NotifyEmployee at SHRIS.Notifications.NotificationAppService.<Publish_MessageToEmployee>d__17.MoveNext() --- 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)

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @joynext

    Could you share your the code of BackgroundJobNotification/NotifyEmployee and Background Job which calls this endpoint ?