WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

NetwareX Extender

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Error 120 nwSvrShutdown


Question:

I am receiving the following error:
nwSvrShutDown 'Error 120: Not attached to server or tree name'
When I attempt to execute nwSvrShutDown from an APC PowerChute Application. If I launch the same script outsidte of APC PowerChute it executes flawlessly.

The wwwbatch.ini file inidcates the following:

LastError = 8884 ( nwccopenconnbyname() : wwnwx_GetTreeAndOrServerFromServer() ) 

Answer:

Here's the error definition from nwerror.h:
#define RESOLVE_SVC_FAILED                 0x8884 // Client-32
The key part is that the error occurs when trying to run the script from within the APC Powerchute software. That software is running as a native NT service. When you do anything involving the Novell Client and a program running in service mode, you have to account for the security contexts that exist in the NT platform family. In your case, the service is not running under the same credentials as the interactive user so it does not share the user's NetWare environment.

In a nutshell, the APC Powershoot software is running in a separate security context from what the interactive desktop user is running, and as a result of this, the service does not share the same Novell Client authentication & connection information that the interactive desktop user has. Even though the user logged in to NDS/eDir and can make authenticated connections to NetWare servers, the service is *not* logged in to NDS/eDir so all attempts at establishing authenticated connections will fail. It will be necessary for the WinBatch script being executed by APC PowerChute to perform its own call to nwLogin() to provide the Novell Client with user credentials that can be used to access resources within a particular NDS/eDir tree.

The error message 120 about not being attached to a server or tree really is accurate, as nwSrvShutdown() is attempting to establish an autenticated connection to a server, and it is finding out that the Novell Client is not authenticated to the tree in which the specified server is located.

In short you will need to add nwLogin to your script.


Article ID:   W16539
File Created: 2005:02:18:12:21:22
Last Updated: 2005:02:18:12:21:22