LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-05-2012, 12:23 PM   #1
soaz
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Rep: Reputation: Disabled
Connections to external website going to local webserver


Running CentOS 6.3 64bit w/ kernel release 2.6.32-279.2.1.el6.x86_64.

My issue is that sometimes when programs on the local machine try to connect to an external website, that external website goes to the local webserver instead.

I can't reproduce this problem by using commandline utilities such as wget or curl. This issue causes some repo's when using yum to not work because they 404. Other processes that try to access data on external websites get redirected to the local webserver as well. I can see in access_log all of the logs of the 404's..

This issue started happening pretty recently, within the last week or two that I have noticed. What are some things that I can look at to determine what's wrong or how to go about fixing this?
 
Old 08-05-2012, 04:30 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,400

Rep: Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584
it sounds like you are behind a router
if so
have you configured CentOS and the network for it ?

but there is not enough information in the post to say

Quote:
My issue is that sometimes when programs on the local machine try to connect to an external website, that external website goes to the local webserver instead.
what programs?
what errors ? if any?

Quote:

I can't reproduce this problem by using commandline utilities such as wget or curl
so wget DOSE work ??
and you can grab files from the internet using it ?

Quote:
This issue causes some repo's when using yum to not work because they 404.
??????????
yum will NEVER give a internet web "404" error
NEVER

please post the REAL( and FULL ) error you got
 
Old 08-05-2012, 05:07 PM   #3
soaz
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
This machine has been up for over half a year with no problems until the last week or two. By programs, I mean programs that try to connect to any external website and get data from it. It seems that it just happens when using a domain name (like google.com) as opposed to just using an IP address. It's not program specific. I started noticing this when a Minecraft server running on the machine started showing up in apache access_log when it tried to verify a player's session with the actual Minecraft login webserver. Also started noticing it when the Minecraft server started sending heartbeat requests to the local webserver instead of Minecraft's as well.

I don't literally mean that yum displays a 404 page.. that would be absurd to think such a thing could happen. When I "yum update", this is the output:
Code:
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, kabi, presto, security, tmprepo,
              : verify, versionlock
Loading support for CentOS kernel ABI
Loading mirror speeds from cached hostfile
epel/metalink                                                                 |  11 kB     00:00
Could not retrieve mirrorlist http://apt.sw.be/redhat/el6/en/mirrors-rpmforge error was
14: PYCURL ERROR 22 - "The requested URL returned error: 404"
 * base: mirrors.easynews.com
 * epel: mirrors.kernel.org
 * extras: centos-distro.cavecreek.net
 * remi: iut-info.univ-reims.fr
 * rpmforge: mirror.hmc.edu
 * updates: mirrors.xmission.com
adobe-linux-x86_64                                                            |  951 B     00:00
http://mirrors.easynews.com//linux/centos/6.3/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
base                                                                          | 3.7 kB     00:00
http://mirrors.kernel.org/fedora-epel/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
epel                                                                          | 4.0 kB     00:00
epel/primary_db                                                               | 4.6 MB     00:00
http://centos-distro.cavecreek.net/centos/6.3/extras/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
extras                                                                        | 3.0 kB     00:00
http://nginx.org/packages/centos/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
remi                                                                          | 2.9 kB     00:00
remi/primary_db                                                               | 277 kB     00:00
http://mirror.hmc.edu/repoforge/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
rpmforge                                                                      | 1.9 kB     00:00
http://mirrors.xmission.com/centos/6.3/updates/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
updates                                                                       | 3.5 kB     00:00
Setting up Update Process
No Packages marked for Update
Those pages don't 404 when navigating to them on my own web browser..


Here's the log that shows up in the local webserver's access_log after running "yum update":
Code:
xx.xx.xx.xx - - [03/Aug/2012:03:26:54 -0700] "GET /redhat/el6/en/mirrors-rpmforge HTTP/1.1" 404 303
xx.xx.xx.xx - - [03/Aug/2012:03:26:58 -0700] "GET /pub/linux/distributions/centos/6.3/os/x86_64/repodata/repomd.xml HTTP/1.1" 404 343
xx.xx.xx.xx - - [03/Aug/2012:03:26:59 -0700] "GET /fedora-epel/6/x86_64/repodata/repomd.xml HTTP/1.1" 404 324
xx.xx.xx.xx - - [03/Aug/2012:03:27:01 -0700] "GET /pub/linux/distributions/centos/6.3/extras/x86_64/repodata/repomd.xml HTTP/1.1" 404 347
xx.xx.xx.xx - - [03/Aug/2012:03:27:01 -0700] "GET //linux/centos/6.3/extras/x86_64/repodata/repomd.xml HTTP/1.1" 404 334
xx.xx.xx.xx - - [03/Aug/2012:03:27:01 -0700] "GET /packages/centos/6/x86_64/repodata/repomd.xml HTTP/1.1" 404 317
xx.xx.xx.xx - - [03/Aug/2012:03:27:04 -0700] "GET /centos/6.3/updates/x86_64/repodata/repomd.xml HTTP/1.1" 404 336
The output from "yum update" is really the only error message I've gotten. Other results, like those from the Minecraft server is just handled by not letting the player login (since it doesn't get the 'OK' from login server), no error is thrown.

I don't know why I can use "wget http://google.com" and get the correct webpage, but from a program it gets a 404 page and that access attempt shows up in access_log.

If I add for instance, "173.194.77.139 google.com" to /etc/hosts, a program will then get the proper page from Google's servers. Without adding anything to /etc/hosts, I can ping google.com all day long and get their IP.. The machine uses Google's public DNS servers in /etc/resolv.conf and can properly resolve hostnames with host or nslookup.

Last edited by soaz; 08-05-2012 at 05:09 PM.
 
Old 08-05-2012, 05:33 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,400

Rep: Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584
a minecraft server is running

just a local lan or for everyone
that might cause some network issues

as to the "pycurl error 22"

try this
Code:
su -
yum clean all
rpm --rebuilddb
yum update
and can you post the output of
Code:
yum repolist all


remi: iut-info.univ-reims.fr
I take it that this repo is for FireFox 14 and up

* rpmforge: mirror.hmc.edu

RF ??

from your above output
you DID NOT install and configure "yum-priorities"
that yum plugin IS REQUIRED if you use third party repos

see the CentOS wiki page on this
-- it IS basically A REQUIREMENT ---
http://wiki.centos.org/
see ALL the warnings on third party repos
http://wiki.centos.org/AdditionalResources/Repositories
and the yum plugin
http://wiki.centos.org/PackageManagement/Yum/Priorities
 
Old 08-05-2012, 06:36 PM   #5
soaz
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
The machine is hosted in a datacenter on the west coast of the US. The Minecraft server is available to anyone, as are the websites on the webserver running on the machine.

remi repo was primarily added I believe to use updated packages of mysql and php. rpmforge for packages like unrar, libyaml, and a few others. Over about the last month, nothing has really updated except for from CentOS 6.2 to CentOS 6.3, and those packages were all from CentOS base or extras repos.

As for your commands, I ran them, then did "yum repolist all", here is the output:
Code:
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, kabi, presto,
              : security, tmprepo, verify, versionlock
Loading support for CentOS kernel ABI
Loading mirror speeds from cached hostfile
 * base: centos.fastsoft.net
 * epel: mirrors.kernel.org
 * extras: centos.sonn.com
 * remi: iut-info.univ-reims.fr
 * rpmforge: mirror.hmc.edu
 * updates: mirrors.arpnetworks.com
repo id                repo name                                status
C6.0-base              CentOS-6.0 - Base                        disabled
C6.0-centosplus        CentOS-6.0 - CentOSPlus                  disabled
C6.0-contrib           CentOS-6.0 - Contrib                     disabled
C6.0-extras            CentOS-6.0 - Extras                      disabled
C6.0-updates           CentOS-6.0 - Updates                     disabled
C6.1-base              CentOS-6.1 - Base                        disabled
C6.1-centosplus        CentOS-6.1 - CentOSPlus                  disabled
C6.1-contrib           CentOS-6.1 - Contrib                     disabled
C6.1-extras            CentOS-6.1 - Extras                      disabled
C6.1-updates           CentOS-6.1 - Updates                     disabled
C6.2-base              CentOS-6.2 - Base                        disabled
C6.2-centosplus        CentOS-6.2 - CentOSPlus                  disabled
C6.2-contrib           CentOS-6.2 - Contrib                     disabled
C6.2-extras            CentOS-6.2 - Extras                      disabled
C6.2-updates           CentOS-6.2 - Updates                     disabled
adobe-linux-x86_64     Adobe Systems Incorporated               enabled:       2
base                   CentOS-6 - Base                          enabled: 6,344+2
c6-media               CentOS-6 - Media                         disabled
centosplus             CentOS-6 - Plus                          disabled
contrib                CentOS-6 - Contrib                       disabled
debug                  CentOS-6 - Debuginfo                     disabled
epel                   Extra Packages for Enterprise Linux 6 -  enabled:   7,676
epel-debuginfo         Extra Packages for Enterprise Linux 6 -  disabled
epel-source            Extra Packages for Enterprise Linux 6 -  disabled
epel-testing           Extra Packages for Enterprise Linux 6 -  disabled
epel-testing-debuginfo Extra Packages for Enterprise Linux 6 -  disabled
epel-testing-source    Extra Packages for Enterprise Linux 6 -  disabled
extras                 CentOS-6 - Extras                        enabled:       4
nginx                  nginx repo                               enabled:      25
remi                   Les RPM de remi pour Enterprise Linux 6  enabled:     549
remi-test              Les RPM de remi en test pour Enterprise  disabled
rpmforge               RHEL 6 - RPMforge.net - dag              enabled:   4,403
rpmforge-extras        RHEL 6 - RPMforge.net - extras           disabled
rpmforge-testing       RHEL 6 - RPMforge.net - testing          disabled
updates                CentOS-6 - Updates                       enabled:     409
repolist: 19,412
Thank you for informing me about yum-priorities.

Last edited by soaz; 08-05-2012 at 06:38 PM.
 
Old 08-08-2012, 06:26 PM   #6
soaz
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
I've still got this issue.. I don't know what to try and research to figure out what's doing this. Any info at all on where I might look to to figure out whats going on would be amazing.
 
Old 08-08-2012, 06:40 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,400

Rep: Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584
so you are still getting that pycurl 22 error

have you set up
or
reset the proxy settings

in"/etc/yum.conf"
set the proxy

your host might have changed things


or

The yum plugins " fastmirror" and "presto" though can be helpful are KNOWN to cause more problems than they try to solve

you might want to disable them and see if yum works

see
Code:
yum --help
/* and the man page */
man yum
 
Old 08-08-2012, 07:03 PM   #8
soaz
LQ Newbie
 
Registered: Aug 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Well the problem isn't isolated to just yum, I wish that was the case. I do still get the pycurl 22 errors (it seems like it's not always the same repo's where it happens). This is a dedicated server, not a VPS, do you think it could be some sort of routing thing that the company I'm renting from could have changed? I don't see it as being an issue with something they changed, but I don't really know all of what goes on beyond outside of my servers pvlan. I have noticed that it's not always consistent. I have recently noticed that sometimes accessing the external website will work, but most of the time it doesn't, which seems really weird.

I will look into the yum plugins in a second when I can get access to terminal.

Last edited by soaz; 08-08-2012 at 07:06 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vsftpd "don't use external IP for local connections" problem Annielover Linux - Server 1 08-03-2011 01:49 PM
webserver doesn't reply to external request but it reply's to local request ziba Linux - Server 4 05-11-2009 06:27 PM
Forward port 80 connections to a vmware-based webserver? MheAd Linux - Server 5 12-31-2008 05:59 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 08:11 PM
webserver - allowing connections from outside gateway? maverick106 Fedora 2 05-03-2004 11:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration