403 CoachingSessionExceeded – McAfee the culprit

December 18th, 2012

Today I tried access one website within company's network which was very important to me. But the site loaded incompletely and so was not usable.

As always, company network is somehow restricted, for example, only output port 80 and 443 are enabled in my company's network. As many companies do, McAfee software is used to restrict internal employees surfing the internet. So I firstly thought McAfee was the culprit.

As I'm using chrome browser, so I press F12 to open the developer tools. On "Network" tab(you may need ctrl+F5 to forcely refresh the website), I found the following error status:

Then I opened that url source in a new tab, and the following page occured:

So everything sorted! I clicked the button "click here if you have read ....", and then went back to the site, refresh, and later everything was ok!

resolved – error: conflicting types for ‘pci_pcie_cap’ – Infiniband driver OFED installation

December 10th, 2012

OFED is an abbr for "OpenFabrics Enterprise Distribution". When installing OFED-1.5.4.1 on a centos/RHEL 5.8 linux system, I met the following problem:

In file included from /var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5.4.1/drivers/infiniband/core/notice.c:37:
/var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5.4.1/kernel_addons/backport/2.6.18-EL5.7/include/linux/pci.h:164: error: conflicting types for 'pci_pcie_cap'
include/linux/pci.h:1015: error: previous definition of 'pci_pcie_cap' was here
make[4]: *** [/var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5.4.1/drivers/infiniband/core/notice.o] Error 1
make[3]: *** [/var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5.4.1/drivers/infiniband/core] Error 2
make[2]: *** [/var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5.4.1/drivers/infiniband] Error 2
make[1]: *** [_module_/var/tmp/OFED_topdir/BUILD/ofa_kernel-1.5.4.1] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-308.4.1.0.1.el5-x86_64'
make: *** [kernel] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.70159 (%build)

After googling and experimenting, I can tell you the definite resolution for this problem -> install another version of OFED, OFED-1.5.3.2. Go to the following official site to download: http://www.openfabrics.org/downloads/OFED/ofed-1.5.3/

PS:

1. Here's the file of OFED installation howto: OFED installation README.txt

2.Some Infiniband commands that may be useful for you:

service openibd status/start/stop
lspci -k|grep -i infini
ibnetdiscover
ibhosts
ibswitches
ibv_devinfo #Verify the status of ports by using ibv_devinfo: all connected ports should report a "PORT_ACTIVE" state

java plugin of firefox installation on linux platform

December 4th, 2012

Some iLom software(for example oracle iLom) use java jnlp applet(java console) to open remote console of the server. To use this functionality, you need java plugin on firefox installed. Here's the detailed steps:

  • Update firefox: yum update firefox, please note that you better remove firefox 64 bit version and use 32 version ones(reason followed). After this, you'll have firefox 10 on the system.
PS:
If you found some elements not showing in firefox after the upgrading(for example "Launch Remote Console" disappeared), you'll need install Stylish addon in firefox and then create the following new style using code below:
@namespace url(http://www.w3.org/1999/xhtml);
#mainpage {
visibility: visible !important;
}
  • Install JRE 6: Go to http://www.oracle.com/technetwork/java/javase/downloads/jre6u37-downloads-1859589.html and download jre-6u37-linux-i586-rpm.bin. After that, install the package on the system using rpm -Uvh.(make sure NOT to download 64bits version, as java console only support 32bits java plugin)
  • Make java plugin available to firefox: If you are planning to run firefox under root, do the following steps:

mkdir -p /root/.mozilla/plugins/

ln -s /usr/java/jre1.6.0_37/lib/i386/libnpjp2.so /root/.mozilla/plugins/

PS:

  • if you've installed java plugin before, you'll first need remove it.
  • Now restart firefox, and go to about:plugins, you'll see java plugin enabled. Open java console and enjoy!(select /usr/bin/javaws if prompted)
  • If you still find the console not prompting up, then it may be caused by java security setting. You can refer to here for WA.
  • If you met error like "No appropriate protocol (protocol is disabled or cipher suites are inappropriate)", then one possibility is that firefox/java/libnpjp2.so are not of the same architecture, you should use i386(or x86_64) for all of them.
  • Here's the steps to install firefox browser under linux platform:

1. Download and install EPEL repo(wget epel-release package on the page below, then install it using "rpm -i <package name>.rpm"):

If you are running an EL7 version, please visit here to get the newest 'epel-release' package for EL7: The newest version of 'epel-release' for EL7

If you are running an EL6 version, please visit here to get the newest 'epel-release' package for EL6: The newest version of 'epel-release' for EL6

If you are running an EL5 version, please visit here to get the newest 'epel-release' package for EL5: The newest version of 'epel-release' for EL5

2. Install firefox:

yum install -y firefox-31.4.0-1.0.1.el5_11

3. Enable newer version of firefox by run firefox in VNC. If you find it's still the old version, then run "killall firefox" as root, and then try again.

How HA is achived in Oracle Exadata

November 27th, 2012
  1. Each Exadata Database Machine has completely redundant hardware including redundant InfiniBand networking, redundant Power Distribution Units (PDU), redundant power upplies, and redundant database and storage servers.
  2. Oracle RAC protects against database server failure.
  3. ASM provides data mirroring to protect against disk or storage server failures.
  4. Oracle RMAN provides extremely fast and efficient backups to disk or tape.
  5. Oracle’s Flashback technology allows backing out user errors at the database, table or even row level.
  6. Using Oracle Data Guard, a second Exadata Database Machine can be configured to maintain a real-time copy of the database at a remote site to provide full protection against site failures and disasters.

resolved – how to remove whitespaces in expect – tcl language

November 15th, 2012

Here's the way to remove whitespaces automatically when using expect/tcl language:

If $line is the string variable that you wanna remove whitespaces, just replace $line with the following in your programs context:

[string trim $line]

That's it, simple, Ehh..

resolved – tcl error list element in quotes followed by “” instead of space while executing tcl

November 13th, 2012

Today I met an error on tcl with the following error message:

list element in quotes followed by "\/ovm.info" instead of space
while executing
"llength $line"
(procedure "passchg" line 48)
invoked from within
"passchg $prompt $user $pass $host $spawn_id $SCRIPTFILE $SCRIPTFILENAME $resfile"

After some digging, I found the problem was caused in the following tcl script:

if {[llength $line] == 0 || $first_char == ""} {
continue
}

Analysis:

Here's the info from tcl wiki:

The only "problem" is in developers thinking any string can be treated as a list. There are no bugs in Tcl related to list commands and quoting. The problems are when developers try to use list commands on things that are not lists. Thinking of any string can be a list is misunderstanding Tcl.

Resolution:

To resolve this, we need change [llength $line] == 0 to [llength [split $line]] == 0

if {[llength [split $line]] == 0 || $first_char == ""} {
continue
}

So next time we need  replace $arg with [split $arg] whenever lindex/lrange/llength is used.

PS:

 

Categories: IT Architecture, Programming, SHELL Tags: