The usual IT babble
Posts tagged Windows Server 2003
Windows Server 2003: taskmgr giving “Logon failure”
Feb 25th
I had myself a lot of fun today. I ended up patching a Windows Server 2003 x64 SP1, where the Task Manager wouldn’t start anymore. It simply failed (or in case of right clicking on the task bar wouldn’t even appear), so I went downstairs and pulled a hard disk out of the RAID1 array, just to be sure.
I went ahead, installed SP2 (as you can see on the above picture) while having the jitters. Also installed the VirusScan I was scheduled to install, and the system came back online. Phewww.
After my maintainance window was over, I looked into this issue a bit deeper. First tried copying over a taskmgr.exe (both 32bit and 64bit) from another Windows Server 2003 x64 SP2 system with no luck. The next step, was looking at PATH. As it turns out it has something to do with that ….
C:\>echo %PATH% C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem C:\>taskmgr The system cannot execute the specified program. C:\>set PATH=C:\WINDOWS\SysWOW64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem C:\>taskmgr C:\>
As you can see, after fixing up the PATH environment variable, it works apparently .. Weirdly though, this issue doesn’t come up on another (identical) system, same PATH modifications, main difference: calling taskmgr.exe from the Run dialog works .. while it doesn’t on this particular system.
*Shrug* Gonna have to talk to my SAP guys tommorrow …
VBscript: Query remote OS and SP info (continued)
Feb 15th
After some more crunching on my VBscript, I think I finally have a working script that runs through a csv-list I point it to and walk onto each system (by ip-address only sadly) and query the os and the Service Pack that is installed. The CSV may look like this:
Hostname;IP;Model;Description;OS;Service-Pack;BL;Priority epimetheus;10.0.0.2;VMware guest;File-Server hades;10.0.0.1;VMware guest;Core-Router
After saving that one, and running a cscript //NoLogo win_sp_level.vbs you should find a completed list like this:
Hostname;IP;Model;Description;OS;Service-Pack;BL;Priority epimetheus;10.0.0.2;VMware guest;File-Server;Windows Server 2003 Standard x64 Edition; SP1;; hades;10.0.0.1;VMware guest;Core-Router;Windows Server 2003 Enterprise Edition; SP0;;
The final script looks like this:
On Error Resume Next
Set objFSO = CreateObject("Scripting.FileSystemOBject")
If objFSO.FileExists("Rollout_SP2.csv") = 0 Then
CleanUp()
Wscript.Quit
End If
Set CSVin = objFSO.OpenTextFile("Rollout_SP2.csv", 1)
CSVin_read = CSVin.ReadLine
Set objFile = objFSO.CreateTextFile("Rollout_SP2_result.csv")
Set objFile = nothing
Set CSVout = objFSO.OpenTextFile("Rollout_SP2_result.csv",
CSVout.WriteLine("Hostname;IP;Model;Description;OS;Service-Pack;BL;Priority")
Do While CSVin.AtEndofStream <> True
Dim os, servicepack
Dim user, password
os = nothing
servicepack = nothing
user = vars(1) & "\chrischie"
password = "hah-this-password-is-easy"
current_line = CSVin.ReadLine
vars = Split(current_line, ";")
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer _
(vars(1), "root\cimv2", user, password, "MS_409",, 128)
objSWbemServices.Security_.ImpersonationLevel = 3
Set colOperatingSystems = objSWbemServices.ExecQuery _
("Select * from Win32_OperatingSystem")
' The set returns an Err.Number of 91 on success
' Don't ask me why though.
If Err.Number <> 91 Then
CSVout.WriteLine(vars(0) & ";" & vars(1) & ";" & vars(2) & ";" & vars(3) & ";NA;SP?;;")
Else
For Each objOperatingSystem in colOperatingSystems
os = objOperatingSystem.Caption
servicepack = objOperatingSystem.ServicePackMajorVersion
Next
CSVout.WriteLine(vars(0) & ";" & vars(1) & ";" & vars(2) & ";" & vars(3) _
& ";" & os & "; SP" & servicepack & ";;")
End If
Loop
The only thing I still need to improve is the error handling (as in notify when a system is being skipped due to RPC being unavailable).
VBscript: Query remote OS and SP info
Feb 12th
As I wrote on Thursday, I am battling with Windows Server 2003. Now I got a list out of our change management database, which sadly ain’t that accurate. So in order to get reliable information about the target systems (in order to do some accurate planning), I ended up writing a small vbscript which simply takes the hostname on the command line (cscript //NoLogo win_sp_level.vbs 10.0.0.5) and returns a csv-like element.
We may have to tune the script a bit more for our use, but it should show the basic functions I need.
Dim hostname, os, servicepack
hostname = WScript.Arguments.Item(0)
strComputer = hostname
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer _
(strComputer, "root\cimv2", hostname & "\chrischie", "hah-this-password-is-easy")
objSWbemServices.Security_.ImpersonationLevel = 3
Set colOperatingSystems = objSWbemServices.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
os = objOperatingSystem.Caption
servicepack = objOperatingSystem.ServicePackMajorVersion
Next
Wscript.Echo hostname & ";" & os & "; SP" & servicepack & ";"
Windows Server 2003 SP1, WSUS and Security Updates
Feb 11th
Recently, we found some systems (sadly, customer systems) that weren’t getting any Security Updates anymore. Much more sadly, them is running Windows Server 2003, and as you know Security Updates are pretty important for Windows Systems.
At the time of finding this, I had no clue as to why the were not getting any updates. At first we thought it had something to do with the WSUS server, so I upgraded the WSUS 3.0 SP1 to SP2. Since that didn’t solve nothing, I went searching for a internal VM, that showed the same symptoms and I quickly found one.
After cloning said VM (since that one is running in the production environment), a bit of hacking on it (you know, disabling the network of the VM, switching IP and Hostname, running NewSID, …) I went cracking at the problem.
Stopped the Windows Update Service, cleaned the %WINDIR%\SoftwareDistribution, and started the Windows Update Service again; triggered a wuauclt.exe /detectnow /reportnow. Yet again the same result. “0 updates detected”. Shite.
Went ahead, and tried what Microsoft in their “If you have trouble with Windows Update” knowledge base article, but then again. Same result.
Another try, was simply reinstalling the Windows Update Agent, which also resulted in the same old … “0 updates detected”
Due to some discussion with my co-workers, I ended up clicking through a Microsoft KB for a recently released patch. What I found, was that any newer update I looked at, only had “Windows Server 2003 with Service Pack 2″ listed as download element. Shite.
Somehow, I stumbled over a link (in the same KB article) detailing the Support Lifecycle for Service Packs in general, as well as the Lifecycle announcements for each Service Pack.
End of the story and solution to my problem basically is, Microsoft terminated the Lifecycle for Windows Server 2003 SP1 on 14.04.2009, which is the target date after which Security and Critical Updates are no longer issued for systems running SP1.
In the end, I don’t really blame them, since SP2 was already released in 2007. But what I would’ve expected is some kind of press release or a public note, that Security releases are gonna end. Another construction area identified, more work for me!
Tivoli Storage Manager Client and Microsoft Cluster Services (continued)
Feb 16th
As you might recall from my first article about this topic, I had some troubles with the Microsoft Cluster Services and the registration replication. Now, today as we tried switching the TSM-Server for some resources, we ran into this again.
We were using the service install tool (dsmcutil install scheduler) to set the new password as well as the GUI. Now, as we brought the resource online with the local service manager, everything was honky dory. But as soon as we brought it online using the Cluster Manager, it failed horribly. Why ?
Well, as I read the Microsoft KB the last time, I started remembering something about the replication.
- When the resource goes online, the registry keys are updated with the previously checkpointed information.
- When the resource is brought offline, all the checkpoints associated with this resource are saved.
If you manually update these registry keys while the application or service is offline, the changes may not be replicated or may be lost. To prevent this from happening, make any manual changes while the service or application resource is online.
Simply put, when you toggle the resource offline, the cluster saves the registry from the currently running node onto the quorum (checkpoints). As we changed those settings while the resource was offline, it discarded them, as we toggled it back online with the Cluster Manager.
Simple solution: just remove the registry replication parameter when the resource is offline (and click “Apply” and “OK” afterwards). After that update the registry on the cluster node currently owning the physical disk drive (either using the GUI or dsmcutil). Afterwards, re-add the registration key and you should be able to “force” the Microsoft Cluster into thinking that the registry you have on this cluster node is the valid one.