Microsoft Network Policy Server Synchronization Script

No comments:
This powershell script is written for automating to export configuration from master NPS and then import it on a secondary NPS in order to keep a secondary NPS ready with latest configuration. Script must run on secondary node. The account that runs the script must be the member of both of the master and secondary servers local administrators group.

Rescan all linux scsi buses from command line

No comments:
Newly added scsi disks can be scanned like this:

# for b in $(find /sys/class/scsi_host/ -name scan*); do echo "- - -" > $b; done

How you can determine a linux server is a virtual machine or not

No comments:
So you logged in a linux box remotely and you don't know if it is a virtual machine or a physical machine. Additionally it can be created by using any of the virtualization vendor's platform such as Citrix XenServer, RHEV, VMware etc.

Linux Bash if statements to check whether a file exists or not

No comments:


echo "Checks whether a file exists or not, and identify the type of it"
echo -n "Enter path of the file: "
read thefile

lid command man page

No comments:
lid - Display user’s groups or group’s users

gcloud command not found error

No comments:
In order to manage your Google Cloud Platform resources, Google Cloud SDK should be installed. Then Gloud command line utility comes with this SDK. But i encounter a problem with gloud command after installing on my Mint Linux. Even if i restarted terminal session, when i try to run 'gcloud auth login' command i encountered 'gcloud: command not found' error. That's because SDK installer put gloud binary's path using .bashrc file in the user's home directory. In my case i put these .inc files in .bash_profile, then restart terminal session:

# The next line updates PATH for the Google Cloud SDK.
source '/home/kadir/google-cloud-sdk/'

# The next line enables bash completion for gcloud.
source '/home/kadir/google-cloud-sdk/'

Hbase Region is Multiply Assigned to Region Servers

No comments:
After running hbase hbck command from command line, following errors says that  Hbase Region is Multiply Assigned to Region Servers. Status is inconsistent.

Number of Tables: 1
Number of live region servers: 8
Number of dead region servers: 0

........Number of empty REGIONINFO_QUALIFIER rows in .META.: 0
14/03/18 11:56:05 DEBUG client.HConnectionManager$HConnectionImplementation: The connection to hconnection-0x344d0b06aaa0028 has been closed.
ERROR: Region .META.,,1.1028785192 is listed in META on region server hdptest2.test.local:60020 but is multiply assigned to region servers hdptest2.test.local:60020, hdptest2.test.local:60020
ERROR: Region -ROOT-,,0.70236052 is listed in META on region server hdptest3.test.local:60020 but is multiply assigned to region servers hdptest3.test.local:60020, hdptest3.test.local:60020
ERROR: Region ambarismoketest,,1395071340885.7c4d1eb0609daaa87fd3b7a2bb725b44. is listed in META on region server hdptest4.test.local:60020 but is multiply assigned to region servers hdptest4.test.local:60020, hdptest4.test.local:60020

-ROOT- is okay.
Number of regions: 1
Deployed on: hdptest3.test.local:60020
.META. is okay.
Number of regions: 1
Deployed on: hdptest2.test.local:60020
ambarismoketest is okay.
Number of regions: 1
Deployed on: hdptest4.test.local:60020
3 inconsistencies detected.

In my case the reason for the above-mentioned errors is coming from contents of /etc/hosts file. In order to configure a hadoop cluster properly, hostnames of all nodes are set correctly. When called "hostname -f" should return fully qualified domain name.

Following two lines should not be removed from /etc/hosts file. localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

Then set your fully qualified domain name of the server with the following order:  hdptest2.test.local  hdptest2