February 21, 2014 - JFBConnect v6.0 Released! Go to The blog announcement | The full changelog | The JLinked Migration guide

Facebook API Error: connect() timed out! [SOLVED]

Facebook API Error: connect() timed out! [SOLVED]

After configure all this error appears in Overview. I have revised all configuration several times. It's like if can't connect with facebook.
http://www.sourcecoast.com/components/com_agora/img/members/2045/fb01.jpg
http://www.sourcecoast.com/components/com_agora/img/members/2045/fb02.jpg

Edited by: avanzed - Nov-26-10 11:19:58

avanzed
useravatar
Offline
4 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

That's a new one to us.  We'll agree, it seems as though you can't connect to Facebook itself, which is obviously strange.  We're not seeing that on any of our development systems, so it doesn't appear to be an outage with Facebook Connect, which does happen (though rarely).

If you have SSH access to your server, can you try typing the following commands, and let us know what you get?  You should see something similar to what's posted below.  This verifies that your server can 'see' Facebook.  If you don't have access, you may need to contact your hosting provider to see if there's any reason your site can't access these addresses.

Command:

Code:

nslookup api.facebook.com

This verifies that your site can lookup the actual IP address of the Facebook API site. Should see something like:

Code:

Non-authoritative answer:

Name:   api.facebook.com
Address: 69.63.181.48

Command:

Code:

ping api.facebook.com

This verifies that you can send and receive from that address.  If this fails, would indicate a firewall or other security mechanism preventing communication.  Should see (Press cntrl-C to stop the 'ping'):

Code:

PING api.facebook.com (69.63.181.46) 56(84) bytes of data.

64 bytes from api-11-01-snc2.facebook.com (69.63.181.46): icmp_seq=1 ttl=245 time=46.7 ms
64 bytes from api-11-01-snc2.facebook.com (69.63.181.46): icmp_seq=2 ttl=245 time=46.8 ms
64 bytes from api-11-01-snc2.facebook.com (69.63.181.46): icmp_seq=3 ttl=245 time=46.6 ms

There are other possibilities regarding server/site configuration issues, but that error seems to indicate everything's good on your site's end... but when the request goes out to Facebook, it's just going to a black hole...

Let us know if this helps, or is way over your head.  Unfortunately, the next step would likely be to contact your hosting provider.

Thanks!

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

I will write an email to our hosting provider. I will write here the information that they give us

Thanks.

avanzed
useravatar
Offline
4 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Hi again.

Our Hosting answered:

piedra:~# nslookup api.facebook.com
Server: 80.91.89.15
Address: 80.91.89.15#53


Non-authoritative answer:
Name: api.facebook.com
Address: 66.220.147.14

The ping is closed, but they said me that the ping isn't the problem. They asked me which ports need the api. (I guess to open the ports on our server )

Need this info if it possible

avanzed
useravatar
Offline
4 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

All requests are made using cURL, which means they act like 'normal' http traffic.  The 4 URLs that are used for different data from Facebook are:
https://api.facebook.com/
https://api-read.facebook.com/
https://graph.facebook.com/
https://www.facebook.com/

So, the things to check are that:
* These 4 addresses can be accessed over SSL (port 443)
* Your cURL library has SSL support installed (This can be found in Help->System Info / PHP Information).  Look for something like:

Code:

cURL support    enabled

cURL Information    libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

I'm not too worried about the 2nd item, as that throws a different error.. but worth checking.

Let us know what you find!

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Ok. The port was the problem. Works fine now. Thank you

avanzed
useravatar
Offline
4 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

That's awesome to hear.  Glad we helped fix you up, and now we know what the problem is if we ever see it again.  Thanks for letting us know you got it going!

If you have any other questions or issues, you know where to find us.

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Hi guys, I moved my website to a newest server, now I'm having issues and I guess is the port, where this is suppose to go?

* These 4 addresses can be accessed over SSL (port 443)

In the incoming ports or outgoing ports in the server firewall?

This is what I have in cUrl:

cURL support    enabled
cURL Information    7.21.0
Age    3
Features
AsynchDNS    No
Debug    No
GSS-Negotiate    No
IDN    Yes
IPv6    Yes
Largefile    Yes
NTLM    Yes
SPNEGO    No
SSL    Yes
SSPI    No
krb4    No
libz    Yes
CharConv    No
Protocols    dict, file, ftp, ftps, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp
Host    x86_64-unknown-linux-gnu
SSL Version    OpenSSL/0.9.8b
ZLib Version    1.2.3

Thanks for any help

fb_729628948
Caliderumba
useravatar
Offline
28 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Your cURL setup seems correct. The ports you'd want to open are the outgoing ports, since you'll be connecting to those addresses. Facebook does not need to initiate communication back (incoming) to you over SSL, so you don't need a certificate and shouldn't need those ports open.

Please let us know if this helps. Obviously, feel free to try opening the incoming port as well (generally, this is open anyways so if someone mis-types https to your site, it will still go 'somewhere').

Thanks!

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Hi,,,,,, Y have a this problem...

in my administrator,,,y  acces to  JFBConnect and in the overview,,,the joomla getme a error,,,,
the error is this,,

Facebook API Error: name lookup timed out
Facebook API Error: name lookup timed out


mi error is equal, for the user "advanced"  but i dont know, how see status of my curl,,

My server respond this when i write nslookup api.facebook.com

[~]# nslookup api.facebook.com
Server:         67.199.146.254
Address:        67.199.146.254#53

Non-authoritative answer:
Name:   api.facebook.com
Address: 66.220.149.29


PLEASE  HELP MEE!

tansk

fb_100002071569523
Usuario
useravatar
Offline
4 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Usuario,
I'm sure we can help out, but can you let us know what version of JFBConnect you're using? Also, please post from the account you subscribed from. Priority support is for subscribers only.

Thanks,
Alex

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

my version is jfbc is 3.2, and joomla is  1.5.15,,

fb_100002071569523
Usuario
useravatar
Offline
4 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

please helpme,,, I speak little english, I from mexico,.,,  tell me what i need to do,,,

very tansk

fb_100002071569523
Usuario
useravatar
Offline
4 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Usuario,
Your english is fine. Your version of Joomla is old. We'd recommend upgrading to 1.5.23. Also, please upgrade JFBConnect to 3.2.1.

For further support, you need a subscription. Please choose use the page below to subscribe:
http://www.sourcecoast.com/extensions/jfbconnect

Thank you,
Alex

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

I dont have the pass of my client,,,

mi client pay the jfbconnect version 3.2.1. and mee worked with these,....

plsease helpme,, only tell me,,, what is the port necesari,, between my joomla and facebook

Tansk

fb_100002071569523
Usuario
useravatar
Offline
4 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

The port is #443, which is used for SSL communications. You'll need to check that your server can accept incoming connections, and make outgoing connections over that port.

Hope this helps. If it doesn't, we may need to do some testing on your site to determine the cause of the issue. I'd contact your hosting company to see if they can help you check that you can contact to the addresses listed above:
https://api.facebook.com/
https://api-read.facebook.com/
https://graph.facebook.com/
https://www.facebook.com/

Good luck

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

We're having a similar problem with our hosting provider.

We've verified with this code :

<?php
$curlcontent="curl";
$curlstatus="Curl is not installed - This is a Problem";
if (function_exists('curl_init')) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.facebook.com/restserver.php');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0');
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$curlcontent = curl_exec($ch);
curl_close($ch);
$curlstatus="Curl is available but cannot access Facebook - This is a problem ";
if (strlen($curlcontent)>6) {$curlstatus="Curl is available and can access Facebook - All is OK";}
}
print $curlstatus;
print "\n";
print $curlcontent;
print "\n";
?>

To see if cURL and port 443 were open and they seem to be but whenever we try to create a new account we get a very long delay that sometimes lead to a 500 error.

We're running Joomla 1.5.23 and JFBC 3.2.2

The site is www.fetenationale.qc.ca.

If cURL and the port seem open is there anything else that might be going on ?

fb_725414140
David
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

David,
Try enabling "Show Facebook API errors on the Front-end" in the Facebook API configuration tab, and let us know if you see any errors.

I just tried to register, and agree, it did take some time to load the page below:
http://www.fetenationale.qc.ca/creer-ma-fete.html

However, I then tried to load the page in another browser where I was not logged into Facebook, and it still took some time. I'm not sure if that's a server issue, that page, or something else, but since it's happening whether I go to it directly or by being redirected after trying to login through Facebook, that seems to indicate it may not be JFBConnect specific. On reloading that page after the slow load, it seemed to go much faster.

In either case, I wasn't automatically registered, which is obviously a bigger problem. Can you tell me what SEF extension you're using? If it's Joomla's built in SEF, that should work no problem. If it's a 3rd party one, one thing to try is to tell that extension to 'skip' JFBConnect altogether. It may, or may not help, and if you don't know what I'm talking about, just let me know.. we can generally help you with specific instructions once we know what you're using.

Hope this helps get you started, but definitely let us know what you find, or if the above doesn't help at all. We'll do what we can to get you all setup!

Thanks,
Alex

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Alex,

We've enabled the «Show Facebook API errors on the front-end»

We are using JoomSef but we have disabled JFBConnect.

I'll DM you the site's access if you want to have a look at what's happening.

Thanks,

David

fb_725414140
David
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

We were able to hack a fix by changing :

/public_html/administrator/components/com_jfbconnect/assets/facebook-api/facebook.php

line 153

'api_read' => 'https://api-read.facebook.com/',

for

'api_read' => 'https://api.facebook.com/',

This seems to do the trick.

fb_725414140
David
useravatar
Offline
3 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

I can ping as well as nslookup just fine. But still I get the same error msg in my "Overview" tab current/hmm

fb_625080128
Babar
useravatar
Offline
10 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

I check that 443 was open and I was able to  do telnet to api.facebook.com via this command. I checked it from my webserver's shell consol


[email protected] [~]# telnet api.facebook.com 443
Trying 69.63.181.47...
Connected to api.facebook.com.
Escape character is '^]'.

my CURL info is as follows:

cURL support    enabled
cURL Information    libcurl/7.21.4 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5


Please Help !!

fb_625080128
Babar
useravatar
Offline
10 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Babar,
I'll probably close this thread soon as the topic is starting to be confused over time (this was originally posted 6 months ago, and just revived last week).

As to your issue, I'm not sure what specific error message your getting. Is it the "Possible misconfiguration" warning or is the "Unable to reach api-read.facebook.com" error? If it's -not- the Possible Misconfiguration error, is your application info showing up in the upper left corner of your page (Site name, image, etc) that's read from Facebook? If not, can you re-check your API/Secret key settings just to make sure it's been set correctly?

Finally, have you tried logging in on the front-end to see what's happening there, or if there are any other/different errors reported?

Thanks,
Alex

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

In my Overview page, i see below two lines on top in red highlight background.
Facebook API Error: name lookup timed out
Facebook API Error: name lookup timed out

In left top corner "Configuration Information" box shows this:


Configuration Information
No Application Logo Set
Application Name:
Site URL:
Site Domain:
WARNING: POSSIBLE MISCONFIGURATION
We suggest updating your Site URL to: http://pakistanrc.com/quay2/
You can do this by visiting: Facebook Developers
Select your application -> Edit Settings -> Web Site.
You should configure the Site URL and Domain.

My Facebook APP settings are :

App ID
my-app-id
API Key
my-api-key
App Secret
my-app-secret
Site URL
http://pakistanrc.com/quay2/
Site Domain
pakistanrc.com

I have copy pasted the same settings in my FACEBOOK API page to put correct app id / secret etc etc....

I have FBConnect 3.2.2.  It takes a long time to open "Overview" page and also it takes a long time in the front end to connect via facebook. It does connect successfully but it takes a lot of time (like 40 seconds or more). I moved my website from an old shared hosting account to a VPS and I see a lot of performance benefits and speed has improved overall. But, only for facebook connect I see this behaviour. Previuos to migration, it was working fine. But I checked that 443 SSL port was open and I could nslookup / ping to api.facebook.com.

On a Drupal forum I saw a person fixing this issue by changing api-read.facebook.com to api.facebook.com in his config files and confirmed it fixed the issue. I dont knwo where to update this current/hmm

If you want, i can give you SA access ?

fb_625080128
Babar
useravatar
Offline
10 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Facebook API Error: connect() timed out! [SOLVED]

Babar,
Sorry to hear you're having issues. We've heard of this issue a few times, and we'd recommend trying to do an nslookup to api-read.facebook.com to see if you get the timeout there.

If so, or if you just want to test, you can change the address that Facebook tries to read from like you mentioned above by changing /administrator/components/com_jfbconnect/assets/facebook-api/facebook.php. In that file, at line ~152, you'll see the api-read address. Try taking off the -read portion, which we've heard from various users as well has helped with this issue.

If that doesn't help, let us know, and if you send us some Super Admin credentials which we can use to investigate further.

Thanks,
Alex

If you use JFBConnect or JLinked, please post a rating and a review at the Joomla! Extensions Directory:
Joomla Facebook Connect | LinkedIn for Joomla

alzander
Alex
useravatar
Offline
17912 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
7431
Total Polls:
0
Total Posts:
32633
Average Posts Per Hour:
1.2
User Info
 
Total Users:
21549
Newest User:
tcxlpomn24
Members Online:
4
Guests Online:
504

Earn 20% Through Referrals

Like our extensions? You're not alone. That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word, and we'll take care of the rest.

Learn More About Our Affiliate Program