[SOLVED] Unable to install SNMP on Windows server 2012/2012 R2

Not to worry and those errors are fine, the service shouldn't exist yet until DISM has fully enabled the feature. I just wanted to double check that there wasn't any remnants left behind which may have been preventing the service from starting. Here's some steps to carry out:
  1. Reboot the server if possible - this has resolved odd issues similar to yours in the past
  2. Provide the System and Application event logs
  3. Provide the setupapi.dev.log which is available from %systemroot%\inf\setupapi.dev.log
To export the event logs quickly, then please open an elevated command prompt and enter the following commands:

Rich (BB code):
wevtutil epl SYSTEM %userprofile%\Desktop\Scar_UY_System.evt
wevtutil epl APPLICATION %userprofile%\Desktop\Scar_UY_Application.evt
 
I restarted the server, got the logs you asked for, and tried dism again:

Code:
PS C:\Users\administrator> Install-WindowsFeature SNMP-Service -IncludeAllSubFeature -Verbose
DETALLADO: Instalación iniciada...
DETALLADO: ¿Desea continuar con la instalación?
DETALLADO: Procesamiento de requisitos previos iniciado...
DETALLADO: Requisitos previos procesados correctamente.
Install-WindowsFeature : Error en la solicitud para agregar o quitar características en el servidor especificado.
La operación no se puede finalizar porque es necesario reiniciar el servidor especificado.
En línea: 1 Carácter: 1
+ Install-WindowsFeature SNMP-Service -IncludeAllSubFeature -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : DeviceError: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exce
   ption
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_Reboot_Required,Microsoft.Windows.ServerManager.Commands.AddWindow
   sFeatureCommand

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
False   No             Failed         {}
DETALLADO: Instalación correcta.


Weird thing is, the server had been restarted less than 10 minutes before trying that, tell me if you need more logs, I'll be back at work in a few hours.

Events+setupapi.7z
 
Could you please provide the setupapi.dev.log? You've provided the setupapi.app.log.
 
Unfortunately, your event logs don't much useful information apart from the error message you've had and a timeout issue with starting the TrustedInstaller service. I wonder if your CBS log contains anything useful now? Could you please provide the CBS logs along with the setupapi.dev.log?
 
The issue appears to not be with the installation of the associated components but rather with the starting of the SNMP service itself. It doesn't start in time and therefore ends up throwing a timeout error which causes the servicing stack to roll back the changes upon a reboot.

Rich (BB code):
2022-07-31 22:30:00, Info                  CSI    000000c9 Begin executing advanced installer phase 38 (0x00000026) index 24 (0x0000000000000018) (sequence 60)
    Old component: [l:0]""
    New component: [ml:322{161},l:320{160}]"Microsoft-Windows-SNMP-Agent-Service, Culture=neutral, Version=6.3.9600.16384, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=amd64, versionScope=NonSxS"
    Install mode: install
    Installer ID: {51d504ad-4868-464c-a504-e6cc8a210a97}
    Installer name: [7]"Service"
2022-07-31 22:30:03, Error                 CSI    00000003 (F) Logged @2022/8/1:01:30:00.536 : [ml:98{49},l:96{48}]"Attempting to start service {SNMP} synchronously"
[gle=0x80004005]
2022-07-31 22:30:03, Error                 CSI    00000004 (F) Logged @2022/8/1:01:30:03.583 : [ml:230{115},l:228{114}]"Service did not run. Current state (1) Exit code (0) Service specific exit code (0) Check point (0) Wait hint (0) "
[gle=0x80004005]
2022-07-31 22:30:03, Error                 CSI    00000005@2022/8/1:01:30:03.599 (F) CMIADAPTER: Inner Error Message from AI HRESULT = HRESULT_FROM_WIN32(258)
 [
[53]"Tiempo de espera de la operaci\u00f3n de espera agotado.

"
]
[gle=0x80004005]
2022-07-31 22:30:03, Error                 CSI    00000006@2022/8/1:01:30:03.599 (F) CMIADAPTER: AI failed. HRESULT = HRESULT_FROM_WIN32(258)
    Element:
    [673]"<serviceData xmlns="urn:schemas-microsoft-com:asm.v3" name="SNMP" displayName="@%SystemRoot%\system32\snmp.exe,-3" errorControl="normal" imagePath="%SystemRoot%\System32\snmp.exe" start="auto" type="win32OwnProcess" description="@%SystemRoot%\system32\snmp.exe,-4" objectName="LocalSystem" startAfterInstall="synchronous" sidType="unrestricted" requiredPrivileges="SeChangeNotifyPrivilege,SeSecurityPrivilege,SeDebugPrivilege">

  <failureActions resetPeriod="86400">

    <actions>

      <action type="restartService" delay="60000" />

      <action type="restartService" delay="60000" />

      <action type="none" />

    </actions>

  </failureActions>

</serviceData>"
[gle=0x80004005]

The only thing I can suggest is to remove Symantec Endpoint Protection completely using the official removal tool and then checking if that makes any difference. The CleanWipe tool should have come bundled with endpoint protection.
 
That was my first thought, since I saw the service in the services.msc but with missing tabs the first time I tried it.

I'll remove the AV, restart and try again as soon as I can work with the server and try again, I saw the same thing in the other two, It wouldn't surprise me if it was the same problem.

I'll report back as soon as Im able to try.
 
Well, uninstalling the AV, restarting and trying again worked for one of the other two servers but not in the other, that's still good! I can't try on this one until the night, I'll report back then.
 
Sadly, after uninstalling the AV, restarting, waiting for 20 minutes to be sure the server is idle and trying again, I got the same result, I guess I should just give up on this server and focus on the other one?
 
If one of the servers is now working correctly then it would suggest there must be something else with this particular one. Have you tried a repair install from the Windows 2012 Server R2 ISO? The ISO is still available from Microsoft Evaluation Center.
 
I'd try to avoid that route at all costs, since one of the servers that still won't install SNMP (the other one mentioned here: Unable to install SNMP on Windows server 2012/2012 R2) has a lot of stuff running and it'll be a p.i.a. to set it up again if something goes wrong (or restore it from a backup).

I can try that tho in a virtual environment, restore the server as a VM on an isolated network and try there, but I also seriously doubt my boss would let me try that in that server regardless of what the tests on a VM show.

If you still don't hate me too much and have the time, I can run the dism command on this other server with procmon running and upload the results...
 
You can try it but I don't think it will reveal too much other than the service failing to start. The only other possibility I can think of is that the Symantec tool has amended some of the firewall rules which the service is dependent upon, the following command will reset all the firewall rules to their defaults so you may want to check if you have any particular configuration in place before doing so:

Rich (BB code):
netsh advfirewall reset

Or, alternatively, you could try and install the SNMP service again and not allow the server to reboot - shouldn't need to reboot anyway - and then check if the service configuration key exists using the following:

Rich (BB code):
reg query HKLM\SYSTEM\CurrentControlSet\Services\SNMP /s

If it does, then change the Start value to manual and then reboot the server. It should then not attempt to try and start the service the immediately and you may be able to avoid the timeout error.
 
I run 'netsh advfirewall reset', and then disabled the firewall al toguether for good measure, and tried the installing using DISM, which failed, so tried again from the server manager GUI, also failed with error 0x800f0922, tried 'Install-WindowsFeature SNMP-Service -IncludeAllSubFeature -Verbose' which also failed but the services remained created, and the registry entries there, I can restart this server now so I'll update later.


Since it sounded like a good idea, on the other server (SQL server,) where I also uninstalled the AV previosly and restarted, with the firewall disabled, tried the install with dism, but failed at 96%:
Code:
[===========================96.0%=======================   ]

Error: 0x800f0922
Tried again from the server manager and also failed with error 0x800f0922.
Both times the reg query returned empty, just for giggles tried 'Install-WindowsFeature SNMP-Service -IncludeAllSubFeature -Verbose' which also failed:
Code:
Install-WindowsFeature : Error en la solicitud para agregar o quitar características en el servidor especificado.
La operación no se puede finalizar porque es necesario reiniciar el servidor especificado.
En línea: 1 Carácter: 1
+ Install-WindowsFeature SNMP-Service -IncludeAllSubFeature -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : DeviceError: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exce   ption
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_Reboot_Required,Microsoft.Windows.ServerManager.Commands.AddWindow   sFeatureCommand
BUT! the service remained created, and the reg entries where there, so I set it to manual and restarted, after that, SNMP service shows as instaled:
1660144471420.png

But the server is missing some tabs..
1660144801235.png

This loos like progress, seems like some trgistry entries are missing or something...
 
So, in the second server, since the missing tabs would indicate that the missing feature was "Server-RSAT-SNMP", because the tabs are present if I connect to the service from another server with working SNMP, I tried "dism /online /Enable-Feature /FeatureName:Server-RSAT-SNMP" wich worked with no errors, but the service wouldn't start even after another reboot, so I simply tried again "dism /online /Enable-Feature /FeatureName:SNMP" and after another reboot the service is up and running!

I'll try the same with the last server (the one we worked on in this thread) and report back tomorrow.
 
That's excellent news, it seems that changing the service configuration did help somewhat then.
 
A bit of progress, but with a twist. after restarting the server tried installing snmp with dism as before, but failed:
Code:
dism /online /Enable-Feature /FeatureName:SNMP
Error: 0x800f0922
So I tried from the server manager, and also failed with the same error, so I did as with the other and run:
Code:
Install-WindowsFeature SNMP-Service -IncludeAllSubFeature -Verbose
That also failed but just as with the other one, the service remained created, changed it to manual, connected from another computer and set the values, but the service closed itself upon starting.
So I also tried:
Code:
dism /online /Enable-Feature /FeatureName:Server-RSAT-SNMP
which failed saying there was a restart pending, so I restarted and tried again, and got the same error, weird, caught my eye that the server manager showed an alert:
1660222191571.png
Roughly translates to "online: cannot get role and feature data" which also means I can't add or remove roles and features, but for the moment that's unimportant.
My best guess was a broken component from the failed installations so I tried to run sfc /scannow which refused due "a restart is pending", tried "DISM /Online /Cleanup-Image /RestoreHealth", it completed so I restarted, but nothing changed, server manager showed the same alert, "dism /online /Enable-Feature /FeatureName:Server-RSAT-SNMP" would refuse to run due the restart pending, so I restarted, waited 15 minutes, restarted again, run chkdsk, restarted again a couple more times waiting aprox 15 minutes in between, but nothing changed, sfc refuses to run, server manager shows the same alert, dism wont enable SNMP nor Server-RSAT-SNMP, and the installed but set on manual SNMP service won't start no matter what.

I'm about to give up on this and accept my faith that I'll hac e to schedule an in place reinstall, still, I can't complain, 2 out of 3 is not a bad result in my book.
 
What was the result of DISM [...] /RestoreHealth on the last machine having the issue? I assume it failed?

Roughly translates to "online: cannot get role and feature data" which also means I can't add or remove roles and features, but for the moment that's unimportant.
If that's the same error message that I'm thinking of, then it will be contributing to the problem since DISM is unable to find the features which are currently installed on the system. Could you please open an command prompt and then enter the following command:

Rich (BB code):
DISM /Online /Get-Features

Please let me know if it fails or not.
 
What was the result of DISM [...] /RestoreHealth on the last machine having the issue? I assume it failed?
It didn't the first time, after that first time the next two gave the same message, a restart is pending.

DISM /Online /Get-Features:
Code:
C:\Windows\system32>DISM /Online /Get-Features

Herramienta Administración y mantenimiento de imágenes de implementación Versión: 6.3.9600.19408

Versión de imagen: 6.3.9600.19397

Lista de características del paquete : Microsoft-Windows-ServerCore-Package~31bf3856ad364e35~amd64~~6.3.9600.16384

Nombre de característica : NetFx4ServerFeatures
Estado : Habilitado

Error: 3017

Error en la operación solicitada. Se requiere un reinicio de sistema para revertir los cambios realizados.

El archivo de registro de DISM se encuentra en C:\Windows\Logs\DISM\dism.log
Roughly, a restart is required to revert changes.
 
I would allow the system to restart and then try the second command again: DISM /Online /Get-Features.
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top