Thursday, January 8, 2009

Use "nsd -kill" when killnotes doesn't work

Today, I got a "Shared memory error" after the Notes client crashed.

KillNotes didn't clean all the processes. This resulted in not being able to start Notes again. I did a little search, and found the solution.

I created a small bat-file that executes the NSD-command. If you want to use it, you probably have to change the line that has the path to Notes, "cd \Program Files\lotus\notes\" to fit your environment.

13 comments:

Simon O'Doherty said...

Yours should work find. I used this instead. For the Beta the nsd -kill didn't remove everything.

----
@echo off
taskkill /F /FI "IMAGENAME eq nsd.exe"
taskkill /F /FI "IMAGENAME eq notes2.exe"
taskkill /F /FI "IMAGENAME eq nlnotes.exe"
taskkill /F /FI "IMAGENAME eq notes.exe"
taskkill /F /FI "IMAGENAME eq ntaskldr.EXE"
----

BigBearFreddy said...

I created a desktop icon that runs:
C:\Lotus\Notes\nsd.exe -kill
start in:
C:\Lotus\notes\data

Configure a nice icon and you're done...

Tommy Valand said...

@BigBearFreddy: Shortcuts are too 21st century for me.. I live in the .com and .bat world.. :)

Yours is easily a more esthetically pleasing solution (depending on the icon you choose).

BigBearFreddy said...

@Tommy: Your're quite right, but there are moments that a shortcut is very easy... Specially when Notes crashes 3 times in a row.
And, more importantly: no end-user understands .bat. Which is a good thing, they would just make a mess of it...

MIOPIASCOPIA said...

I usually use the ZapNotes software which is available from the Sandbox for this purpose.

inajeep said...

Interesting, I switched to killnotes.exe since the nsd -kill never worked well for me. I had used zapnotes before which worked well too.

Tommy Valand said...

The great/dangerous thing about "nsd -kill" vs killnotes is that the nsd-method tries to "kill" all Notes/Domino tasks whereas killnotes closes only the client tasks.

A certain plugin (won't name names) locks the HTTP-task so that you can't kill it using the admin console. Using the nsd method, you can close down the Domino server cleanly without having to restart the computer.

(I'm no admin, so if there is a better way than the nsd-method for closing a server when the admin console won't, please don't crucify me..)

Alcino said...
This comment has been removed by the author.
Alcino said...
This comment has been removed by the author.
Alcino said...

Alcino
Alternately, you can search for the ntaskldr.exe in your Task Manager Processes and then click on the End Process icon.

1. CTRL-ALT-DEL on your keyboard
2. Task Manager
3. Click the Processes tab at top
4. Find ntaskldr.exe in list
5. Click End Process icon

VoilĂ  !

Anonymous said...

Here is a Batch file that I created to kill notes first by trying gracefuly and if that didn't work, than I forced it. I am sure there are better ways, and modify this as you wish.
----------

@Echo on
:Variables
Set Killnotes=Taskkill /F /IM notes.exe /T
Set Killnotes2=Taskkill /F /IM notes2.exe /T
Set Killnlnotes=Taskkill /F /IM nlnotes.exe /T
Set Killntaskldr=Taskkill /F /IM ntaskldr.exe /T
Set Killnsd=Taskkill /F /IM nsd.exe /T

:OSVersion
ver | find /i "XP"
IF "%ERRORLEVEL%" == "0" (Set SysOS=WinXP) Else (Set SysOS=Win7)
IF "%SysOS%"=="Win7" goto Win7

:WinXP
set notesdirquery=Reg Query "HKLM\SOFTWARE\Lotus\Notes" /V Path
echo %notesdirquery%
FOR /F "tokens=2* delims= " %%A IN ('%notesdirquery%') DO SET NotesInstallDir=%%B
echo %NotesInstallDir%
cd "%NotesInstallDir%"
goto Kill

:Win7
set notesdirquery=Reg Query "HKLM\SOFTWARE\Wow6432Node\Lotus\Notes" /V Path
echo %notesdirquery%
FOR /F "tokens=2* delims= " %%A IN ('%notesdirquery%') DO SET NotesInstallDir=%%B
echo %NotesInstallDir%
cd "%NotesInstallDir%"

:Kill
nsd.exe -kill
Set NSDerrorcode=%ErrorLevel%
ping -n 15 127.0.0.1
echo %errorlevel%

:TaskList
tasklist | find /i "notes"
IF "%ERRORLEVEL%" == "0" %Killnotes%
tasklist | find /i "notes2"
IF "%ERRORLEVEL%" == "0" %Killnotes2%
tasklist | find /i "nlnotes"
IF "%ERRORLEVEL%" == "0" %Killnlnotes%
tasklist | find /i "ntaskldr"
IF "%ERRORLEVEL%" == "0" %Killntaskldr%
tasklist | find /i "nsd"
IF "%ERRORLEVEL%" == "0" %Killnsd%
:End
Echo %NSDerrorcode%
Exit /B 0

-----------
-Rob

Unknown said...

Hello, Im new in this area, but the problem I resolved, uninstall Blackberry Desktop Manager, besides the notes.ini was corrupt.
Sorry by my poor english.
Regards

Mary

Anonymous said...

@Alcino - Thanks!! that was really simple.