Hola. El día de hoy se a presentado mucho este error:

System.Net.Sockets.SocketException
No connection could be made because the target machine actively refused it 127.0.0.1:8001

System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:8001

Server stack trace: 
   at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32 port)
   at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(AddressFamily family)
   at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
   at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Quartz.Simpl.IRemotableQuartzScheduler.CheckExists(TriggerKey triggerKey)
   at Quartz.Impl.RemoteScheduler.CallInGuard[T](Func`2 func) in C:\projects\quartznet-6fcn8\src\Quartz\Impl\RemoteScheduler.cs:line 704
   at Quartz.Impl.RemoteScheduler.CheckExists(TriggerKey triggerKey, CancellationToken cancellationToken) in C:\projects\quartznet-6fcn8\src\Quartz\Impl\RemoteScheduler.cs:line 560
   at Aseinfo.VH4.Infraestructura.Workflow.WorkflowFoundationEngine.<DeleteJobRecordatorioAsync>d__17.MoveNext() in C:\vh4\VH4\Infraestructura\Workflow\WorkflowFoundationEngine.cs:line 318
--- 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 Aseinfo.VH4.Infraestructura.Workflow.WorkflowFoundationEngine.HandleWorkflowAction(WorkflowAction actionPerformed, String codigoInstancia, String entityServiceTypeName, Int32 codigoActividad, Int32 codigoExpedienteUsuario, String username, String comentarios) in C:\vh4\VH4\Infraestructura\Workflow\WorkflowFoundationEngine.cs:line 184
   at Aseinfo.VH4.General.Controllers.FlujosAutorizacionController.Autorizar(List`1 codigosActividades, String comentarios, String areaOrigen, String controllerOrigen, String actionOrigen, String filtro, String returnAction) in C:\vh4\VH4\General\Controllers\FlujosAutorizacionController.cs:line 660
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c.<BeginInvokeSynchronousActionMethod>b__9_0(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_0.<InvokeActionMethodFilterAsynchronouslyRecursive>b__0()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass11_2.<InvokeActionMethodFilterAsynchronouslyRecursive>b__2()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_6.<BeginInvokeAction>b__4()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult)

Detecté lo siguiente: 1. El servicio del AppJob está abajo, por lo cual la razón del error antes mencionado.

2. Al tratar de subir el AppJob directamente desde el ejecutable (El que abre la línea de comandos).

Registra los siguiente en el log: 2020-06-25 15:03:14,471 [1] INFO  Main - ASEINFO Evolution - Ejecutor de tareas programadas.
2020-06-25 15:03:14,549 [1] INFO  AppJobDatabaseTool.DatabaseHelper - Chequeando conexión a base de datos SQL Server EvoDb.P-RRHH-DB01
2020-06-25 15:03:14,643 [1] INFO  AppJobDatabaseTool.DatabaseHelper - Chequeando si existen las tablas en la base SQL Server de Quartz P-RRHH-DB01
2020-06-25 15:03:14,690 [1] INFO  Main - Obtaining instance of an IQuartzServer
2020-06-25 15:03:14,737 [1] INFO  Main - Initializing Quartz Server
2020-06-25 15:03:15,034 [1] INFO  QuartzServer - Inicializando el Quartz Server
2020-06-25 15:03:15,049 [1] INFO  QuartzServer - Configurando Unity...
2020-06-25 15:03:15,846 [1] INFO  QuartzServer - Resolviendo el CryptographyService ...
2020-06-25 15:03:15,893 [1] INFO  QuartzServer - Resolviendo CacheService ...
2020-06-25 15:03:15,909 [1] INFO  QuartzServer - Configurando EntitySet Mapping Dictionaries...
2020-06-25 15:03:15,971 [1] INFO  QuartzServer - Fin de Configuración Unity...
2020-06-25 15:03:15,971 [1] INFO  QuartzServer - Creando el Quartz Scheduler Factory
2020-06-25 15:03:15,987 [1] INFO  QuartzServer - Obteniendo el Scheduler del Factory
2020-06-25 15:03:16,143 [1] INFO  Quartz.Util.DBConnectionManager - Registering datasource 'default' with db provider: 'Quartz.Impl.AdoJobStore.Common.DbProvider'
2020-06-25 15:03:16,159 [1] INFO  Quartz.Impl.StdSchedulerFactory - Using object serializer: Quartz.Simpl.BinaryObjectSerializer, Quartz
2020-06-25 15:03:16,205 [1] INFO  Quartz.Core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: Quartz.Core.SchedulerSignalerImpl
2020-06-25 15:03:16,221 [1] INFO  Quartz.Core.QuartzScheduler - Quartz Scheduler v.3.0.5.0 created.
2020-06-25 15:03:16,237 [1] INFO  Quartz.Impl.AdoJobStore.JobStoreTX - Using thread monitor-based data access locking (synchronization).
2020-06-25 15:03:16,252 [1] INFO  Quartz.Impl.AdoJobStore.JobStoreTX - JobStoreTX initialized.
2020-06-25 15:03:16,284 [1] INFO  Quartz.Simpl.RemotingSchedulerExporter - Remoting is allowing remote calls
2020-06-25 15:03:16,299 [1] INFO  Quartz.Simpl.RemotingSchedulerExporter - Registering remoting channel of type 'System.Runtime.Remoting.Channels.Tcp.TcpChannel' to port (8001) with name (http)
2020-06-25 15:03:16,299 [1] INFO  Quartz.Simpl.RemotingSchedulerExporter - Remoting channel registered successfully
2020-06-25 15:03:16,315 [1] INFO  Quartz.Simpl.RemotingSchedulerExporter - Successfully marshalled remotable scheduler under name 'Aseinfo.VH4.WindowsServices.AppJobService'
2020-06-25 15:03:16,330 [1] INFO  Quartz.Core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v3.0.5.0) 'AppJobWinServiceScheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'Quartz.Core.QuartzScheduler' - access via remote invocation.
  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 not clustered.

2020-06-25 15:03:16,346 [1] INFO  Quartz.Impl.StdSchedulerFactory - Quartz scheduler 'AppJobWinServiceScheduler' initialized
2020-06-25 15:03:16,346 [1] INFO  Quartz.Impl.StdSchedulerFactory - Quartz scheduler version: 3.0.5.0
2020-06-25 15:03:16,362 [1] INFO  Quartz.Core.QuartzScheduler - JobFactory set to: Aseinfo.VH4.MicroServices.AppJobs.QuartzServer.UnityJobFactory
2020-06-25 15:03:16,377 [1] INFO  Main - Quartz Server initialized
2020-06-25 15:03:16,377 [1] INFO  QuartzServer - Creando la tarea de Notificación
2020-06-25 15:03:16,409 [1] INFO  QuartzServer - Chequeando si existe el Job de notificaciones
2020-06-25 15:03:16,690 [11] INFO  QuartzServer - Agendando la ejecución del job para procesar notificaciones:
{
  "JobKey": "NotificationJob",
  "JobGroup": "DEFAULT",
  "JobType": "Aseinfo.VH4.MicroServices.AppJobs.QuartzJobs.NotificationJob",
  "TriggerKey": "NotificationJob",
  "TriggerStartTime": "2020-06-25T15:03:16.5341126-04:00"
}
2020-06-25 15:03:16,768 [10] INFO  QuartzServer - Starting Quartz Service
2020-06-25 15:03:16,815 [11] INFO  Quartz.Impl.AdoJobStore.JobStoreTX - Freed 1 triggers from 'acquired' / 'blocked' state.
2020-06-25 15:03:16,846 [5] INFO  Quartz.Impl.AdoJobStore.JobStoreTX - Handling 379 trigger(s) that missed their scheduled fire-time.

3. Al consultar la tabla [dbo].[QRTZ_TRIGGERS], queda bloqueda, es decir cuando hago un select con el servicio del AppJob levantado, la consulta nunca termina, hasta que lo baje, ya retorna la consulta.

Temporalmente estoy borrando la información de esa tabla y la de [dbo].[QRTZ_SIMPLE_TRIGGERS] para que pueda levantar nuevamente el AppJob sin problemas.

Como recordatorio, es una versión con worker proccesses.

asked 25 Jun '20, 13:23

Erick%20T%C3%BAchez's gravatar image

Erick Túchez
210657168
accept rate: 37%

edited 25 Jun '20, 18:33

Fernando%20Paz's gravatar image

Fernando Paz ♦♦
17.3k81635


Logré reproducir el error en el ambiente de test que tiene el cliente. Detecté que es cuando registran solicitudes masivas de ingresos y descuentos eventuales. El ejecricio que realicé fué el siguiente:
1. Ejecuté el AppJob directame para ver que era lo que estaba ejecutando al momento de hacer los ejercicios.

2.Realicé una solicitud de descuentos eventuales masivos con 300 empleados y esto se logró autorizar sin ningún problema.

3.Volví a realizar otra solicitud desde descuentos masivos, solamente que está vez fueron 900 empleados a los que le iba aplicar, que es normalmente el promedio que manejan por empresa el cliente. Al principio el appJOb estaba procesando bien la solicitud y el registro de cada empleado, pero al trasncurrir cada solicitud iba demorando un poco más al punto de colapsar el servicio.
4. Al volver al levantar el servivio del AppJob muestra presisamente el error que resaltas y luego de un tiempo (20 min. aprox.) ya volvió a darle seguimiento a la solicitud.

Entonces, lo que está pasando es que evolution no está "soportando" procesar esa cantidad de registros y eso pasó únicamente en test con un usuario en una única empresa y ellos manejan 8 empresas con un promedio de 100 a 900 empleados por solicitud a fin de mes.

Como observación en la versión anterior 1.11.2 no nos dió ese problema y siempre han manejado esa cantidad de registros por solicitud.

link

answered 25 Jun '20, 19:56

Erick%20T%C3%BAchez's gravatar image

Erick Túchez
210657168
accept rate: 37%

edited 26 Jun '20, 11:48

Fernando%20Paz's gravatar image

Fernando Paz ♦♦
17.3k81635

Ya se creo un incidente para diagnósticar y mitigar este problema en un próximo Hotfix.

https://proyectosaseinfo.atlassian.net/browse/INC-140

(26 Jun '20, 11:49) Fernando Paz ♦♦ Fernando%20Paz's gravatar image

TU problema esta relacionado con esto:

2020-06-25 15:03:16,815 [11] INFO  Quartz.Impl.AdoJobStore.JobStoreTX - Freed 1 triggers from 'acquired' / 'blocked' state.
2020-06-25 15:03:16,846 [5] INFO  Quartz.Impl.AdoJobStore.JobStoreTX - Handling 379 trigger(s) that missed their scheduled fire-time.

Esos 379 triggers que no se ejecutaron en su momento se ejecutan en el mismo instante, porque tienen fecha de ejecución en el pasado. Mientras esto no termine, va a seguir atorando el acceso a las tablas del QUARTZ.

Ya habíamos encontrado este problema el día que no podían pagar planilla y les advertí que seguramente sucedería de nuevo, porque no se ha encontrado que situación es la que lo provoca.

Realmente no esta dando errores, sino que únicamnete va a tardar tiempo en procesar todo, principalmente porque me imagino que tiene que ver con el mismo tipo AccionFinalizacionTask y probablemente se estén bloqueando entre si.

Es necesario que encuentren, la razón de que se programen cientos de actividades en el mismo momento. Porque cada vez que sucede, se va a provocar el mismo error.

link

answered 25 Jun '20, 18:40

Fernando%20Paz's gravatar image

Fernando Paz ♦♦
17.3k81635
accept rate: 51%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Evolution en BitBucket

En este sitio puede acceder al código fuente, centro de descargas y reportar bugs, propuestas y mejoras para Evolution.

Evolution en JIRA

En este sitio puedes sugerir nueva funcionalidad para Evolution, o puedes votar por la funcionalidad ya propuesta por otros usuarios.

Tags:

×83
×2

Asked: 25 Jun '20, 13:23

Seen: 485 times

Last updated: 26 Jun '20, 11:49

[Acerca de] [Preguntas Frecuentes] [Privacidad] [Soporte] [Contacto]
Copyright 2013-2018. Asesores en Informática