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.