The Problem When trying to create physical volume , getting the below error error: # pvcreate /dev/mappper/mpath25 Device /dev/mappper/mpath25 not found (or ignored by filtering). The issue can be reproduced at will with the following step: # pvcreate /dev/mappper/mpath25 The Solution Upon checking it was found that start sector was not zeroed out. # pvcreate /dev/mappper/mpath25 Device /dev/mappper/mpath25 not found (or ignored by filtering). # fdisk -l … [Read more...] about “Device /dev/mappper/mpath25 Not Found (or Ignored By Filtering)” – error while creating physical volume with pvcreate
Linux
“Read-only locking type set. Write locks are prohibited. Can’t get lock for [volume group]” – error during lvextend
The Problem Unable to extend LVM filesystem. The following error message is received on running the lvextend command: Read-only locking type set. Write locks are prohibited. Can't get lock for rootvg resize2fs 1.43-WIP (20-Jun-2013) The filesystem is already 1310720 blocks long. Nothing to do! The Solution The parameter locking_type is set to 4 in /etc/lvm/lvm.conf. # grep locking lvm.conf |grep -v '#' "lvmetad", "metadata", "cache", "locking" ] locking_type = 4 … [Read more...] about “Read-only locking type set. Write locks are prohibited. Can’t get lock for [volume group]” – error during lvextend
“error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory” ‘java -version’ error on Startup
The Problem "java -version" quits with the error message "error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory" when trying to start the JVM. Case 1 The problem is there if it is run under a normal user or if it is run under the root user $ java -version [PATH_TO]/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory Case 2 The problem is there only if it is run by a normal … [Read more...] about “error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory” ‘java -version’ error on Startup
“java” command does not run the JVM that has been installed
The Problem A JDK/JRE from Oracle has been installed on a Linux machine according to the installation instructions. The "java" command does not run the JVM that has been installed. Java applications can fail to run if an unexpected Java Runtime Environment is found. Example from a Red Hat server: $ java -version java version "1.6.0_17" OpenJDK Runtime Environment (IcedTea6 1.7.4) (rhel-1.21.b17.el6-x86_64) OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) Disclaimer: The … [Read more...] about “java” command does not run the JVM that has been installed
Windows Active Directory Account Shows Inconsistent UID/GID In Different Linux SSSD Clients (CentOS/RHEL)
The Problem The id command shows different UID and GID on different sssd servers for the same Windows Active Directory user. After purging the sssd cache by sss_cache, the UID and GID are still different. 1. Output from one server: # id ad_test_user uid=[UID](ad_test_user) gid=[GID](ad_test_group) groups=[GID](ad_test_group2),[GID](ad_test_group) # sss_cache -u ad_test_user # id ad_test_user uid=[UID](ad_test_user) gid=[GID](ad_test_group) … [Read more...] about Windows Active Directory Account Shows Inconsistent UID/GID In Different Linux SSSD Clients (CentOS/RHEL)
User Environment Variables With “su” and “sudo” in Linux
su and sudo allow to execute commands or shell with a different user. Depending on how they are invoked the environment variables can change, causing different command results. Both "su" and "sudo" allow to execute commands on behalf of other user. The usage of su implies the knowledge of the "other" user password except if invoked by root. There is not much control on what the user can do, if the access is granted there is no restriction. In sudo there is a fine control on what the user … [Read more...] about User Environment Variables With “su” and “sudo” in Linux
How To Create A SSH Banner in CentOS/RHEL Server
Note: Please do not put any classified information in a banner file since banner message is displayed before entering user/password credential during ssh/scp session. 1. Create the text file that should appear as the warning. For example /etc/sshbanner.txt: [root@server]# vi /etc/sshbanner.txt ############################################################################################################################################################### # # WARNING TO USERS OF THIS … [Read more...] about How To Create A SSH Banner in CentOS/RHEL Server
Error: Can’t open display: hostname:x.y when running xclock
The Problem Unable to launch xclock window using the below command for one particular normal user. xclock is fine with the root user. $ xclock Error: Can't open display: [hostname]:x.y The Solution Incorrect user level environment variables set under the file /home/[username]/.bash_profile. Follow the below steps to fix the issue. 1. Log in as a normal user. 2. Comment out all the user specific env variables under the file /home/[username]/.bash_profile. 3. Launch VNC … [Read more...] about Error: Can’t open display: hostname:x.y when running xclock
‘ulimit: max user processes: cannot modify limit:operation not permitted’ Shown When Login
The Problem When login as oracle user, the following message showed on the console. -bash: ulimit: max user processes: cannot modify limit:operation not permitted. The Solution ulimit option '-u' which means maximum number of user processes was set to a bigger one directly by adding the following line in the $HOME/.bash_profile. $ ulimit -u 4096 $ ulimit -u 4096 But originally the maximum number of user processes was set to 1024 in /etc/profile for oracle user. if [ $USER = … [Read more...] about ‘ulimit: max user processes: cannot modify limit:operation not permitted’ Shown When Login
“530 Non-anonymous sessions must use encryption” – while using curl
The Problem "Non-anonymous sessions must use encryption" occurs when running curl command as root user: # curl -v -k --ftp-ssl --ftp-pasv ftp://192.168.X.X:990/ --user hcpa:XXX * About to connect() to 192.168.X.X port 990 (#0) * Trying 192.168.X.X... connected * Connected to 192.168.X.X (192.168.X.X) port 990 (#0) < 220 FTP SERVER INFOVALMER. > USER hcpa < 530 Non-anonymous sessions must use encryption. * Access denied: 530 * Closing connection #0 curl: (67) Access denied: … [Read more...] about “530 Non-anonymous sessions must use encryption” – while using curl