Archive for the ‘LSF’ Category

LSF reports “CScript Error: Loading your settings failed. (Access is denied. )”

Wednesday, March 18th, 2015

This was an odd error. We are setting up a new image for our farm and one user reported this message when he submitted his jobs:

CScript Error: Loading your settings failed. (Access is denied. )

Everything looked in order but for some reason his vbscript job failed. Looking around the Net, I did find a kb article which mentioned enabling vbscript for CGI. It seemed odd bot be touching the users key but I gave it a try.

I created the following keys:

HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script Host
HKEY_USERS\.DEFAULT\Software\Microsoft\Windows Script Host\Settings

The technote said to verify Everyone has access but I decided to leave it to the Users group.

I also decided to also add the following entries in the settings key:

BatchMode: REG_DWORD: 0
DisplayLogo: REG_DWORD: 0
Timeout: REG_DWORD: 0

There was no need for a reboot.

The user was able to submit jobs after that.

I did not heavily research the reason but I am assuming with Microsoft’s effort to go into Powershell (you should look at it if you haven’t); some things are left out of the Windows Scripting Host on new installs or this was a case of the user once being a local admin and that was removed.

-UPDATE-

Well now. This turned out to not be the case. We have working on automating the setups and this is what caused the problem. In the past, we would login as a specific user and finish the install. Debugging we would login as a user and the problem went away.

The villain?  No user profile on the system!

Once we logged in as the user and the profile was created; job submits worked!

A nuance that is easy to miss!

BHIST command windows returns an NFS path.

Wednesday, November 12th, 2014

A windows user testing out LSF reported an error message when trying the bhist command:

/remote/lsf/work/<farm name>/logdir/lsb.events: No such file or directory

This looks odd but is expected as there was a configuration option missing and the command was defaulting to what the master host had configured. The master in this situation is a Linux host.

To fix this; you simply need to add an option to the conf file on your LSF setup on windows:

LSB_SHAREDIR=”\\<windows server>\lsf\work”

Note: we use netapp filers to house our log files, etc.

Restart the LIM, RES, and SBD services and the command will work.

Note: It did take a little to respond.  Might be the way it works but the command wasn’t even used until this incident.  I may research it if somebody complains.

Job’s resource requirements not satisfied

Wednesday, November 12th, 2014

LSF had an odd message for a user.

Job’s resource requirements not satisfied

This could go in many ways and waste time reviewing the resource configuration for the server.

Many things were checked and in the end; the problem simply the server was administratively closed.

Once opened; jobs flowed again.

saveIndx: Unknown index name from ELIM

Monday, August 11th, 2014

While reviewing a server for an issue; I noticed a few messages from LSF.

saveIndx: Unknown index name <name> from ELIM

This message is reported a missing flag from lsf.shared. A quick edit and a process and service restart and the message went away.

 

set-executionpolicy unrestricted is denied.

Sunday, February 3rd, 2013

One of the steps we have for setting up a new LSF server is to run a powershell script which does a survey of the machine. The first step is to un-restrict the execution policy via this command:

set-executionpolicy unrestricted

The command was entered and it returned this nice little error:

Execution Policy Change
The execution policy helps protect you from scripts that you do not 
trust. Changing the execution policy might expose you to the security 
risks described in the about_Execution_Policies help topic. Do you 
want to change the execution policy?

[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
Set-ExecutionPolicy : Access to the registry key 'HKEY_LOCAL_MACHINE\
SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft .PowerShell' is 
denied.

At line:1 char:20
+ set-executionpolicy <<<<  unrestricted
    + CategoryInfo          : NotSpecified: (:) [Set-ExecutionPolicy], 
      UnauthorizedAccessException
    + FullyQualifiedErrorId : System.UnauthorizedAccessException,
      Microsoft.PowerShell.Commands.SetExecutionPolicyCommand

Rather odd since all security was correct.

Two obvious ideas are to upgrade powershell or reinstall it. Neither was an option is this situation.

I did a quick look around Microsoft and found this.

I decided to try the registry option and added the login.

* Run: regedt32
* Goto HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell
* Right-Click > Permissions
* Select, and add your account, grant it “Full Control” privileges
I re-entered the set-executionpolicy command and this time it worked.

 

Restart windows service from Linux

Monday, April 2nd, 2012

I had a request on how to restart the three LSF services from a script. The person worked on the farm team and did not relish the idea of using remote desktop or VNC.

I thought about a Powershell script or using a batch script to run the PsService from sysinternals. It looked simple as the command is as follows:

psservice \\<computer> -u <domain\username> -p password stop service <service name>

psservice \\<computer> -u <domain\username> -p password start service <service name>

I contacted the user and asked a couple more questions and learned she wanted to run the script from Linux. Of course this required a change in my approach as I like to keep things as simple as possible especially when a user will write their own script. I decided to abandon windows scripts and find away to see if Linux could handle this via the windows management interface.

Looking around the Net, I found a way I didn’t even consider. Simply install the Samba-Common. This offers the Net utility(or as close to it as possible) for the Linux host. The particular command in question is Net RPC service command:

To list out the services on a Windows computer:

net rpc service list -I <IP Address> -U “<domain\username>%<password>”

If you wish to use the command line; simply remove “%<password>” and you will be prompted for a password.

To start or stop a service; you would enter:

net rpc service {start|stop} <Service Name> -I <IP Address> -U “<domain\username>%<password>”

Again, if you wish to use the command line, simply remove “%<password>” and you will be prompted for a password.

The account used will have to have local admin privileges so if you decide to script it, secure the file to yourself since the password will be plain text.

Much as I would like to impress you with my great knowledge; there was a sense of urgency to the request so I went to the Net and I did get help from the following sites so credit must be given where credit is due.

LifeHacker

Commandlinefu

LyleBackenrorth

LSF will not re-install

Saturday, March 17th, 2012

There was a case were an LSF installation had to be reinstalled on a Windows 7 machine. We ran the uninstall and deleted the LSF folder from the C drive. However, when attempting the re-installation; we received a message about the LIM service already running for the cluster.

Checking the services; I found Platform LIM still listed. Normally you would also see Platform RES and Platform SBD.

The suggested solution was to re-install the system. This was not attractive as the build process takes time to configure and verify for production.

My first thought was the service was keeping the installation process from running. The question was how to remove it?

After a little search I found the sc command which allows you to use the command line to interact with the Service Control Manager and Services.

The command needed:  sc delete [service name]

Now what would be the service name? If you return back to the services interface and double-click Platform LIM, you will see the service name which is : LIM.

You can also use the sc command by entering: sc query | more

This will list all services. Look for Platform LIM and above it will be the service name.

After I found the service name; I entered:

sc delete LIM

The service went away and the LSF installation was successful.

Technet Documentation for sc delete.