Oracle 10gR2 RAC Installation Error: error while loading shared libraries -libpthread.so.0

Filed Under (Linux Tips, Oracle) by Milind on 28-01-2012

1) VIPCA Configuration
Error 1: error while loading shared libraries -libpthread.so.0
While installing Oracle 10gR2 RAC (Cluster) on Redhat Enterprise Linux 5 or CentOS 5 you will get following error when you execute root.sh (After Cluster Installation) on last node. This Error is thrown when root.sh execute VIPCA which Virtual IP configuration Tool.

Running vipca(silent) for configuring nodeapps
/u01/app/oracle/product/crs/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[root@rac2 crs]#

To fix this issue edit /u01/app/oracle/product/10.2.0/clust/bin/vipca and add following (Green colored or on line number 124):

if [ "$arch" = "i686" -o "$arch" = "ia64" ]
then
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
unset LD_ASSUME_KERNEL


Error 2: Error 0(Native: listNetInterfaces:[3])

Once above changes made and when you run /u01/app/oracle/product/10.2.0/clust/bin/vipca you will get following Error

[root@rac2 bin]# /u01/app/oracle/product/10.2.0/clust/bin/vipca
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]

Now you will have to configure Virtual IP’s Manually. You can configure it using following commands

[root@rac2 bin]# pwd
/u01/app/oracle/product/10.2.0/clust/bin
[root@rac2 bin]# ./oifcfg setif -global eth0/115.124.120.0:public
[root@rac2 bin]# ./oifcfg setif -global eth1/10.10.10.1:cluster_interconnect
[root@rac2 bin]# ./oifcfg getif
eth0 115.124.120.0 global public
eth1 10.10.10.0 global cluster_interconnect

[root@rac2 bin]#

Now Run VIPCA


2) Srvctl Error:

While checking status of RAC using command srvctl you will again get the following error:

[oracle@rac2 ~]$srvctl config database -d RAC
/u01/app/oracle/product/10.2.0/db_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

To fix this bug edit following files

/u01/app/oracle/product/clust/bin/srvctl
/u01/app/oracle/product/10.2.0/db_1/bin/srvctl

and add following (Green colored):

#Remove this workaround when the bug 3937317 is fixed
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
unset LD_ASSUME_KERNEL

Now Execute srvctl commands to check the current configuration and status of the RAC database

[oracle@rac1 ~]$ srvctl config database -d RAC
rac1 RAC1 /u01/app/oracle/product/10.2.0/db_1
rac2 RAC2 /u01/app/oracle/product/10.2.0/db_1

FIX: cannot restore segment prot after reloc: Permission denied

Filed Under (Linux Tips, SELinux) by Milind on 27-01-2012

While installation of any package or Starting any service on a RHEL or CentOS based Server you may receive following Error

cannot restore segment prot after reloc: Permission denied

 

This Error comes when SELinux setting is enabled on the server. Security-Enhanced Linux (SELinux) is a Linux feature that provides a mechanism for supporting access control security policies through the use of Linux Security Modules (LSM) in the Linux kernel.

By Default SELinux is set to “enforcing” in CentOS on boot, this can be disabled permanently. To disable it edit file “/etc/selinux/config” and change SELINUX

From

SELINUX=enforcing

 

TO

SELINUX=disabled

 

But to apply this setting the System or Server need to be rebooted. If you want to disable this feature temporary you can execute following command from the Shell of the System or Server

/usr/sbin/setenforce 0

FIX:- Login failed for user ‘sa’. The user is not associated with a trusted SQL Server connection

Filed Under (Microsoft Windows, MSSQL) by Milind on 26-01-2012

Sometime while connecting MSSQL 2005 Remotely OR locally using MSSQL Management Studio (using user as SA) it throw following Error

Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476

This Error occurs when SQL Server doesn’t support SQL Server Authentication Mode (Mixed Mode for MSSQL 2000). This issue can be fixed using following Steps:

1) Connect the MSSQL server using Windows Authentication of the server.

mssql1 FIX:  Login failed for user sa. The user is not associated with a trusted SQL Server connection

2) Right Click on the server name in the tree on the left and go to properties.

mssql21 FIX:  Login failed for user sa. The user is not associated with a trusted SQL Server connection

3) Click the Security Option. Now under Server authentication Select “SQL Server and Windows Authentication Mode” and press OK.

mssql31 FIX:  Login failed for user sa. The user is not associated with a trusted SQL Server connection

Now try to connect MSSQL using SA user. Please refer Microsoft KB Article 840219 for more information

Virtuozzo Backup Error: 307 Message processing was terminated because timeout was reached

Filed Under (Linux Virtuozzo, Virtuozzo) by Milind on 25-01-2012

Sometime whenever a user tries to take backup from Virtuozzo Power Panel or Parallels Power panel it gets failed and action logs shows following Error

#307 Message processing was terminated because timeout was reached waiting for a response

vzbackup 300x116 Virtuozzo Backup Error: 307 Message processing was terminated because timeout was reached

The above error shows that the timeout limit which is set in the Virtuozzo Configuration for backup has been reached and the backup was not completed during that time frame. To increase Virtuozzo backup Timeout limit

1) Open file “/etc/sysconfig/vzagent/vzagent.conf

2) Search For key word “backup” and Change it

FROM:
< timeouts >
< backup >3600< / backup >
< search >3600< / search >
< / timeouts >
TO:
< timeouts >
< backup >18000< / backup >
< search >3600< / search >
< / timeouts >

By deafult the limit which is set is 3600 seconds which is 1 Hour; Change it to the limit as per your requirement, here I have set it 18000 seconds which is near about 5 hours.

3) To apply this setting, restart service VE on the Host server. Service VE can be restarted using command “vzctl restart 1” (This will restart vzagent on the host)

Now try to take backup from “Virtuozzo Power Panel or Parallels Power panel”

vzbackupsus 300x129 Virtuozzo Backup Error: 307 Message processing was terminated because timeout was reached

Portmap Error: Unable to receive; errno = Connection reset by peer

Filed Under (Linux Tips) by Milind on 24-01-2012

_

While setting and configuring NFS share on a server when you try to restart portmap service you get following error

[root@server mounted]# service portmap restart
pmap_getmaps rpc problem: RPC: Unable to receive; errno = Connection reset by peer
Stopping portmap:                                          [FAILED]
Starting portmap:                                          [  OK  ]
[root@server mounted]#

Logs (tail -f /var/log/message) shows that portmap port is conflicting with some other service.

Dec 29 06:39:46 server portmap[32452]: cannot bind udp: Address already in use
Dec 29 06:39:46 server portmap[32452]: cannot bind udp: Address already in use
Dec 29 06:39:46 server portmap[32452]: cannot bind udp: Address already in use
Dec 29 06:39:46 server portmap[32452]: cannot bind udp: Address already in use

 

I have searched on internet and found following commands which fixed the issue.

1) Stop portsentry service

[root@server mounted]# /etc/init.d/portsentry stop

2) Restart portmap service

[root@server mounted]# /etc/init.d/portmap restart

3) Start portsentry service

[root@server mounted]# /etc/init.d/portsentry start

Try to configure NFS now :)

_

Command Line installation of Roles (ServerManagerCmd.exe) in Windows 2008

Filed Under (Microsoft Windows) by Milind on 24-01-2012

In Windows 2008 Components like IIS, DNS etc. are called as Roles and you can add these Roles from Server Manager >> Roles >> Add Roles and then you have to follow the steps to install the desire components. This process is a bit lengthly as you will have to go through the steps. You can automate and eliminate these steps by using Command Line utility called “ServerManagerCmd.exe”.

ServerManagerCmd.exe is a tool or command which Installs and removes roles, role services and features. Also displays the list of all roles, role services, and features available, and shows which are installed on this computer.

Switch Parameters:
-query
-install
-remove
-inputPath
-help | -?
-version


Query ROLES

“-query” parameter is used to see all the available and installed ROLES of components on the server. The installed modules are are shown in Green Color (which can bee seen in below image)

C:\>servermanagercmd -query

 

img2 247x300 Command Line installation of Roles (ServerManagerCmd.exe) in Windows 2008

Install ROLES

To add additional roles to the server, “-install” or “-i” parameter is used. You can install a ROLE by using “-i” which will install all the components which are required by the component.

C:\>servermanagercmd -i Web-Server

 

img3 300x151 Command Line installation of Roles (ServerManagerCmd.exe) in Windows 2008

Also you can mentioned all the Components separating them with SPACE which will install all the modules you have listed (it will save time)

C:\>servermanagercmd -i Web-Asp-Net Web-Net-Ext Web-ASP Web-CGI Web-ISAPI-Ext Web-ISAPI-Filter Web-Includes Web-Http-Logging Web-Custom-Logging

 

img4 300x87 Command Line installation of Roles (ServerManagerCmd.exe) in Windows 2008

You can find more information about the ROLES and “Command value” (Component name) on Microsoft Technet Website

Remove ROLES

Roles which are already installed on the server can be removed with the help of “-remove” parameter. Using this, complete ROLE and it’s dependencies will be un-installed from the server.

C:\>servermanagercmd -remove Web-Server

 

img5 300x174 Command Line installation of Roles (ServerManagerCmd.exe) in Windows 2008

Additional Options

-version
This parameter is used to check the ServerManager version

-help or -?
Display Help for ServerManagerCmd.exe in the command window.

C:\>servermanagercmd -version
C:\>servermanagercmd -?

 

img6 300x207 Command Line installation of Roles (ServerManagerCmd.exe) in Windows 2008

NOTE: There are some roles which requires Reboot after installation or removal, in such cases you can add “-restart” at the end of install or remove option. This will reboot the server after completion of task if required.

C:\>servermanagercmd -i Web-Server -restart
C:\>servermanagercmd -remove Web-Server -restart

How to Compare Two Word Documents for modification in MS Word 2007

Filed Under (Microsoft Windows, Microsoft Word, Tutorials) by Milind on 23-01-2012

You have prepared a Word Document it might be anything a proposal, quotation, or any writeup for your company and sent it to your seniors for review. They review it and send the updated one to you but now you want to findout the changes or modification they have made OR you are running a Software development company and Business Analyists keep updating documents and you need to find the changes or modification they have made.

Every person who use word documents face such situation when he/she want to compare two documents to check the changes, deletion or modification made. There are many tools available on internet to do the comparision but Micorsoft Word 2007 provides a “compare” feature which will allow the users to compare the two documents and check the modifications.

Following are the steps to compare two documents using MS Word 2007

1) Open MS Word 2007 and go to “Review” Tab >> Click on “Compare” >> “Compare…” (Compare two version of a document)

11 300x69 How to Compare Two Word Documents for modification in MS Word 2007

2) A window asking “Original document” and “Revised Document” (like below)

21 300x102 How to Compare Two Word Documents for modification in MS Word 2007

Browse the Orignal File and Modified file in respective Text boxes and Press “OK

3 300x245 How to Compare Two Word Documents for modification in MS Word 2007

3) Microsoft Word will show something like

4 300x151 How to Compare Two Word Documents for modification in MS Word 2007

Following windows will be shown

  1. Revisions Window: This will show total number of revisions made (including font, alginment, header footer etc.
  2. Compared Document: This window will show compared document which will include the changes (dependind upon changes) in different color.
  3. Original Document: It will preview the document you have written or prepared
  4. Revised Document: This will show the modified or revised document.

RSS Feed to Update Twitter Status using Perl Script with OAuth Part-II (Installation of Perl Modules, writing perl script and Integrating it with OAuth)

Filed Under (Perl, Script, Social Network, twitter) by Milind on 22-01-2012

_
In previous article “RSS Feed to Update Twitter Status using Perl Script with OAuth Part-I (Registration of Twitter Application)” we have learn to register a twitter application and today I am going to tell how to use that application to update your twitter status with the help of a Perl Script which will fetch data from a RSS Feed.

This tutorial is divided in following sub parts or sections
1) Installation of Perl Modules.
2) Installation and understanding of per script.
3) Enabling Keys and setting up cronjob.

1) Installation of Perl Modules

To execute the perl script we need some Perl Modules to be installed on the server. Following is the list of modules which should be available on the server

  • Net::Twitter::Lite : Perl module for Twitter API modules.
  • XML::RSS::Parser::Lite : Perl RSS parser which will be used for RSS Feeds.
  • XML::Parser::Lite : Lightweight regexp-based XML parser and dependancy for XML::RSS::Parser::Lite
  • LWP::Simple : dependancy for XML::RSS::Parser::Lite
  • WWW::Shorten::Bitly : Interface to shortening URLs using URL shortening site bit.ly

 

You can install these modules using command “cpan [module name]“. e.g. is you want to install Net::Twitter::Lite you have to execute the command “cpan Net::Twitter::Lite

2) Installation and understanding of per script

Copy and paste following script on your server. This script will work as
1) Fetch Details from RSS Feed

  1. Title of the story
  2. URL of the story

2) URL of the story will be sent to Bit.ly using Perl module for URL Shortening
3) Perl Module will read the Shorten URL
4) Script will connect to Twitter and update status of twitter account with Title and shorten URL.

Script:-

#!/usr/bin/perl -w
use Net::Twitter::Lite;
use XML::RSS::Parser::Lite;
use LWP::Simple;
use WWW::Shorten::Bitly ;
my $YOUR_CONSUMER_KEY = “[YOUR_CONSUMER_KEY]” ;
my $YOUR_CONSUMER_SECRET = “[YOUR_CONSUMER_SECRET]” ;
my $YOUR_ACCESS_TOKEN = “[YOUR_ACCESS_TOKEN]“;
my $YOUR_ACCESS_TOKEN_SECRET = “[YOUR_ACCESS_TOKEN_SECRET]” ; 

my $nt = Net::Twitter::Lite->new(
consumer_key => $YOUR_CONSUMER_KEY,
consumer_secret => $YOUR_CONSUMER_SECRET,
access_token => $YOUR_ACCESS_TOKEN,
access_token_secret => $YOUR_ACCESS_TOKEN_SECRET,
);

my $set_post = &get_rss_post() ;
exit;

sub get_rss_post{
my $xml = get(“[RSS FEED URL]“);
my $rp = new XML::RSS::Parser::Lite;
$rp->parse($xml);
for (my $i = 0; $i < $rp->count(); $i++) {
my $it = $rp->get($i);
my $url = $it->get(‘url’);
my $bitly = WWW::Shorten::Bitly->new(URL => $url, USER => “[USERNAME]“, APIKEY => “[API KEY]“);
my $temp = $bitly->shorten(URL => $url);
my $post = $it->get(‘title’). ” ” .$temp;
eval{
$nt->update($post);
};
if ( $@ ) {
warn “update failed because: $@\n”;
}
}
return ;
}

3) Enabling Keys and setting up cronjob

As I mentioned in previous article to save the values of Consumer key, Consumer secret, Access Token (oauth_token) and Access Token Secret (oauth_token_secret); if you didn’t then don’t worry login into Twitter developer site i.e. http://dev.twitter.com and go to your Application. There you will find all the keys of your application. Once you have all the keys, its time to edit the above script. Make Following changes

a) Replace [YOUR_CONSUMER_KEY] with Consumer key, [YOUR_CONSUMER_SECRET] with Consumer secret, [YOUR_ACCESS_TOKEN] with Access Token (oauth_token), [YOUR_ACCESS_TOKEN_SECRET] with Access Token Secret (oauth_token_secret) at number line 6, 7, 8 and 9.

my $YOUR_CONSUMER_KEY = “[YOUR_CONSUMER_KEY]” ;
my $YOUR_CONSUMER_SECRET = “[YOUR_CONSUMER_SECRET]” ;
my $YOUR_ACCESS_TOKEN = “[YOUR_ACCESS_TOKEN]“;
my $YOUR_ACCESS_TOKEN_SECRET = “[YOUR_ACCESS_TOKEN_SECRET]” ;

b) Replace [RSS FEED URL] with RSS Feed URl from where you cant to fetch news or data at line number 22.

my $xml = get(“[RSS FEED URL]“);

c) Replace [USERNAME] with your bit.ly username and [API KEY] with API Key provided by bit.ly. (Line Number: 28)

my $bitly = WWW::Shorten::Bitly->new(URL => $url, USER => “[USERNAME]“, APIKEY => “[API KEY]“);

NOTE: You should have account with bit.ly to get API Key.

Save this script with extension “.plx” and try to execute it using command “perl filename.plx“. Now check if your Twitter account is updated or not; if it is bingo else you have to check the keys.

Now you can schedule a job for the script as per your requirement.

ERROR: “copy_file failed: copy_file: System Error : invalid file paths” when you change Plesk administrator password

Filed Under (Plesk, Plesk For Linux) by Milind on 21-01-2012

While changing Plesk admin password it throws following

copy_file failed: copy_file: System Error: invalid file paths in /usr/local/psa/admin/bin/copy_file /var/backup/psa/tmp/nsfuJB48u /etc/psa/.psa.shadow:0: cmd_server.php3:95 ch_admin_pass(string ‘***************’, string ‘*************’) 1: ch_pass.php3:34 require(string ‘/usr/local/psa/admin/htdocs/server/ch_pass.php3′) 2: plesk.php:51


Above error arises when the problem is when Plesk is unable to copy files in /var/backup/psa/tmp/ directory. As per http://kb.parallels.com/en/5201 the main cause of the problem is “Such error occurs in case if symbolic link is used as the path to the Plesk product directory. PHP does not follow symlinks for security reasons.”

When we checked the server we found a Symlink for tmp in /var/backup/psa/ directory

[root@server ~]# ls -la /usr/local/psa

total 176
drwxr-xr-x 15 root psaadm 4096 Jul 19 09:11 .
drwxr-xr-x 13 root root 4096 Jun 2 15:53 ..
drwxr-xr-x 14 root psaadm 4096 Jul 19 09:47 admin
drwxr-xr-x 2 psaadm psaadm 4096 Jul 19 09:07 bin
drwxr-xr-x 10 psaadm psaadm 4096 Jul 19 09:07 etc
drwxr-xr-x 8 root root 4096 Jun 23 16:47 handlers
drwxr-xr-x 6 root root 4096 Jun 23 16:47 handlers.default
drwxr-xr-x 3 root root 4096 May 30 18:29 lib
drwxr-xr-x 3 root root 4096 May 30 18:18 libexec
drwxr-xr-x 4 root root 4096 May 30 18:16 logrotate
drwxr-xr-x 3 root root 4096 May 30 18:18 pam_plesk_config
-rw-r–r– 1 root root 21099 Jun 3 03:32 passwd
drwxr-xr-x 11 root root 4096 Jun 22 10:30 PMM
-r——– 1 root root 19218 Jun 3 03:32 shadow
drwxr-xr-x 3 root root 4096 May 30 18:18 share
drwxr-xr-x 2 root root 4096 Jul 19 09:07 suexec
lrwxrwxrwx 1 root root 19 Jun 22 12:02 tmp -> /var/backup/psa/tmp
drwxr-xr-x 10 psaadm psaadm 4096 Apr 22 07:52 var
-rw-r–r– 1 root root 27 Jul 19 09:11 version


So We removed the symbolic link and remounted the tmp folder physically using following steps:

[root@server ~]# rm /usr/local/psa/tmp
rm: remove symbolic link `/usr/local/psa/tmp’? y
[root@server ~]# mkdir /usr/local/psa/tmp
[root@server ~]# mount –bind /var/backup/psa/tmp /usr/local/psa/tmp
[root@server ~]# /etc/init.d/psa restart


Now please try to reset the passwords.

**Note: This settings will save till next system reboot.

To make this setting permanent execute following command from the shell of the server which will modify the /etc/fstab file of the Server.

[root@server ~]# echo “/var/backup/psa/tmp /usr/local/psa/tmp auto bind ” >> /etc/fstab

How to change & set Data and time on Citrix Xen VM

Filed Under (Linux Tips, Xen) by Milind on 20-01-2012


Setting time on a Virtual Machine is always a painful tasks. Different virtualization platform have different techniques of setting time like in Virtuozzo you can change the Timezone of the VM but you can’t set time as it synchronize the time from the host server.

On a Citrix Xen VM also the clocks synchronized to the time running on the host server, and cannot be independently changed. So, when you try to set time (using date -s command) on a Xen VM it will show that the command is executed but it won’t change the time. You can see that in following

root@user [/home]# date -s “Mon Jun 13 15:33:40 IST 2011″
Mon Jun 13 15:33:40 IST 2011
root@user [/home]# date
Tue Jun 28 15:39:01 IST 2011

To change the time on a VM you need to enable independent clock settings of the VM which is disabled by default which you can see using following command.

root@user [/home]# cat /proc/sys/xen/independent_wallclock
0
root@user [/home]#

Output of the above command is “0″ which shows that independent clock settings for the VM is disabled. Now use following command to enable it

root@user [/home]#echo 1 >> /proc/sys/xen/independent_wallclock

and verify if its enabled or not

root@user [/home]# cat /proc/sys/xen/independent_wallclock
1
root@user [/home]#

Now try to set the date and time using date –set or date -s command.

root@user [/home]# date –set=”13 June 2011 15:33:00″
Mon Jun 13 15:33:00 IST 2011
root@user [/home]# date
Mon Jun 13 15:33:03 IST 2011
root@user [/home]#

 

Follow US

Enter your email address:


I'm listed in Technology

Sponsors

Advertisement

Become Fan

tag cloud