Topic-icon JFBConnect Current Version Installed and Joomla Current Giving me 502

Active Subscriptions:

None
I noticed if I stay logged out from my website I can browse all throughout the website without errors but when I login with JFBConnect I then get 502 bad gateway errors.

Now this only happens with JFBConnect when I am connected/logged in so how do I resolve the issue?
The topic has been locked.
Support Specialist
It sounds like you probably have a firewall or other security extension that thinks JFBConnect is doing something 'bad'. When you authenticate with a social network, JFBConnect performs multiple redirections and lots of data is sent back and forth between you, your website server and the social network. Some firewalls/security extensions see all the quick behavior and think it's malicious and try to block the user/ip address/etc.

Can you check if you have something enabled that might be doing that? If you're unsure, please let us know the full error message you are getting.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
I know it's not the firewall because the error is from
Nginx. Also RSFirewall has a rule to exclude the cfbconnect completely so that couldn't be the issue either. Also have a rule for sh404sef to exclude the cfbconnect extension.

Any ideas?
The topic has been locked.
Support Specialist

I know it's not the firewall because the error is from Nginx.

There are firewalls at the server level and within Nginx that can easily cause what you describe. For example, mod_security, which is for both Apache and nginx can cause the problems you describe above.

Again, can you post the exact error message you are receiving so we can understand the issue more?

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 7 months ago - 10 years 7 months ago #55299 by inuxse
Alex,

I don't have mod_sec installed or compiled but plan to so hope this doesn't return me to the same errors.

Problem still exists. Please help

Error message:

2015/10/22 11:46:59 [error] 32642#32642: *1093003 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 67.230.173.66, server: , request: "GET /blog/3security-and-authentication/2015/10/21/1662-complete-guide-controlling-user-accounts-and-logged-in-machines-on-linux-part-ii HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock1:", host: "", referrer: "/blog/3security-and-authentication/2015/10/21/1662-complete-guide-controlling-user-accounts-and-logged-in-machines-on-linux-part-ii"
2015/10/22 11:47:00 [error] 32642#32642: *1093003 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 67.230.173.66, server: , request:

This only happens when I login during or when I click the article.

I removed my website from the error log here.

Nauseous
Last edit: 10 years 7 months ago by inuxse.
The topic has been locked.
Support Specialist
I'm unsure what that message is. That doesn't sound like a firewall though. The best information I could find with some sort of explanation and solution was:
stackoverflow.com/questions/22697584/ngi...sponse-header-from-u

When you say "when I login during or when I click the article", what do you mean by click the article? Does this happen at other times than when you try to authenticate with social networks?

As noted, JFBConnect does a lot of work communicating with the social network server and the user's own browser. It may be that some of that communication is straining your system too much, though that's not something we've heard of before.

If there's any other details you can provide on when you see the error or other information you can provide, it can only help us understand the problem better.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
What I was saying is:

1. Login, then click an article the error shows with the 502 gateway

2. Click on the article first before logging in which comes up every-time until you click the JFB login, then I get the 502 error.

Ok, I've made some changes to the php5-fpm memory limit and bumped it up from 96m to 128m and it's working currently without issues.

Let's wait and see what happens. Hopefully it's fixed.
The topic has been locked.
Support Specialist
Glad to hear that change seems to have helped. I honestly don't know anything about that setting or much about nginx. I'm not a server guy. I certainly hope you don't run into any other issues, but if you do, please let us know and we'll try to help however we can.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 7 months ago - 10 years 7 months ago #55477 by inuxse
Still having the same 502 gateway error message only with JFBConnect.

Help
Last edit: 10 years 7 months ago by inuxse.
The topic has been locked.
Support Specialist
I just authenticated with Facebook on your site and navigated around to about a dozen pages and never saw the 502 error.

As to what could be causing the problem, I'm still not sure. A 502 gateway error is, by definition, an error between the user and the server. There's nothing within JFBConnect that's programmed to throw a 502 error. We also don't make connections to any of the social networks on each page load. JFBConnect only makes outgoing connections during the authentication process. After that, the user is treated like a standard Joomla user and there really isn't any further interaction between the user and JFBConnect since they are logged into Joomla.

Since I can't see the error, can you help me understand how to recreate it? Are you seeing it with many account, on different computers, certain pages of your site, etc? What is your PHP memory limit set at? Perhaps its too low and PHP is simply crashing.

Any details you can provide on how to recreate, time of day that it seems to happen or any other information you have will help. Again, I don't think there's anything specific about JFBConnect that is causing this as not something any other user has reported. It's possible that the mere fact of having JFBConnect installed is pushing your site over the memory limit or some other limit. Can you check the PHP error logs to determine if an error is being thrown there?

Thanks,
Alex
The topic has been locked.