Monday, November 3, 2008

Services for Unix "Network Error 53"

"Network Error 53", "The data area passed to a system call is too small" or "Unknown Error"

Client for NFS included with Windows Server 2003 R2 returns different errors when trying to access NFS shares on UNIX-based NFS servers. The exact error message may depend on your environment - you might get one or more from the ones mentioned above. And, at the same time, SFU 3.5 Client for NFS may work just fine.

Analyzing the network traffic may show MOUNT or NFS calls being "rejected for security reasons (5)".

The R2 Client for NFS uses high ports (>1024) to connect to NFS servers and that's known to cause the above errors. There are two ways to fix this -

Change how your NFS servers export the NFS shares and make them allow connections from high ports
OR
Add /UseReservedPorts /DWORD value under HKLM\Software\Microsoft\Client for NFS\CurrentVersion\Default and set it to 1.

Restart the Client for NFS service to allow the change to take effect.

Documentation to support running a program (application, script, etc) as a Windows Service:

Requirements:  There are two utilities needed to run a program as a NT
Service

srvany.exe and instsrv.exe

instsrv installs an instance of srvany as an NT Service and throughout the rest of the setup process that instance of srvany runs the program.


1. To install srvany, open a command shell by clicking Start, Run, cmd and in the console window type INSTSRV NAME_OF_SERVICE

C:\Windows\System32\SRVANY.EXE

(If srvany is not located in C:\Windows\System32\, this command needs to be changed accordingly.) This initializes an instance of srvany as an NT Service with NAME_OF_SERVICE as the Service name. This name will appear under the Services application in the Control Panel.

2. The next step is to edit the Windows NT Registry using RegEdit - Click on Start, Run, regedit.

3. Now locate the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NAME_OF_SERVICE registry key. The key can be found by either maneuvering through the registry tree, or by searching for NAME_OF_SERVICE (Edit->Find). Right click on the key and choose New, then Key. This will create what looks like a new folder. Name the new key Parameters.

4. Right click on Parameters and select New, then String Value and in the space provided type Application.

5. Again, right click on Parameters and select New, then String Value and in the space provided type AppParameters.

6. Right click on Application and choose Modify, then type in the path to your Perl binary. For example c:\perl\bin\perl.exe.

7. Next, right click on AppParameters and select Modify then enter the path to the program you want run as a Service. There are no more required registry changes, so RegEdit can now be closed.

8. Now open the Control Panel and double-click the Services application. There should now be a service listed with the name of the service you chose in step one. The Startup option should be set to Automatic by default, but if it is not, click Startup and then Automatic if you want the Service to be started automatically when the machine boots. If you do not want it to start automatically, choose Manual. It is also best to have it log in as the System Account (which should be the default) because this way it will run no matter who is logged on to the machine, and even if no user is logged on. If appropriate, choose a user with the proper permissions for the application for the Log On As option. To get a little more information on Services, choose Start->Help->Find, type in Services and select "To configure startup for a service."

9. Finally, choose the Service from the list of Services, and click the Start button to launch it. The program is now running as an NT Service.