0

Guys I have a Java web application which was developed in JSF + JPA + Hibernate which is running on a Linux server on Google Cloud.

VM instance details

Machine type - n1-standard-1 (1 vCPUj, 3.75 GB of memory)

Software Operational

System Debian (9.11)

Software

Apache (2.4.25)

Google-Fluentd (1.6.17)

OpenJDK (1.8.0)

Stackdriver-Agent (5.5.2)

Tomcat (8.5.14.0)

The problem I'm having and the following, I have a URL: https://app.example.com/login.xhtml which the user normally accesses the application, but the moment he clicks logoff the application it should be directed to the login screen, because that's exactly what happens on my localhost machine, but on the Google Cloud server it is directed to this url: http://127.0.0.1:8080/login.xhtml

And give the following error as the image below:

enter image description here

Does anyone know help me in this?

NOTE: I use the CloudFlare service to add SSL to my subdomain https://app.example.com/login.xhtml

Jarciano
  • 53
  • 8
  • So if you remove jsf, jpa and put a plain html file in ther with just 'hello world' content, you **don't** get a 404 due to a redirect? – Kukeltje Mar 31 '20 at 18:42
  • @Kukeltje I can access normally, and only when I exit the application, when I click the exit button, it directs me to the wrong url http://127.0.0.1:8080/login.xhtml – Jarciano Mar 31 '20 at 18:57
  • Ok, noticed your edit in your question. Most likely this is something in your code (or a misconfiguration in the google-cloud-platform, but not something java, jpa, jsf or tomcat-8 related – Kukeltje Mar 31 '20 at 20:23
  • Ok, so someone could tell me where this configuration will be done on my server to solve this problem? – Jarciano Apr 01 '20 at 00:42
  • check the 'most likely' first... your code – Kukeltje Apr 01 '20 at 06:43
  • Hello I believe it is not my code because previously I used Digital Ocean as a cloud server and that same application did not have this problem. So I think it may be some configuration of Google Cloud Firewall or Tomcat itself. – Jarciano Apr 01 '20 at 10:06
  • Or it silently 'fixed' this for you ;-) – Kukeltje Apr 01 '20 at 10:11
  • Hello, no, the problem continues. I'm new to Google Cloud and I don't know how to configure all the settings, all I have done so far was searching the internet and their material. – Jarciano Apr 02 '20 at 00:54
  • No one who can help me? I really need to solve this problem for my application to work perfectly on Google Cloud. – Jarciano Apr 04 '20 at 13:41
  • Like I said, your question is too broad, you did not try to narrow things down (and provide a [mcve]. Add logging/debug etc... Investigate... – Kukeltje Apr 04 '20 at 16:08
  • I understand, but as I said the problem is not in my code, because this same application works as desired on another linux server from Digital Ocean. But what kind of code do you need to support me to solve this headache? – Jarciano Apr 04 '20 at 16:11

0 Answers0