Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th March 2008, 21:15
tfunky tfunky is offline
Member
 
Join Date: Jan 2007
Posts: 85
Thanks: 4
Thanked 2 Times in 2 Posts
Default Search drive for files containing an IP address

Hi All,

This should be really easy, but I can't figure it out...

I made a copy of the HAProxy load balancers from the howto and modified them to use new IPs for a new site.

Somewhere along the line I missed an IP and it still shows on the

ip addr sh eth0


I've checked the files where I know IP info is located and I'm not seeing it.

my thought is that I should be able to use grep to search the drive for the old IP address and find the culprit.


Can someone please help me with the correct syntax to find this?

I've googled and the best I can find is (from /):

grep -r --with-filename --line-number `192\.168\.1\.101`

but that doesn't get it and I'm not sure why not.

Can someone help me understand what I'm doing wrong?

THanks!

Tfunk
Reply With Quote
Sponsored Links
  #2  
Old 20th March 2008, 18:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

What exactly is the problem?

Did you use the tutorial about HAProxy + heartbeat, or the HAProxy + keepalived one?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 20th March 2008, 19:07
tfunky tfunky is offline
Member
 
Join Date: Jan 2007
Posts: 85
Thanks: 4
Thanked 2 Times in 2 Posts
Default

I used the haproxy/heartbeat howto...

The problem is that I originally used a HAproxy/heartbeat load balancer pair from my webservers (setup for http) and copied them, changed the IP, hostnames, etc etc to use them as the MySQL load balencers.

The problem is that somewhere I missed an old IP address.

If I do ip addr sh eth0
I see the following:

Code:
db-hap1:~# ip addr sh eth0
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0c:29:9d:38:a1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.18/24 brd 192.168.1.255 scope global eth0
    inet 192.168.168.10/32 scope global eth0
    inet 192.168.1.10/24 brd 192.168.1.255 scope global secondary eth0:0
    inet6 fe80::20c:29ff:fe9d:38a1/64 scope link tentative
       valid_lft forever preferred_lft forever
db-hap1:~#
See the 192.168.168.10? That's an artifact from where they were originally installed. Somewhere I've missed changing it.

I've checked :

/etc/haproxy.cfg
/etc/ha.d/ha.cf
/etc/ha.d/haresources
and, of course, /etc/network/interfaces

the 192.168.168. address isn't in any of those files.

I know it possible to use grep to search the files on your hard drive for a specific string, but I can't figure out the proper syntax.

My thought is that address has to be in a text files somewhere...I just need to find it to remove it.

If I can use grep to scan all files on the drive, and report any time it find 192.168.168.10 then that will allow me to fix it.

Is that more clear on what I've messed up and how I'm trying to fix it?

Thanks!
Reply With Quote
  #4  
Old 20th March 2008, 19:14
tfunky tfunky is offline
Member
 
Join Date: Jan 2007
Posts: 85
Thanks: 4
Thanked 2 Times in 2 Posts
Default

I just noticed that this is WAY in the wrong section of the forum...Sorry...I thought I had put it into the howto section

Sorry to clutter the ISPConfig section up
Reply With Quote
  #5  
Old 21st March 2008, 14:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

Quote:
Originally Posted by tfunky
I know it possible to use grep to search the files on your hard drive for a specific string, but I can't figure out the proper syntax.
Try
Code:
grep -r "192.168.168.10" /
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 14:33
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 09:40
Apache doesn't start again vaio1 Installation/Configuration 2 24th August 2007 13:01
mysql-cluster load balancing problem !! lychee_lch Server Operation 6 12th April 2007 13:41


All times are GMT +2. The time now is 01:30.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.