Posts filed under ‘Linux’

Cannot retreive metalink for repository epel

Hi

If some body receive the above error first you should check the connectivity and firewall issues and still if the problem persist.

Sample Error

metalink_error_1You should edit the  /etc/yum/repos.d/CentOS-base.repo or epel.repo

and change all the URL’s that pointing to https  to  http  save the file

Restart the yum process.

Hint –  Always start the yum process with debug switch ,which helps us in troubleshooting –  ( yum -d6 update)

 

 

 

December 17, 2013 at 9:02 am Leave a comment

CentOS yum error 14: PCYURL ERROR 7 – “Failed to connect to 2a02:2498:1:3d:5054:ff:fed3:e9

Dear Folks

When you are trying to update the system with yum , you may come with the above error , In which the yum tool is trying to resolve the mirrorlist url’s via IPv6 Address.

update_error_1What happens here is that when the yum is unable to resolve and reach the IPv4 address it end up trying the IPv6.

Hence if you face the similar issue , I would advice you to go through the below steps and identify the real cause.

Step 1 –  Check whether you could resolve the URL  (mirrorlist.centos.org) via nslookup or dig and get an IPV6 address.

If  you fail at the above step check for the DNS configurations in /etc/resolv.conf

Step 2 –   Check with the firewall team that they have allowed the ports 80 , 443 ,21   from the linux server.

In my case it was the firewall blockage.

I have been googling  regarding the same issue and found out that several articles pointing to IPV6   saying that to disable it. Hence you could try that as a  last resort , if the above steps did not succeed.

– edit  the  /etc/sysconfig/network and the /etc/sysconfig/network-scripts/ifcfg-eth* files  to  disable any entries pointing to IPv6

– edit /etc/sysctl.conf and put the below entries and reboot the server

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 =

– disable the ip6tables.

Good Luck

December 17, 2013 at 8:50 am Leave a comment

How to install only Security Updates on CentOS

Hi Folks

These commands are useful when you want to install  only the sceurity updates  in order to meet any compliance such as PCI

First you need to install the  security plugin for the Yum

#yum install yum-security

Once it installed

#yum  list-security —–> To check the security updates avaialable

#yum update –security  ——> To install  only the Securuty Updates.

Good Luck..

February 3, 2013 at 8:16 am Leave a comment

How to idenitfy a process ID using the TCP Port

Recently i had an issue  in one of my linux machines, where I was unable to start the acronis_agent service which listens on TCP Port ;

Later I realised  that already so many processes are listening on the TCP port.

To check the open connection for a TCP  port

# netstat -an | grep 9876   ( In my case acronis_agent uses TCP 9876)

It was showing multiple connections………….

To check the PID(Process ID ) for all the sessions  which are using the port 9876

#lsof -i TCP:9876

finally you could use  the  almighty command “kill -9 PID”  …. boom everything became normal.

October 23, 2011 at 1:57 pm Leave a comment

Linux Guide

Anyy body looking for a brief documentation on  RHEL can make use of the below files , which I made for my linux class

Introduction to Linux

LinuxGuide_v3

October 23, 2011 at 11:09 am Leave a comment

Sendmail STARTTLS: read error=generic SSL error

I was having an issue with my sendmail server where I receives this error which will cause the sendmails logs grow drastically and fill the /var partition.

further it will stop the mail flow ( when /var partition is full)

So i wrote this bash script which does the following;

– look for this error in the maillog

– when it finds it will kill the sendmail process which is causing the  sendmail to log multiple     entries in the logfile and will restart the sendmail and syslog daemons.

anybody is welcome to give their comment on improvements or any drawbacks on this script good luck…….

#!/bin/bash
LAST=’last message’
SSL=”STARTTLS: read error=generic SSL error (0)”
S1=”0″

cp /var/log/maillog /home/muralee/log_check/maillog
grep “STARTTLS: read error=generic SSL error (0)”   /home/muralee/log_check/maillog |awk ‘/sendmail/ {print $5}’ | tr -d [digit:]”sendmail[]” > records.txt
#grep “STARTTLS: read error=generic SSL error (0)”   /home/muralee/maillog.1 |awk ‘/sendmail/ {print $5}’ | tr -d [digit:]”sendmail[]” > records.txt
results=$(wc -l records.txt | awk ‘/records/ {print $1}’)
if [[ $results -eq 0 ]];then
echo “Sendmail is Fine”
fi
if [[ $results -ne 0 ]]; then
pkill sendmail
/etc/init.d/sendmail restart
/etc/init.d/syslog restart
echo “Problem resolved”
cat /dev/null > records.txt

September 20, 2011 at 12:14 pm Leave a comment

Newer Posts


Archives

Categories

Follow Hope you like it.. on WordPress.com

Blog Stats

  • 30,388 hits

%d bloggers like this: