HTTPS not working in 1.47.1
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
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?
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.
Ok. Thanks for the update @bkonia we'll try and recreate.
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
Fix will be made here:
- https://github.com/FusionAuth/java-http/issues/16
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.
Verified in 1.50.0