resolved – ipmitool Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory

January 16th, 2018
If you met below error on physical servers (not VMs, as VM do not support IPMI)

    [root@localhost ~]# ipmitool
    Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory

Then firstly you need make sure your server systemboard supports IPMI. 
Old system-boards might not support IPMI technology.

    [root@localhost ~]# dmidecode | grep -A 6 -i ipmi
    IPMI Device Information
        Interface Type: KCS (Keyboard Control Style)
        Specification Version: 1.5
        I2C Slave Address: 0x10
        NV Storage Device: Not Present
        Base Address: 0x0000000000000CA8 (I/O) #if not all zeros, then it supports IPMI
        Register Spacing: 32-bit Boundaries

If it's supported, then you need enable IPMI related modules:

    modprobe ipmi_devintf
    modprobe ipmi_si

Then add it to /etc/modules to have them loaded automatically:


To start IPMI:
    /etc/init.d/ipmi start
    /etc/init.d/ipmi status

    1. If there's no ipmitool command, try install it by "yum install -y OpenIPMI ipmitool"
    2. You may need add more modules

        [root@localhost ~]# modprobe ipmi_devintf
        [root@localhost ~]# modprobe ipmi_si
        [root@localhost ~]# modprobe ipmi_watchdog
        [root@localhost ~]# modprobe ipmi_poweroff
        [root@localhost ~]# modprobe ipmi_msghandler
Categories: IT Architecture, Kernel, Linux, Systems, Unix Tags:

google chrome installation on rhel7 oel7 centos7 linux

January 8th, 2018
  • Setup root VNC on OEL7
  • Enable NetworkManager

chkconfig --list NetworkManager

service NetworkManager status

cd /etc/sysconfig/network-scripts/ #add or edit below line in ifcfg-eth0/1


chkconfig NetworkManager on

service NetworkManager status

service NetworkManager start

  • In root VNC

search "network" in "Activities", select "Network proxy",

Configure proxy with Automatic, use the url fit to your env (if needed)

Configure DNS for NICs in this same dialogue (in IPv4, DNS uncheck "Automatic", and enter DNS servers)

  • Reboot
  • After host is up


rpm --import


yum -y localinstall google-chrome-stable_current_x86_64.rpm

rpm -qa|grep chrome

#If you are running chrome as root

google-chrome --no-sandbox &

Categories: IT Architecture, Linux, Systems Tags:

xfs tips

January 5th, 2018

xfs_growfs /mount/point -D size

The -D size option grows the file system to the specified size (expressed in file system blocks). Without the -D size option, xfs_growfs will grow the file system to the maximum size supported by the device.

Before growing an XFS file system with -D size, ensure that the underlying block device is of an appropriate size to hold the file system later (e.g. pvcreate/vgextend).

While XFS file systems can be grown while mounted, their size cannot be reduced at all.

Categories: IT Architecture, Linux, Systems Tags:

autofs option to support nfsv3 on linux 7 host (oel7/rhel7/centos7)

December 22nd, 2017

It's found that on linux 7 hosts, accessing autofs will default to use nfsv4, so if the NFS server do not support nfsv4, then we can change at NFS client side to force use of nfsv3:

/net -hosts -intr,rsize=32768,wsize=32768,hard,nolock,timeo=14,noacl,mountvers=3,vers=3

Restart autofs (systemctl restart autofs) and you should be able to access now.

Categories: IT Architecture, Linux, Systems Tags:

vncserver setup on OEL7 linux

November 29th, 2017
#more info about vncserver on OEL7 is here

#disable firewalld
systemctl stop firewalld
systemctl disable firewalld

yum groupinstall "server with gui" -y
yum install tigervnc-server -y
yum install gnome-terminal gnome-session -y

su - root

cat ./vnc/xstartup #no need to modify




exec /etc/X11/xinit/xinitrc


vi ~/.vnc/xstartup

    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    gnome-terminal &
    gnome-session &

chmod 755 ~/.vnc ; chmod 600 ~/.vnc/passwd ; chmod 755 ~/.vnc/xstartup
cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver-root@\:1.service

vi /etc/systemd/system/vncserver-root@\:1.service

    Description=Remote desktop service (VNC)


    # Clean any existing files in /tmp/.X11-unix environment
    ExecStartPre=-/usr/bin/vncserver -kill %i
    ExecStart=/usr/bin/vncserver %i
    ExecStop=-/usr/bin/vncserver -kill %i


#Optionally, you can add command-line arguments for the VNC server 
    (only accepts connections from localhost, and change size of the window)

ExecStart=/sbin/runuser -l vncuser -c "/usr/bin/vncserver %i -geometry 1600x900" #this is only for root user

ExecStart=/usr/bin/vncserver %i -geometry 1600x900 #this is for normal user

systemctl daemon-reload #if changing vnc config, must run this afterwards

systemctl start vncserver-root@\:1.service
systemctl enable vncserver-root@\:1.service

systemctl get-default #make sure it's
Categories: IT Architecture, Linux, Systems Tags:

Resolved – ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth0 does not seem to be present, delaying initialization.

November 7th, 2017

If you met error "ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth0 does not seem to be present, delaying initialization" on linux, then one possibility is udev cannot detected the Ethernet device, you should follow below steps to resolve this:

  • get Mac address of eth0 from ilom

-> show /System/Networking/Ethernet_NICs/Ethernet_NIC_0


health = OK
health_details = -
location = NET0 (Ethernet NIC 0)
manufacturer = INTEL
part_number = X540
serial_number = Not Available
mac_addresses = 00:10:e0:0d:b4:f0

  • configure udev rule, and change mac address according to result above

[root@test network-scripts]# cat /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:10:e0:0d:b4:f0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

  • configure network

[root@test network-scripts]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

[root@test network-scripts]# cat /etc/sysconfig/network

[root@test network-scripts]# cat /etc/hosts localhost.localdomain localhost test


python module cx_Oracle installation on OEL/RHEL/CENTOS 6

May 23rd, 2017

I've installed cx_Oracle-5.2.1 on the newly provided server with below steps:

1. Extracted SDK to directory - /usr/lib/oracle/11.2/client64/bin/.

2. Added below to /etc/


3. Compiled and installed the cx_Oracle from souce using 'python2.7 build; python2.7 install'.

Categories: IT Architecture Tags:

VM shutdown stuck in “mount: you must specify the filesystem type, please stand by while rebooting the system”

November 16th, 2016

When you issue "shutdown" or "reboot" on linux box and found "mount: you must specify the filesystem type, please stand by while rebooting the system":

Then one possible reason is that you have specified wrong mount options for nfs shares in /etc/fstab. For example, for nfsv3, please make sure to use below nfs options when you mount shares:

<share name> <mount dir> nfs rsize=32768,wsize=32768,hard,nolock,timeo=14,noacl,intr,mountvers=3,vers=3 0 0

And using below option will make VM shutdown stuck in "mount: you must specify the filesystem type". DO NOT use below:

<share name> <mount dir> nfs vers=3,rsize=32768,wsize=32768,hard,nolock,timeo=14,noacl,intr 0 0

Categories: IT Architecture, Kernel, Linux, Systems, Unix Tags:

resolved – Artifactory: Return code is: 502, ReasonPhrase:cannot connect

August 22nd, 2016

Today when I tried to visit Maven Artifactory, below error prompted in browser:

Return code is: 502, ReasonPhrase:cannot connect.

And here's the log in

2016-08-19 22:48:19,942 [art-init] [ERROR] (o.a.w.s.ArtifactoryContextConfigListener:91) - Application could not be initialized: Connection refused
java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_51]
at sun.reflect.NativeConstructorAccessorImpl.newInstance( ~[na:1.7.0_51
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance( ~[na:


Firstly, I thought it was caused by JDBC issue, here's the config in JDBC config file

# cat /u01/oracle/artifactory_home/etc/

I tried connect to DB using sqlplus to have a test, it's OK:

[root@testvm ~]# su - oracle
[oracle@testvm ~]$ export ORACLE_HOME=/u01/oracle/db12c/product/12.1.0/dbhome_1
[oracle@testvm ~]$ ORACLE_SID=orcl
[oracle@testvm ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@testvm ~]$ sqlplus artifactory/password1

SQL*Plus: Release Production on Mon Aug 22 03:28:20 2016

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Last Successful login time: Mon Aug 22 2016 03:21:26 +00:00

Connected to:
Oracle Database 12c Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


After some debugging, I found the issue was caused by proxy setting. We should disable it like below:

[oracle@testvm ~]# grep proxy /etc/profile
#export http_proxy=

Then log out and log on the host again, and ran below commands to shutdown/startup Artifactory:

[oracle@testvm ~]$ export ORACLE_HOME=/u01/oracle/db12c/product/12.1.0/dbhome_1/
[oracle@testvm ~]$ export ORACLE_SID=orcl
[oracle@testvm ~]$ export PATH=$PATH:$ORACLE_HOME/bin
[oracle@testvm ~]$ /u01/oracle/apache-tomcat-7.0.52/bin/
[oracle@testvm ~]$ /u01/oracle/apache-tomcat-7.0.52/bin/

After this, Artifactory started working again.

Categories: IT Architecture, Programming Tags:

lvm volume resize by extending virtual disk image file

June 27th, 2016

Below should be ran from Dom0 hosting DomU:

[root@Dom0 ~]# virt-filesystems -a System.img

[root@Dom0 ~]# virt-filesystems --long --parts --blkdevs -h -a System.img
Name Type MBR Size Parent
/dev/sda1 partition 83 500M /dev/sda
/dev/sda2 partition 8e 12G /dev/sda
/dev/sda device - 12G -

[root@Dom0 ~]# truncate -s 20G System_new.img

[root@Dom0 ~]# virt-resize --expand /dev/sda2 System.img System_new.img

[root@Dom0 ~]# mv System.img System.img.bak;mv System_new.img System.img

[root@Dom0 ~]# xm create vm.cfg -c #the first run may get issue "device cannot be connected", you can just run it again, the issue should be gone

Below should be ran from DomU:

[root@DomU ~]# vgs
VG #PV #LV #SN Attr VSize VFree
vg01 1 2 0 wz--n- 20.51g 8.00g

[root@DomU ~]# lvextend -L +8g /dev/mapper/vg01-lv_root
[root@DomU ~]# resize2fs /dev/mapper/vg01-lv_root

[root@DomU ~]# df -h /
Filesystem Size Used Avail Use% Mounted on
20G 10G 10G 50% /

Categories: Clouding, IT Architecture, Oracle Cloud Tags: