Skip to main content

How to create a Metadata Server Cluster in a single machine?

Metdata Server Cluster gives more availability than a single Metadata Server. I succeeded adding a node to metadata server in SAS 9.4 and here you will find how to do that. Your host machine should comply with all pre-requite in order to set up a cluster. I did this in Red Hat Enterprise Linux OS. The steps are almost similar for Windows OS too as we will be using SAS Deployment Wizard.

Create a directory to store backup which is common to all nodes in Cluster:
The first step in setting up cluster is creating a common backup directory. You can create a directory anywhere you like but make sure sas account has read, write and execute access to this directory. Let's say I have directory called SAS and now I am creating a new directory inside it.

% mkdir /SAS/MetaClusterBackup
% chown sas:sas /SAS/MetaClusterBackup
% ls -ld /SAS/MetaClusterBackup
drwxrwxr-x. 2 sas sas 4096 Mar 15 07:32 MetaClusterBackup

I named the directory as per SAS documentation. You are free to choose the name you like.

If you are doing it for multiple machine you need to make sure that this directory is a shared location.

Configure the Backup path:
Open SAS Management Console. In Metadata Manager Plug-in -> Metadata Utilities , right click on Server Backup. You can see a option called Backup Configuration. Now you need to change the path to the directory you created in above step. In my case it is /SAS/MetaClusterBackup.

Do a test backup:
Now check whether are you able to take backup. To check, in SAS Management Console -> Metadata Utilities -> right click on Server Backup and click on Run Backup Now. It will prompt for comment, give it as "Cluster backup testing" or whatever you prefer.

You should see a gree check mark if the backup is performed successfully. You can also check the directory /SAS/MetaClusterBackup where you will find new backup files will be created.

If something goes wrong in backup you might have messed up with permission. In my environment user "sas" is the SAS installer account. Maybe your environment have different account.

SAS Deployment Wizard to install new cluster node but should be careful:
You should know the location of setup.sh file in your environment. Run the file by issuing

% ./setup.sh

We use this script to install new environment, this script will lauch SAS Deployment Wizard. For example Lev1, Lev2, Lev3. Each level is a separate environment. This deployment wizard has risks of overwriting your previous environment. Make sure in which Lev your environment is running.

After you run setup.sh script it will ask you to choose language. Select English -> OK. Select Install SAS Software, the path should be your SAS Home directory. If you are not sure which is your SAS Home directory then it is the location where SAS Software instances are installed. That directory will be your SAS Home directory.

Now deselect Install SAS Software and select Configure SAS Software. Here I asked you to deselect Install SAS Software because we are doing it in single machine. It means the SAS Software were already installed in your machine. Then Click Next.

Now select the Step 2: Metadata Server Node (Optional) and click next. Your window will calculates the required and available disk space. If there is sufficient space then click Next.

Choose the level as Custom and then click Next. Now you need to specify the SAS Configuration Directory by clicking on Browse. Configuration directory is the location where you find directory named as Lev1 or Lev2 etc. In my environment I have only Lev1 so I will choose configuration level to Lev2.

Warning: Be careful in this step. You need to know how many levels of installation is made in your platform. You need to choose a new level in this step. Choosing old or existing level will overwrite.

Now select only SAS Metadata Server Node Configuration as our task is to add new node. Deselect the remaining option and click Next.

Check the fully qualified hostname and short name. You can use the following command in Linux to get your hostname.

% hostname

Usually it will show you the correct hostname but check for spelling mistakes. Click next.

This step is for migration and we are not doing migration so just click Next.

Select DefaultAuth as the Authentication Domain and click Next.

Give the fully qualified hostname and change the listening port to any new value. For example: my previous metadata server port is 8561, so I will give 8562.

Warning: Since the new node of Metadata Server is in same machine the hostname will be same. However you should differentiate it with new port number.

Select default options for below steps.
Agree with default Log File Name and click Next.

Don't change the local host port, will be your previous Metadata Server port. Click Next. Allow to use internal account and click next. Use the default installer id (ie) sas for me. Provide the password and click next.

Remember the credentials you give
In this step it will as for Unrestricted Administrator internal password give the password and click next. For Create Common Directories keep it unchecked for all. For Environment Manager agree with default settings and click next.

All steps are done now. Click Start. It took me 5 - 15 minutes. Click next and then finish.

Now you can see there will be a new configuration directory created. For me it is Lev2. You can check the server status. The command is:

%./sas.servers status

Output:
SAS servers status:
SAS Metadata Server 1 is UP.

Comments

Popular posts from this blog

Insufficient authorization to access PIPE error in SAS EG

Issue: When I tried to run SAS code in SAS Enterprise Guide it throws following errors: ERROR: Insufficient authorization to access PIPE. ERROR: Error in the FILENAME statement. Screenshot of error: Solution: This error occurs when you try to run OS commands in SAS code. To run the OS commands in SAS code you need to enable XCMD option. You check it in SAS Management Console by following below steps.   Open SMC -> Expand Servers -> Expand   In SASApp , expand Logical Workspace Server -> right click on Workspace Server. Click properties -> option tab -> advanced options -> launch properties. Check whether Allow XCMD is checked. The issue arises if the Allow XCMD is not checked. In above image, Allow XCMD option is not checked. It should be checked to run OS commands from SAS code. In Unix /Linux machines, this XCMD option can be enabled by using system option XCMD in sasv9 config file or workspaceserver.sh script f...

The authentication server is not SETUID ROOT error in SAS

Question: When validating the SAS Server from SAS Management Console, I received the following error: The authentication server is not SETUID ROOT.  So, I ran the setuid.sh utility and restarted the services many times. I just checked the elssrv sasauth sasperm setuid bit. There were no error in sasauth-debug.log, sasauth-access.log, sasauth-error.log.  Any suggestions? Answer: Please do the following:    1) Run /<SASConfig>/Lev<X>/ObjectSpawner/ObjectSpawner.sh stop  2) Edit /<SASConfig>/Lev<X>/ObjectSpawner/ObjectSpawner.sh and add the code shown below right after SCRIPT=`basename $0`:  if [ -n ""$TKPATH"" ]; then  unset TKPATH  fi   if [ -n ""$TK_PATHLIST"" ]; then  unset TK_PATHLIST  fi    3) Run /<SASConfig>/Lev<X>/ObjectSpawner/ObjectSpawner.sh start  The above code change in ObjectSpawner.sh should fix the issue.

SAS - CLI error trying to establish connection

Issue: User asked me to make a database connectivity to SQL Server. They provided following details SQL server hostname and ip address Database/DSN name Username Password I made entry in ODBC.ini file. You know, SQL Server entries were made in ODBC.ini and Oracle entries were made in TNS.ora file. Everything went fine, took back up of odbc.ini, made entry and saved the file. So to test this connection I ran the libname statement in SAS Enterprise Guide 6.1. It throwed following error. Error Message: My DB team showed that they are able to login   14 GOPTIONS ACCESSIBLE; 15 LIBNAME test ODBC DATASRC=SGE_DS SCHEMA=VST USER=sales PASSWORD=XXXXXXXXX; ERROR: CLI error trying to establish connection: [SAS/ACCESS to SQL Server][ODBC SQL Server Legacy Driver][SQL Server]Login failed for user 'sales'. Solution: First I suspected that Login failed for user 'sales' meant the password provided by DB team was wrong. They responded that they were able to login wi...