Knowledgebase

Portal Home > Knowledgebase > Articles Database > Port 80 request to itself...?


Port 80 request to itself...?




Posted by acctman, 06-02-2009, 10:54 AM
I have a script that needs to make a port 80 request to itself and it seems that there is something blocking that request. where should i look to correct this problem?

Posted by ServerManagement, 06-02-2009, 11:26 AM
There can be a dozen different possible causes. What is the specific error it is getting? such as forbidden, internal server error, not acceptable, etc. Check the logs to see what is blocking it. Then you can tweak it based on that.

Posted by acctman, 06-02-2009, 11:33 AM
Warning: fsockopen() [function.fsockopen]: unable to connect to www.site.com:80 in /home/site/public_html/mm/inc/classes/mailctl.php on line 93 Notice: 1243953413 >>> Error Spawning Page! ** Errno : Errstr: 99 : Cannot assign requested address in /home/site/public_html/mm/inc/classes/mailctl.php on line 113 10:36:53 > 1243953413 >>> Error Spawning Page! ** Errno : Errstr: 99 : Cannot assign requested address Initial Spawn Failed! You must correct this before poMMo can send mailings.

Posted by mwatkins, 06-02-2009, 12:10 PM
http://pommo.svn.sourceforge.net/vie...47&view=markup Are you running a firewall? Perhaps you've blocked local connections on the internal interface. To check, try something else running on the local host - such as wget or curl: Does it work? Get an error? If it works then the fsockopen call *should* work. More sleuthing required - run a little test script that opens your host. See: http://ca3.php.net/manual/en/function.fsockopen.php Run the first example. Does that work?

Posted by eth1, 06-02-2009, 12:46 PM
fsockopen connection via PHP is not able to connect to the domain name/server in question either due to a firewall in place or the domain is not resolving in the server where you have the PHP script. Try a dig on the domain name to make sure it's resolving, If it resolves fine, contact your web host and inquire if port 80 egress(outbound) is blocked. Most likely that would be the case.

Posted by acctman, 06-02-2009, 04:58 PM
yes i'm running a firewall. this is the test of the first example also curl -I failed, i have used wget in the past with no problems.

Posted by acctman, 06-02-2009, 05:07 PM
I checked my firewall and I have TCP_IN / TCP_OUT / UDP_IN / UDP_OUT settings nothing that say egress(outbound). Both TCP in and out have port 80 set, but UDP does not.

Posted by eth1, 06-02-2009, 05:08 PM
Can you run the following without the "/" and paste the output ?

Posted by acctman, 06-02-2009, 05:15 PM

Posted by acctman, 06-02-2009, 10:11 PM
anything else i can try to fix this problem?

Posted by eth1, 06-03-2009, 04:55 AM
Sorry, got swamped with work. Well, the domain is definitely resolving in the server. What is the output of the following command from within the server ? This should give a better idea whether egress port 80 is blocked or not. From the curl output it does appear to be a firewall blocking outgoing connections on port 80.

Posted by acctman, 06-03-2009, 08:19 AM
nmx [/etc/csf]# telnet www.site.com 80 Trying 70.87.xxx.xxx... telnet: connect to address 70.87.xxx.xxx: Cannot assign requested address telnet: Unable to connect to remote host: Cannot assign requested address i'm using ConfigureServer (csf) on my cpanel... i dont see anything that allows egress port un/blocking is this something i can do manually via shell and the iptables?

Posted by ZenMonk, 06-03-2009, 08:31 AM
Looks like www.site.com got an issue with its A record. 70.87.xxx.xxx is an invalid ip.

Posted by acctman, 06-03-2009, 08:44 AM
its valid, i just censored the IP from the the posting. i usually censor my IPs and domains when posting for help/fixes publicly.

Posted by eth1, 06-03-2009, 11:51 AM
Port 80 outbound is blocked in CSF. Allow port 80 by doing the following, Search for the parameter TCP_OUT and append port 80 to the list if not already present. Save the file and restart csf. Run a telnet from within the server to the domain/IP in question.

Posted by acctman, 06-03-2009, 11:56 AM
port 80 has always been set... anything else i should check before looking for another mailer script? # Allow incoming TCP ports TCP_IN = "20,21,22,25,53,80,110,143,443,465,808,953,993,995,1111,2077,2078,2082,2083,2086,2087,2095,2096,1935,19350,65530" # Allow outgoing TCP ports TCP_OUT = "20,21,22,25,37,43,53,80,110,113,443,587,807,873,953,2087,2089,2546,2703,1935,19350,65530"

Posted by eth1, 06-03-2009, 12:11 PM
That's indeed strange. Is is any other security software installed in the server ?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
curl (Views: 570)
HDD Issue (Views: 5164)


Language:

Contact us