Listado de errores del cliente

El otro día investigando para un caso localice este foro de Technet donde se documentan los errores que se pueden generar en el cliente SCCM y su significado, esto no es oficial y se ha obtenido mediante PowerShell (En al url esta descrito como se obtuvo) pero creo que resulta muy útil.

https://social.technet.microsoft.com/Forums/en-US/0aa25d02-3163-4628-84f7-87b77a1de85b/sccm-2012-view-or-table-that-has-error-code-details

Para vuestra comodidad los adjunto a continuación en formato excel ya que son bastantes.

 SCCM_Client_Errors

También curioseando por la consola se pueden localizar los siguientes mensajes de estado del cliente gestionados por el Management Point y su significado en la consola.

Se pueden localizar lanzando la siguiente query sobre esta tabla SR_StateNames:

SELECT * FROM SR_StateNames

Adjunto algunos como ejemplo, si queremos la lista completa los podremos obtener con la query.

300  0  Compliance state unknown Compliance state unknown
300  1  Compliant Compliant
300  2  Non-compliant Non-compliant
300  3  Conflict detected Conflict detected
301  0  Enforcement state unknown Enforcement state unknown
301  1  Installing update(s) Installing update(s)
301  2  Waiting for restart Waiting for restart
301  3  Waiting for another installation to complete Waiting for another installation to complete
301  4  Successfully installed update(s) Successfully installed update(s)
301  5  Pending system restart Pending system restart
301  6  Failed to install update(s) Failed to install update(s)
301  7  Downloading update(s) Downloading update(s)
301  8  Downloaded update(s) Downloaded update(s)
301  9  Failed to download update(s) Failed to download update(s)
301  10  Waiting for maintenance window before installing Waiting for maintenance window before installing
301  11  Waiting for third-party orchestrator to initiate installation Waiting for third-party orchestrator to initiate installation
302  0  Evaluation state unknown Evaluation state unknown
302  1  Evaluation activated Evaluation activated
302  2  Evaluation succeeded Evaluation succeeded
302  3  Evaluation failed Evaluation failed

Espero que os resulte útil.

List with client errors

The other day researching a case I located this Technet forum where found a method to show errors that can be generated in the SCCM client and its meaning, this is not official and has been obtained by PowerShell (in the url is described how was obtained) but I think it is very useful.

https://social.technet.microsoft.com/Forums/en-US/0aa25d02-3163-4628-84f7-87b77a1de85b/sccm-2012-view-or-table-that-has-error-code-details

For your convenience the attached Excel then as they are a big number.

SCCM_Client_Errors

Also browsing the console I found the client status managed messages managed by the Management Point and its meaning in the console.

You can find them with the following query over SR_StateNames table:

SELECT * FROM SR_StateNames

Deputy some as an example, if you want the full list just run the query.

300 0 Compliance Compliance state unknown unknown state

300 1 Compliant Compliant

300 2 Non-compliant Non-compliant

300 3 Conflict Conflict detected detected

301 0 Enforcement Enforcement state unknown unknown state

301 1 Installing update (s) Installing update (s)

301 2 Waiting for restart Waiting for restart

301 3 Waiting for another installation to complete Waiting for another installation to complete

301 4 Successfully installed update (s) Successfully installed update (s)

5 301 Pending Pending system restart system restart

301 6 Failed to install update (s) Failed to install update (s)

301 7 Downloading update (s) Downloading update (s)

Downloaded 301 8 update (s) Downloaded update (s)

301 9 Failed to download update (s) Failed to download update (s)

301 10 Waiting for maintenance window before installing Waiting for maintenance window before installing

301 11 Waiting for third-party orchestrator to initiate installation Waiting for third-party orchestrator to initiate installation

302 0 Evaluation state unknown Evaluation state unknown

302 1 Evaluation Evaluation activated activated

302 2 Evaluation Evaluation succeeded succeeded

3 Evaluation Evaluation failed 302 failed

I hope you find it useful.

WSUS sync fails with HTTP 503 errors

An increasingly common situation in the Software Updates Points on ConfigMgr, which was not usually presented earlier in CM07, is the presence of 503 events in the logs of the site server.

In the primary component SMS_WSUS_SYNC_MANAGER we see events like this:

Message ID: 6703

WSUS Synchronization failed.

Message: The request failed with HTTP status 503: Service Unavailable.

Source: Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer.

The solution to this situation is well documented in this post:

https://blogs.technet.microsoft.com/configurationmgr/2015/03/23/configmgr-2012-support-tip-wsus-sync-fails-with-http-503-errors/

But I would like to explain the origin of this event and why it is increasingly common in the consoles of ConfigMgr.

Due to changes in the servicing model in the operating system in recent years, and the volume of versions that are currently being generated, the cycle of creation and publication of updates is multiplying, if we add to this point that the current versions of ConfigMgr allows you to select how long you want to keep in the catalog superseded updates, it means that the number of updates contained on the catalog has grown almost exponentially, so is recommended to synchronize only the application updates for the software really present on the environment, no all the software available on the catalogue “just in case” it may be needed in the fufure.

Which implications has this change for ConfigMgr?

The first is the emergence of events 503 on servers with the role of SUP, as the Memory Application Pool that has IIS reserved for this service is exhausted by the download requests of the catalog generated by clients, the service is stopped by the IIS to avoid affecting other services present on the system.

Why it is more difficult that this happen with CM07?

In this version, superseded updates are removed by the site by design, which prevents the catalog grow, which make this less likely, but not impossible to happen.

What does this mean in my environment?

The most immediate consequence is that the clients stop receiving updates, or Definitions Updates for Endpoint Protection, so in certain environments this becomes critical.

What solution do we have?

Other than that indicated in the previous post is a recommended practice to keep a maintenance plan on WSUS, its catalog and databases to avoid this excessive growth and its consequences.

If the environment is small this means making WSUS Cleanups (recommended monthly), index the WSUS database (which is not as small as it used) to improve their performance, and declining superseded updates (with this PowerShell script you can define how old).

In larger environments, the recommendation is to follow this post from Microsoft which explains how to automate the whole process:

https://blogs.technet.microsoft.com/configurationmgr/2016/01/26/the-complete-guide-to-microsoft-wsus-and-configuration-manager-sup-maintenance/

I hope this have been informative for you, as usual this information is provided as it is, previous to any implementation on production test extensively on a lab.

Until the next post.

SUP sync falla con HTTP 503

Una situación cada vez más habitual en los Software Updates Points con ConfigMgr, que no se presentaba con frecuencia en CM07, es la de encontrarnos con eventos 503 en los logs de sincronización del site server.

En el componente SMS_WSUS_SYNC_MANAGER del primario veremos eventos similares a este:

Message ID: 6703

WSUS Synchronization failed. 

Message: The request failed with HTTP status 503: Service Unavailable.

Source: Microsoft.UpdateServices.Administration.AdminProxy.CreateUpdateServer.

La solución a esta situación está perfectamente documentada en este post:

https://blogs.technet.microsoft.com/configurationmgr/2015/03/23/configmgr-2012-support-tip-wsus-sync-fails-with-http-503-errors/

Pero me gustaría explicar el origen de este evento y por qué cada vez es más habitual encontrarlo en los entornos con ConfigMgr.

Debido a los cambios en el servicing model en el sistema operativo y aplicaciones Microsoft en los últimos años, el volumen de versiones que se están generando se incrementa, el ciclo de creación y publicación de updates se está multiplicando, si a esto le sumamos que en las actuales versiones de ConfigMgr se nos permite seleccionar durante cuánto tiempo queremos mantener en el catalogo updates superseded, la consecuencia es que el catálogo de updates ha crecido prácticamente exponencialmente.

¿Qué consecuencias tiene este cambio para ConfigMgr?

La primera de ellas es la aparición de eventos 503 en los servidores con el role de SUP, ya que el Memory Application Pool que tiene IIS reservado para este servicio se ve agotado por las peticiones de descarga del catálogo de updates por los clientes, el servicio al ser sobrepasado en las peticiones es parado por el IIS para que no afecte al resto de servicios presentes.

¿Por qué esto es más difícil que ocurra con CM07?

En esta versión los updates superseded son eliminados por el site por diseño, lo que evita que el catalogo crezca en exceso, con lo que es menos probable, pero no imposible, que esto suceda.

¿Qué consecuencias tiene esto en mi entorno?

La más inmediata es que los clientes dejan de recibir actualizaciones, ya sean Updates o Definiciones de Edpoint Protection, por lo que en ciertos entornos esto se vuelve crítico.

¿Qué solución tenemos?

Aparte de la indicada en el post anterior es una práctica recomendada el llevar un mantenimiento regular de WSUS, su catálogo y sus bases de datos para evitar este crecimiento desmedido y sus consecuencias, además de ajustar el catálogo sincronizando únicamente a las aplicaciones presentes en mi entorno, no es recomendable sincronizarlo todo “por si acaso”.

Si el entorno es pequeño esto supone realizar WSUS Cleanups cada cierto tiempo (recomendado cada mes), indexar la base de datos de WSUS (que ya no es tan pequeña como solía) para mejorar su rendimiento y declinar los updates superseded más antiguos (Mediante un script de powershell podemos decidir de que antigüedad eliminamos).

En entornos grandes la recomendación es seguir este post de Microsoft donde se explica cómo automatizar todo el proceso:

https://blogs.technet.microsoft.com/configurationmgr/2016/01/26/the-complete-guide-to-microsoft-wsus-and-configuration-manager-sup-maintenance/

Espero que haya resultado de utilidad para todos.

Esta información esta generada sin garantías de soporte, antes de implementar ningún cambio en producción o lanzar un script es recomendable testear con anterioridad en un laboratorio o entorno de test para ver posibles consecuencias según la particularidades de cada entorno.

Hasta el próximo post.

Tools to analyze logs.Part2

Let’s go with other tools which are not so common with this product, but which I have found particularly useful.

1.TextAnalysisTool.
You can download it from https://textanalysistool.github.io/

This tool allows the opening of exceptionally large logs (very good for IIS logs, Data Protection Manager, and other large logs).
The best part is that this tool allows filtering/highlighting oh words/sentences in different colors (not just a word/sentence like CMTrace, this one has many colors, which facilitates reading and filtering the data)

And best of all, has a filter based on this highlighted, allowing playing with logs and to see only what we have filtered (GUID application thread, server, …) With CTRL + H, which in these huge logs is great.
What it lacks is the merge of several files, but otherwise this is very useful.

Example:
1. We open one log, such WindowsUpdate.log

2. We may create the filter with right button at the bottom of the white panel.
TextAnali0
3. Select the color you want to highlight
TextAnali1
4. The result gives us the number of matches and the total number of lines file.
TextAnali2
5. When you press Control + H only shows the filtrated result

TextAnali3

  1. Notepad++This tool is well known, but has a search option that I have found particularly useful on sefveral situations, especially with Windows Updates analysis where the log WindowsUpdate.log is not accepted in the merge in CMTrace / Trace32, and we need to review information coming from different services that do not fit the format required by CMTrace.

    Notepad++ allow to search on several files at the same time, we may not have a clear timeline, but this will allow us to relate the data and check all the coincidences on all the files, allowing to jump to the line located to review the events Nearby / Related.

 

  • Open a file, on this case all the related with Windows Update Services on the client.

Notepad++0

  • With Ctrl+F we open the find section, we should push on the Find in all opened documents

Notepad++1

  • We will see the results of the search on all the opened documents, with a click on the line of the result you will jump to the line on the file, so you can review the events around to understand the situation.

Notepad++2

I hope that this will be informational for you.

See you on the next post.

 

Herramientas para analizar logs.Part2

Vamos con otras herramientas que, no siendo tan habituales con este producto,  a mi me han resultado especialmente utiles.

 

  1. TextAnalysisTool.

 

La podéis descargar desde https://textanalysistool.github.io/

Esta herramienta permite la apertura de logs excepcionalmente grandes (muy buena para IIS logs, Data Protection Manager, y cualquier otro log de gran tamaño).

Lo mejor es que permite el filtrado y el resaltado de frases en diferentes colores (no solo una palabra/frase como CMTrace, tiene diversos colores, lo que facilita la lectura y el filtrado de los datos)

Y lo mejor de todo, tiene un filtro en base a este resaltado que elimina el texto no resaltado, lo que permite jugar con los logs y ver unicamente lo que nos interesa(GUID de aplicación, thread, serve, …) Con CTRL+H, lo que en estos logs muy grandes, es genial.

Lo que le falta es el merge de varios ficheros, pero aparte de esto es muy util.

 

Ejemplo:

  • Abrimos un log, ejemplo WindowsUpdate.log
  • Creamos un filtro con boton derecho sobre el cuadro blanco inferior y seleccionamos Add New Filter (no funciona en otras ventanas)

TextAnali0

  • Seleccionamos el color que queremos que resalte

TextAnali1

  • El resultado nos da numero de coincidencias y el numero total de lineas de fichero.

TextAnali2

5. Si pulsamos Control+H solo nos muestra lo filtrado

TextAnali3

2. Notepad++

 

Esta herramienta es muy conocida, pero tiene una opción de busqueda que me ha resultado especialmente útil, especialmente con situaciones relacionadas con Windows Updates, en las que el log WindowsUpdate.log no es aceptado en el merge en CMTrace/Trace32, o cunado quiero revisar información que proviene de diferentes servicios que no se adaptan al formato requerido por CMTrace.

 

Permite una búsqueda en varios ficheros a la vez, no teniendo un timeline claro, pero si que permite relacionar los datos para darles sentido y revisar en que ficheros se encuentra, permitiendo saltar a la linea localizada para poder revisar los eventos cercanos/relacionados.

Ejemplo:

  • Abrimos una serie de ficheros, en este caso los relacionados con Windows Updates

Notepad++0

  • Pulsamos Control+F para abrir las opciones de busqueda (de forma nativa va a rellenar con la palabra que tiene el cursor, pero se puede cambiar una vez abierto), y seleccionamos buscar en todos los ficheros abiertos

Notepad++1

  • Obtendremos una vista como la siguiente, con los resultados en todos los ficheros abiertos, pulsando en la línea podremos saltar a es ubicación.

Notepad++2

Espero que esta información os resulte de utilidad.

Hasta el próximo Post.

 

Herramientas para analizar logs Part1. CMtrace

Cuando se esta analizando una situacion con SCCM uno de las dificultades que solemos encontrarnos es la de tener que revisar un gran numero de logs, añadiendo a esto, que a veces necesitamos revisar también otras aplicaciones y servicios del sistema, o logs del sistema operativo, y esto puede complicar el análisis.

Entonces, ¿que herramientas nos pueden ayudar a hacer más llevadero este análisis?

De las herramientas que más me han ayudado en estos años, comienzo con la mas obvia, CMTrace/Trace32, de todos conocida, en próximos post comentaré otras que pueden ayudar a cubrir sus limitaciones.

CmTrace.exe/Trace32.exe

Esta herramienta es conocida por todos (al menos eso espero ya que nos acompaña desde SMS 2003) y, a pesar de emplearse mucho, me he encontrado con mucha frecuencia que no se sabe exprimir sus posibilidades, utilizandose unicamente para resaltar los errores y otros eventos generados en los logs de SCCM, pero sin aprovechar su magia.

¿Donde podemos localizarla?

Pues depende de si estamos en SCCM 2007 o CM12 (si no la empleamos en la plataforma correcta no es capaz de parsear las fechas 😦 dando un valor genérico)

SCCM 2007:

En el site server SCCM Install Dir>\tools\, o si tenemos instalado System Center Configuration Manager 2007 Toolkit V2

En CM12:

En el site server SCCM Install Dir>\tools\, o en la carpeta compartida SMS_site\tools

tools1

Encontré esta artículo (vi algunos más pero no tan completos) en el que se explican algunas de estas:

https://blogs.technet.microsoft.com/configmgrdogs/2012/06/06/trace32-execmtrace-exe-hidden-features/

A resaltar:

  1. Error LookUp tool.

Esta herramienta permite traducir los errores 0x que se generan en los logs, tiene muchos de los codigos de error, pero algunos no estan documentados, para estos podemos emplear la herramienta Err.exe que explico en futuros post.

2. Merge

Esto te permite seleccionar varios logs (como particularidad tienen que estar en la misma carpeta, si no pierde la selección) y asi poder ver las actividades de varios comoponentes en orden cronologico y hacer un seguimiento del proceso de ejecucion completo.

tools4

Por ejemplo:

Un cliente no puede descargar un paquete/aplicación, ¿Como podemos ver donde esta el problema?

Haciendo un merge de los logs (Pudiendo añadir los logs historicos almacenados de otras fechas si seleccionamos la opción All Files y están todos en la misma carpeta)

CAS.log

ContentTransferManager.log

DataTransferService.log

LocationServices.log

tools2

Podremos seguir el proceso completo y ver donde se rompe.

3. Herramientas de filtrado.

Sobre este componente no he localizado información, y la verdad es que tiene una parte que me ha resultado muy útil a lo largo de los años, el filtro por proceso (Thread).

tools3

Todos conocemos el filtro por entrada de texto (igual que, que contiene, que no contiene…)y por entrada de fecha, pero ¿que hace un filtro por proceso y para que nos vale?

Pues a veces vemos que una actividad en el cliente/server tiene varios procesos abiertos y escribiendo en los logs al mismo tiempo mezclando información muy similar, y puede complicar su análisis, pues con este filtro solo vemos la actividad del proceso que nos interesa, útil y poco conocido.

Tambien tenemos el filtrado por componente, si tenemos un log en merge esto permite limitar los datos según lo que queramos analizar.

Pero esta herramienta no lo puede todo, para poder parsear los datos necesita un formato específico, si no lo localiza no hará el merge, con lo que no podremos emplear parte de su magia y no tendremos los datos deseados en la vista.

¿Que nos queda entonces?

Pues podemos emplear otras herramientas, que explicaré en futuros posts y que nos permitirán analizar varios logs sin el mismo formato o, en casos como IIS, analizar logs de gran tamaño (si alguno intento abrir un log de 20Mb con CMTrace entenderá de que hablo)

Un saludo y hasta el próximo post.

Raúl.

Tools to analyze logs Part1. CMtrace

When you are analyzing a situation with SCCM, one of the difficulties we usually find is having to go through a large number of logs, added to that, sometimes we need to look also components and services for other applications (SQL, IIS, …), or logs of the operating system, all of this may complicate the analysis process.

So which tools may help us to make easier this analysis?

There are some of the tools that helped me over the last years, beginning with the most obvious, CMTrace / Trace32, known to all, in this post I’ll comment its secrets and I’ll try to cover some of its limitations.

CmTrace.exe / Trace32.exe

This tool is known to all (at least I hope because it have been with us since SMS 2003) and, although used frequently, I’ve found that often it seems to be used only to highlight errors and other event logs in SCCM, and one log at a time, and this tool allow us to make some magic with the logs.

Where can we find it?

It depends on whether we are in SCCM 2007 or CM12 (if we do not use it in the right platform is not able to parse dates 😦  so be careful)

SCCM 2007:

In the SCCM site server Install Dir>\tools\, or if we setup it, the System Center Configuration Manager 2007 Toolkit V2

In CM12:

In the CM12 site server Install Dir>\tools\, or in the shared folder SMS_site\tools

tools1

I found this article (I found other posts but less comprehensive) that explains some of these features:

https://blogs.technet.microsoft.com/configmgrdogs/2012/06/06/trace32-execmtrace-exe-hidden-features/

Highlights:

1.Error Lookup Tool.

This tool allows you to translate 0x errors generated in the logs, has most of the error codes, but some are not documented, so we can use instead the tool Err.exe explained on a future post.

2.Merge

This allows you to select multiple logs (must be in the same folder, otherwise you lose your selection) so you can see the activities of several components in chronological order and track the entire process of execution.

tools4

Example:

A client can not download a package/application, how can we track where is the problem?

Doing a merge of logs is a good starting point (even will allow to add the stored historical logs that store data from other dates)

CAS.log

ContentTransferManager.log

DataTransferService.log

LocationServices.log

tools2

We can follow the whole process and see where it breaks.

 3.Search tools.

This component is not really documented, but to be honest this have been the feature that I have found useful over the years, the filter process.

We all know the filter text input and entry date, (with equal to, contains, do not contain, …) but what does one process filter?

Well, sometimes we see activity on the client / server has several open processes and writing in the logs at the same time(may looks like all of them write the same at the same time), and can complicate the analysis, with this filter only see the  interesting part for the Process ID that really handle the data, useful and not really known.

We also have the filtering/highlighting component, if we have a log to merge this can cut the data that we want to analyze.

tools3

But this tool can not do everything, to parse the data needs a specific format, but if is not located the files will not merge, so we can not use some of its magic.

What’s the option then?

Well, we can use other tools that I will explain in future posts, that will allow us to analyze various logs without the same format or, in cases such as IIS, analyze large logs (if anyone attempted to open a 20Mb log with CMTrace will understand what I mean)

Regards and until next post.

Raúl.