fusionauth-issues icon indicating copy to clipboard operation
fusionauth-issues copied to clipboard

HTTPS not working in 1.47.1

Open bkonia opened this issue 2 years ago • 6 comments

I have FusionAuth running on a Ubuntu 22 server. I installed it from the Debian package. I configured it for ports 8080 (HTTP) and 8443 (HTTPS). I installed an SSL cert in the config directory and specified the following settings in the fusionauth.properties file:

fusionauth-app.https.enabled=true
fusionauth-app.https.port=8443
fusionauth-app.https.certificate-file=/path/to/my/certificate
fusionauth-app.https.private-key-file=/path/to/my/key

The application works perfectly on HTTP. I'm able to login as admin and perform all system functions. On HTTPS, I'm able to navigate to the home page, which proves that HTTPS is properly configured. However, after navigating to the login page and submitting my credentials, FusionAuth hangs and eventually returns a 520 error. Unfortunately, there's nothing in the log file.

Strangely, it sometimes works after retrying multiple times. Once I get it to work once, it works for a little while. However, if I later log out and try to log back in, it once again hangs and eventually returns the 520 error. This only happens with HTTPS. With regular HTTP it's fast and reliable 100% of the time.

Related

  • https://github.com/FusionAuth/fusionauth-issues/issues/2614
  • https://github.com/FusionAuth/java-http/issues/16

bkonia avatar Oct 08 '23 15:10 bkonia

Hi @bkonia, I don't believe FusionAuth returns a 520 status code.

Can you provide the log or description of the 520 error your are referencing?

robotdan avatar Oct 09 '23 04:10 robotdan

As I mentioned, there's nothing in the log. It's basically just a timeout. The connection hangs and eventually times out. CloudFlare reports it as a 520, but when I connect directly to the server it hangs and the browser eventually reports that no data was received.

bkonia avatar Oct 09 '23 17:10 bkonia

Ok. Thanks for the update @bkonia we'll try and recreate.

robotdan avatar Oct 11 '23 02:10 robotdan

Here's a video that demonstrates the issue. You can see I made three login attempts. The first one failed, the second one took a while, but it finally logged me in. The third one failed. This is pretty much what I'm seeing. About half the time it works, the other half, it times out. In this example, I'm connecting directly to the server's IP address via HTTPS on port 8443. The port is open and there's no firewall or anything that would be blocking the connection.

When I connect via HTTP on port 8080, it works 100% of the time, and it's much faster. After clicking Submit, the dashboard shows up in less than one second.

https://cln.sh/4CMRMC73

bkonia avatar Oct 11 '23 15:10 bkonia

Fix will be made here:

  • https://github.com/FusionAuth/java-http/issues/16

robotdan avatar Feb 07 '24 17:02 robotdan

We have a fix prepared in this PR: https://github.com/FusionAuth/java-http/pull/17

I'm hoping to get a release rolled today and pull the new version into a few FusionAuth projects soon. It will take a bit of time to get this rolled out into a full release though. Stay tuned.

voidmain avatar Feb 09 '24 16:02 voidmain

Verified in 1.50.0

robotdan avatar Apr 24 '24 19:04 robotdan