Category Archives: Linux

NTP – ntpdate works but does not update system time

Today I got a wired issue on AWS RHEL servers, ntpdate can’t update the time on it.

# ntpdate 0.centos.pool.ntp.org
ntpdate[23881]: step time server 142.54.181.202 offset -2770.345091 sec
# ntpdate 0.centos.pool.ntp.org
ntpdate[23882]: step time server 142.54.181.202 offset -2770.345357 sec

ntpdate can find out the time difference, but do not update system time.

And I did some research and found out this issue was caused by Wallclock Setting.

# hwclock --show
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
# cat /proc/sys/xen/independent_wallclock
0

Below are the solutions for this issue:

cat /proc/sys/xen/independent_wallclock

0 means that the virtual machine is getting time from the host and not using independent wallclock.
1 means that the virtual machine is using independent wallclock and managing its time independent from the host.

Permanently Changing the Independent Wallclock Setting

Log in to the virtual machine environment as root.

Edit the virtual machine’s /etc/sysctl.conf file.
Add or change the following entry:

xen.independent_wallclock=1

Enter 1 to enable or 0 to disable the wall clock settting.
Save the file and reboot the virtual machine operating system.

When it boots, a virtual machine gets its initial clock time from the host. Then, if the wallclock setting is set to 1 in the sysctl.conf file, it manages its clock time independently and does not synchronize with the host clock time.

Temporarily Changing the Independent Wallclock Setting

Log in to the virtual machine environment as root.
Enter the following command:

echo "1" > /proc/sys/xen/independent_wallclock

Enter 1 to enable or 0 to disable the wall clock settting.

Add or change the following entry:

xen.independent_wallclock=1

Enter 1 to enable or 0 to disable the wall clock settting.
 

VMware Workstation 10&gtk2 Errors on RHEL

When executing the vmware workstation bundle, the following gtk2 errors are displayed:

# ./VMware-Workstation-Full-10.0.4-2249910.x86_64.bundle 
Extracting VMware Installer...done.
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory
Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory

Fix:

# echo "/usr/lib64/gtk-2.0/modules" > /etc/ld.so.conf.d/gtk2.conf
# ldconfig

gentoo fix bash vulnerability (bash shellshock) CVE-2014-7169

All Bash 3.1 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-3.1_p18-r1"

All Bash 3.2 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-3.2_p52-r1"

All Bash 4.0 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-4.0_p39-r1"

All Bash 4.1 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-4.1_p12-r1"

All Bash 4.2 users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=app-shells/bash-4.2_p48-r1" 

Before you can run VMware Workstation, several pre-built modules must be compiled and loaded into the running kernel.

You’ll get this error when you upgrade your linux kernel after you installed VMware workstation.
To fix this issue, the easiest way is to re-install VMware workstation.
For RHEL, just using below command to uninstall VMware and install source kernel.

vmware-installer --uninstall-product vmware-workstation
yum install kernel-devel Kernel-headers

And then install VMware workstation